English
Language : 

SAM7SE32_14 Datasheet, PDF (563/682 Pages) ATMEL Corporation – Internal High-speed Flash
SAM7SE512/256/32
Figure 38-6. Data IN Transfer for Non Ping-pong Endpoint
Prevous Data IN TX
Microcontroller Load Data in FIFO
Data is Sent on USB Bus
USB Bus Packets
Data IN
PID
Data IN 1
ACK
PID
Data IN
PID
NAK
PID
Data IN
PID
Data IN 2
ACK
PID
TXPKTRDY Flag
(UDP_CSRx)
Set by the firmware
Cleared by Hw
Set by the firmware
Cleared by Hw
TXCOMP Flag
(UDP_CSRx)
Interrupt Pending
Cleared by Firmware
Payload in FIFO
FIFO (DPR)
Content
Data IN 1
DPR access by the firmware
Load In Progress
DPR access by the hardware
Data IN 2
Interrupt
Pending
Cleared by
Firmware
38.5.2.4
Using Endpoints With Ping-pong Attribute
The use of an endpoint with ping-pong attributes is necessary during isochronous transfer. This
also allows handling the maximum bandwidth defined in the USB specification during bulk trans-
fer. To be able to guarantee a constant or the maximum bandwidth, the microcontroller must
prepare the next data payload to be sent while the current one is being sent by the USB device.
Thus two banks of memory are used. While one is available for the microcontroller, the other
one is locked by the USB device.
Figure 38-7. Bank Swapping Data IN Transfer for Ping-pong Endpoints
Microcontroller
USB Device
USB Bus
1st Data Payload
Write
Bank 0
Endpoint 1
Read
Read and Write at the Same Time
2nd Data Payload
3rd Data Payload
Bank 1
Endpoint 1
Bank 0
Endpoint 1
Bank 0
Endpoint 1
Bank 1
Endpoint 1
Data IN Packet
1st Data Payload
Data IN Packet
2nd Data Payload
Bank 0
Endpoint 1
Data IN Packet
3rd Data Payload
When using a ping-pong endpoint, the following procedures are required to perform Data IN
transactions:
6222H–ATARM–25-Jan-12
563