Information

complete. When the BDT is written a token done (INT_STAT[TOK_DNE]) interrupt
is asserted. This completes the setup phase of the setup transaction. Refer to the
Universal Serial Bus Revision 2.0 specification, "Chapter 9 USB Device Framework"
(http://www.usb.org/developers/docs).
7. To initiate the data phase of the setup transaction (for example, get the data for the
GET DEVICE descriptor command) set up a buffer in memory for the data to be
transferred.
8. Initialize the current (even or odd) TX EP0 BDT to transfer the data.
Set the BDT command word to 0x004000C0 –Byte count to the length of the
data buffer in this case 64, own bit to 1, Data toggle to Data1.
Set the BDT buffer address field to the start address of the data buffer
9. Write the token register with a IN or OUT token to Endpoint 0 the target device
default control pipe, an IN token for a GET DEVICE DESCRIPTOR command
(TOKEN=0x90). This initiates an IN token on the bus followed by a data packet
from the device to the host. When the data packet completes the BDT is written and a
token done (INT_STAT[TOK_DNE]) interrupt is asserted. For control transfers with
a single packet data phase this completes the data phase of the setup transaction.
Refer to the Universal Serial Bus Revision 2.0 specification, "Chapter 9 USB Device
Framework" (http://www.usb.org/developers/docs).
10. To initiate the Status phase of the setup transaction set up a buffer in memory to
receive or send the zero length status phase data packet.
11. Initialize the current (even or odd) TX EP0 BDT to transfer the status data.
Set the BDT command word to 0x00000080 –Byte count to the length of the
data buffer in this case 0, own bit to 1, Data toggle to Data0.
Set the BDT buffer address field to the start address of the data buffer
12. Write the token register with a IN or OUT token to Endpoint 0 the target device
default control pipe, an OUT token for a GET DEVICE DESCRIPTOR command
(TOKEN=0x10). This initiates an OUT token on the bus followed by a zero length
data packet from the host to the device. When the data packet completes the BDT is
written with the handshake form the device and a token done
(INT_STAT[TOK_DNE]) interrupt is asserted. This completes the data phase of the
setup transaction. Refer to the Universal Serial Bus Revision 2.0 specification,
"Chapter 9 USB Device Framework" (http://www.usb.org/developers/docs).
To send a Full speed bulk data transfer to a target device:
Chapter 40 Universal Serial Bus OTG Controller (USBOTG)
K20 Sub-Family Reference Manual, Rev. 2, Feb 2012
Freescale Semiconductor, Inc. 919