18 token register (token) – Freescale Semiconductor ColdFire MCF52210 User Manual
Page 254
Universal Serial Bus, OTG Capable Controller
MCF52211 ColdFire® Integrated Microcontroller Reference Manual, Rev. 2
15-26
Freescale Semiconductor
15.4.1.18 Token Register (TOKEN)
The Token Register is used to perform USB transactions when in host mode (HOST_MODE_EN=1).
When the ColdFire core processor wishes to execute a USB transaction to a peripheral, it writes the
TOKEN type and endpoint to this register. After this register has been written, the USB module begins the
specified USB transaction to the address contained in the address register. The ColdFire core should
always check that the TOKEN_BUSY bit in the control register is not set before performing a write to the
Token Register. This ensures token commands are not overwritten before they can be executed. The
address register and endpoint control register 0 are also used when performing a token command and
therefore must also be written before the Token Register. The address register is used to correctly select
the USB peripheral address that is transmitted by the token command. The endpoint control register
determines the handshake and retry policies used during the transfer.
shows the TOKEN
Register.
IPSBAR
Offset:
0x1C_00A8 (TOKEN)
Access: User read/write
7
6
5
4
3
2
1
0
R
TOKEN_PID
TOKEN_ENDPT
W
Reset:
0
0
0
0
0
0
0
0
Figure 15-25. TOKEN Register
Table 15-29. TOKEN Field Descriptions
Field
Description
7 – 4
TOKEN
_ENDPT
This 4 bit field holds the Endpoint address for the token command. The four bit value that is written must be a
valid endpoint.
3 – 0
TOKEN_PID
This 4-bit field contains the token type executed by the USB Module.
Valid tokens are:
TOKEN_PID=0001
OUT Token
USB Module performs an OUT (TX) transaction
TOKEN_PID=1001
IN Token
USB Module performs an In (RX) transaction
TOKEN_PID=1101
SETUP Token
USB Module performs a SETUP (TX) transaction