English
Language : 

SAM7X128_14 Datasheet, PDF (436/662 Pages) ATMEL Corporation – ARM-based Flash MCU
Figure 34-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
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 transfer. 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 34-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:
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
436