Information
Table 40-4. Buffer descriptor fields (continued)
Field Description
TOK_PID[n] Bits [5:2] can also represent the current token PID. The current token PID is written back in to the
BD by the USB-FS when a transfer completes. The values written back are the token PID values
from the USB specification:
• 0x1 for an OUT token.
• 0x9 for an IN token.
• 0xd for a SETUP token.
In host mode, this field is used to report the last returned PID or a transfer status indication. The
possible values returned are:
• 0x3 DATA0
• 0xb DATA1
• 0x2 ACK
• 0xe STALL
• 0xa NAK
• 0x0 Bus Timeout
• 0xf Data Error
1–0
Reserved
Reserved, should read as zeroes.
ADDR[31:0] Address
Represents the 32-bit buffer address in system memory. These bits are unchanged by the USB-
FS.
40.3.5 USB transaction
When the USB-FS transmits or receives data, it computes the BDT address using the
address generation shown in "Addressing Buffer Descriptor Entries" table.
If OWN =1, the following process occurs:
1. The USB-FS reads the BDT.
2. The SIE transfers the data via the DMA to or from the buffer pointed to by the
ADDR field of the BD.
3. When the TOKEN is complete, the USB-FS updates the BDT and, if KEEP=0,
changes the OWN bit to 0.
4. The STAT register is updated and the TOK_DNE interrupt is set.
5. When the processor processes the TOK_DNE interrupt, it reads from the status
register all the information needed to process the endpoint.
6. At this point, the processor allocates a new BD so that additional USB data can be
transmitted or received for that endpoint, and then processes the last BD.
The following figure shows a timeline of how a typical USB token is processed after the
BDT is read and OWN=1.
Chapter 40 Universal Serial Bus OTG Controller (USBOTG)
K20 Sub-Family Reference Manual, Rev. 2, Feb 2012
Freescale Semiconductor, Inc. 891
