552
11054A–ATARM–27-Jul-11
SAM9X25
552
11054A–ATARM–27-Jul-11
SAM9X25
33.6.9.12
Bulk OUT or Interrupt OUT: Sending a Buffer Using DMA (Host To Device)
To use the DMA setting, the AUTO_VALID field is mandatory.
See
33.6.9.6 Bulk IN or Interrupt IN: Sending a Buffer Using DMA (Device to Host)
for more
information.
DMA Configuration Example:
1.
First program UDPHS_DMAADDRESSx with the address of the buffer that should be
transferred.
2.
Enable the interrupt of the DMA in UDPHS_IEN
3.
Program the DMA Channelx Control Register:
– Size of buffer to be sent.
– END_B_EN: Can be used for OUT packet truncation (discarding of unbuffered
packet data) at the end of DMA buffer.
– END_BUFFIT: Generate an interrupt when BUFF_COUNT in the
UDPHS_DMASTATUSx register reaches 0.
– END_TR_EN: End of transfer enable, the UDPHS device can put an end to the
current DMA transfer, in case of a short packet.
– END_TR_IT: End of transfer interrupt enable, an interrupt is sent after the last USB
packet has been transferred by the DMA, if the USB transfer ended with a short
packet. (Beneficial when the receive size is unknown.)
– CHANN_ENB: Run and stop at end of buffer.
For OUT transfer, the bank will be automatically cleared by hardware when the application has
read all the bytes in the bank (the bank is empty).
Notes:
1. When a zero-length-packet is received, RX_BK_RDY bit in UDPHS_EPTSTAx is cleared auto-
matically by AUTO_VALID, and the application knows of the end of buffer by the presence of
the END_TR_IT.
2. If the host sends a zero-length packet, and the endpoint is free, then the device sends an ACK.
No data is written in the endpoint, the RX_BY_RDY interrupt is generated, and the
BYTE_COUNT field in UDPHS_EPTSTAx is null.
Figure 33-14.
Data OUT Transfer for Endpoint with One Bank
ACK
Token OUT
NAK
Token OUT
ACK
Token OUT
Data OUT 1
USB Bus
Packets
RX_BK_RDY
Set by Hardware
Cleared by Firmware,
Data Payload Written in FIFO
FIFO (DPR)
Content
Written by UDPHS Device
Microcontroller Read
Data OUT 1
Data OUT 1
Data OUT 2
Host Resends the Next Data Payload
Microcontroller Transfers Data
Host Sends Data Payload
Data OUT 2
Data OUT 2
Host Sends the Next Data Payload
Written by UDPHS Device
(UDPHS_EPTSTAx)
Interrupt Pending
Содержание SAM9X25
Страница 26: ...26 11054A ATARM 27 Jul 11 SAM9X25...
Страница 138: ...138 11054A ATARM 27 Jul 11 SAM9X25 138 11054A ATARM 27 Jul 11 SAM9X25...
Страница 162: ...162 11054A ATARM 27 Jul 11 SAM9X25 162 11054A ATARM 27 Jul 11 SAM9X25...
Страница 216: ...216 11054A ATARM 27 Jul 11 SAM9X25 216 11054A ATARM 27 Jul 11 SAM9X25...
Страница 266: ...266 11054A ATARM 27 Jul 11 SAM9X25 266 11054A ATARM 27 Jul 11 SAM9X25...
Страница 330: ...330 11054A ATARM 27 Jul 11 SAM9X25 330 11054A ATARM 27 Jul 11 SAM9X25...
Страница 374: ...374 11054A ATARM 27 Jul 11 SAM9X25...
Страница 468: ...468 11054A ATARM 27 Jul 11 SAM9X25 468 11054A ATARM 27 Jul 11 SAM9X25...
Страница 532: ...532 11054A ATARM 27 Jul 11 SAM9X25 532 11054A ATARM 27 Jul 11 SAM9X25...
Страница 692: ...692 11054A ATARM 27 Jul 11 SAM9X25 692 11054A ATARM 27 Jul 11 SAM9X25...
Страница 777: ...777 11054A ATARM 27 Jul 11 SAM9X25 777 11054A ATARM 27 Jul 11 SAM9X25...
Страница 886: ...886 11054A ATARM 27 Jul 11 SAM9X25 886 11054A ATARM 27 Jul 11 SAM9X25...
Страница 962: ...962 11054A ATARM 27 Jul 11 SAM9X25 962 11054A ATARM 27 Jul 11 SAM9X25...
Страница 1036: ...1036 11054A ATARM 27 Jul 11 SAM9X25 1036 11054A ATARM 27 Jul 11 SAM9X25...
Страница 1067: ...1067 11054A ATARM 27 Jul 11 SAM9X25 1067 11054A ATARM 27 Jul 11 SAM9X25 PTZ Pause Time Zero Enable pause time zero interrupt...
Страница 1069: ...1069 11054A ATARM 27 Jul 11 SAM9X25 1069 11054A ATARM 27 Jul 11 SAM9X25 PTZ Pause Time Zero Disable pause time zero interrupt...
Страница 1071: ...1071 11054A ATARM 27 Jul 11 SAM9X25 1071 11054A ATARM 27 Jul 11 SAM9X25 PTZ Pause Time Zero Pause time zero interrupt masked...
Страница 1128: ...1128 11054A ATARM 27 Jul 11 SAM9X25 1128 11054A ATARM 27 Jul 11 SAM9X25...
Страница 1130: ...1130 11054A ATARM 27 Jul 11 SAM9X25...
Страница 1131: ...1131 11054A ATARM 27 Jul 11 SAM9X25 Revision History Doc Rev 11054A Comments Change Request Ref 1st issue...
Страница 1132: ...1132 11054A ATARM 27 Jul 11 SAM9X25...
Страница 1144: ...xii 11054A ATARM 27 Jul 11 SAM9X25...