Usb Transaction - NXP Semiconductors MKL27Z128VFM4 Reference Manual

Table of Contents

Advertisement

Field
Description
Setting BDT_STALL also causes the corresponding USB_ENDPTn[EPSTALL] bit to set. This
causes USBOTG to issue a STALL handshake for both directions of the associated endpoint. To
clear the stall condition:
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 USBFS when a transfer completes. The values written back are the token PID values from
the USB specification:
1–0
Reserved, should read as zeroes.
Reserved
ADDR[31:0]
Address
Represents the 32-bit buffer address in system memory. These bits are unchanged by USBFS.

33.4.5 USB transaction

When USBFS 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. USBFS 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, USBFS 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.
Freescale Semiconductor, Inc.
Table 33-5. Buffer descriptor fields (continued)
1. Clear the associated USB_ENDPTn[EPSTALL] bit.
2. Write the BDT to clear OWN and BDT_STALL.
• 0x1h for an OUT token.
• 0x9h for an IN token.
• 0xDh for a SETUP token.
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
Chapter 33 Universal Serial Bus (USB) FS Subsystem
539

Advertisement

Table of Contents
loading

Table of Contents