Atmel Evaluation Kit AT91SAM9G25-EK AT91SAM9G25-EK Data Sheet

Product codes
AT91SAM9G25-EK
Page of 1102
516
SAM9G25 [DATASHEET]
11032C–ATARM–25-Jan-13
Configuration examples of UDPHS_EPTCTLx (
Bulk IN endpoint type follow below.
z
With DMA 
z
AUTO_VALID: Automatically validate the packet and switch to the next bank.
z
EPT_ENABL: Enable endpoint.
z
Without DMA:
z
TXRDY: An interrupt is generated after each transmission.
z
EPT_ENABL: Enable endpoint.
Configuration examples of Bulk OUT endpoint type follow below.
z
With DMA
z
AUTO_VALID: Automatically validate the packet and switch to the next bank.
z
EPT_ENABL: Enable endpoint.
z
Without DMA
z
RXRDY_TXKL: An interrupt is sent after a new packet has been stored in the endpoint FIFO.
z
EPT_ENABL: Enable endpoint. 
32.6.7 DPRAM Management
Endpoints can only be allocated in ascending order, from the endpoint 0 to the last endpoint to be allocated. The user
shall therefore configure them in the same order.
The allocation of an endpoint x starts when the Number of Banks field in the UDPHS Endpoint Configuration Register
(UDPHS_EPTCFGx.BK_NUMBER) is different from zero. Then, the hardware allocates a memory area in the DPRAM
and inserts it between the x-1 and x+1 endpoints. The x+1 endpoint memory window slides up and its data is lost. Note
that the following endpoint memory windows (from x+2) do not slide.
Disabling an endpoint, by writing a one to the Endpoint Disable bit in the UDPHS Endpoint Control Disable Register
(UDPHS_EPTCTLDISx.EPT_DISABL), does not reset its configuration:
z
The Endpoint Banks (UDPHS_EPTCFGx.BK_NUMBER), 
z
The Endpoint Size (UDPHS_EPTCFGx.EPT_SIZE),
z
The Endpoint Direction (UDPHS_EPTCFGx.EPT_DIR), and
z
The Endpoint Type (UDPHS_EPTCFGx.EPT_TYPE).
To free its memory, the user shall write a zero to the UDPHS_EPTCFGx.BK_NUMBER field. The x+1 endpoint memory
window then slides down and its data is lost. Note that the following endpoint memory windows (from x+2) do not slide.
 illustrates the allocation and reorganization of the DPRAM in a typical example.