| поискавой системы для электроныых деталей |
|
UM0463 датащи(PDF) 22 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0463 датащи(HTML) 22 Page - STMicroelectronics |
|
22 / 30 page ![]() Data transfer on noncontrol endpoints UM0463 22/30 For ST7SCR, there are six operations available to set status registers: ● USB_SetTxEP1Status(Status) // Set the endpoint 1 sending status ● USB_SetTxEP2Status(Status) // Set the endpoint 2 sending status ● USB_SetRxEP2Status(Status) // Set the endpoint 2 receiving status ● USB_SetTxEP3Status(Status) // Set the endpoint 3 sending status ● USB_SetTxEP4Status(Status) // Set the endpoint 4 sending status ● USB_SetTxEP5Status(Status) // Set the endpoint 5 sending status In the above operations, Status is the state that will be set. 4.3.2 DMA counter registers The sending DMA counter register for each endpoint is defined as CNTxTXR and the receiving DMA counter register for each endpoint is defined as CNTxRXR, where x represents the endpoint number. 4.3.3 DMA buffers The DMA buffer for each sending endpoint is defined as EPx_IN and the DMA buffer for each receiving endpoint is defined as EPx_OUT, where x represents the endpoint number. 4.3.4 Sending data to the host Follow the steps below to send data to the host: 1. Check if the endpoint status is EP_NAK to ensure that the previous data in the buffer is sent. 2. Copy the data to be sent to the DMA buffer of the endpoint. 3. Set the length of data to be sent to the corresponding endpoint DMA counter register. 4. Set the sending endpoint status to EP_VALID. 5. Check that the endpoint status becomes EP_NAK again to ensure that the data is sent. 4.3.5 Receiving data from the host Follow the steps below to receive data from the host 1. Check if the endpoint status is EP_NAK to ensure that the EP is free to receive data. 2. Ensure that the data in the endpoint DMA buffer is useless to avoid the loss of useful data. 3. Set the length of data expected to the corresponding endpoint DMA counter register. 4. Set the receiving endpoint status to EP_VALID. 5. Check that the endpoint status becomes EP_NAK from EP_VALID. 6. Subtract the current value of the endpoint DMA counter register from the value set in step 2 to get the actual length of the received data. 7. Process the received data. |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |