Universal Serial Bus Interface – On-The-Go Module
MCF52277 Reference Manual, Rev. 1
Freescale Semiconductor
20-63
20.5.3.4.4
Control Endpoint Operation
Setup Phase
All requests to a control endpoint begin with a setup phase followed by an optional data phase and a
required status phase.
Setup packet managing:
•
Disable setup lockout by setting the setup lockout mode bit (USBMODE[SLOM]), once at
initialization. Setup lockout is not necessary when using the tripwire as described below.
NOTE
Leaving the setup lockout mode cleared results in a potential compliance
issue.
•
After receiving an interrupt and inspecting EPSETUPSR to determine a setup packet was received
on a particular pipe:
1. Write 1 to clear corresponding bit in EPSETUPSR.
2. Set the setup tripwire bit (USBCMD[SUTW]).
3. Duplicate contents of dQH.SetupBuffer into local software byte array.
4. Read the USBCMD[SUTW] bit. If set, continue; if cleared, goto 2)
5. Clear the USBCMD[SUTW] bit.
6. Poll until the EPSETUPSR bit clears.
7. Process setup packet using the local software byte array copy and execute status/handshake phases.
NOTE
After receiving a new setup packet, status and/or handshake phases may
remain pending from a previous control sequence. These should be flushed
and de-allocated before linking a new status and/or handshake dTD for the
most recent setup packet.
Data Phase
Following the setup phase, the DCD must create a device transfer descriptor for the data phase and prime
the transfer.
After priming the packet, the DCD must verify a new setup packet is not received by reading the
EPSETUPSR register immediately verifying that the prime had completed. A prime completes when the
associated bit in the EPPRIME register is cleared and the associated bit in the EPSR register is set. If the
EPPRIME bit goes to 0 and the EPSR bit is not set, the prime fails. This can only happen because of
improper setup of the dQH, dTD, or a setup arriving during the prime operation. If a new setup packet is
indicated after the EPPRIME bit is cleared, then the transfer descriptor can be freed and the DCD must
re-interpret the setup packet.
2
NYET/ACK — NYET unless the transfer descriptor has packets remaining according
to the USB variable length protocol then ACK.
Summary of Contents for MCF52277
Page 22: ...MCF52277 Reference Manual Rev 1 Freescale Semiconductor xxii...
Page 32: ...MCF52277 Reference Manual Rev 0 xxxii Freescale Semiconductor...
Page 60: ...Signal Descriptions MCF52277 Reference Manual Rev 1 2 16 Freescale Semiconductor...
Page 128: ...Static RAM SRAM MCF52277 Reference Manual Rev 1 6 6 Freescale Semiconductor...
Page 140: ...Clock Module MCF52277 Reference Manual Rev 1 7 12 Freescale Semiconductor...
Page 172: ...Chip Configuration Module CCM MCF52277 Reference Manual Rev 1 9 16 Freescale Semiconductor...
Page 180: ...Serial Boot Facility SBF MCF52277 Reference Manual Rev 1 10 8 Freescale Semiconductor...
Page 188: ...Reset Controller Module MCF52277 Reference Manual Rev 1 11 8 Freescale Semiconductor...
Page 210: ...Crossbar Switch XBS MCF52277 Reference Manual Rev 1 13 8 Freescale Semiconductor...
Page 542: ...FlexCAN MCF52277 Reference Manual Rev 1 23 32 Freescale Semiconductor...
Page 724: ...UART Modules MCF52277 Reference Manual Rev 1 30 34 Freescale Semiconductor...
Page 740: ...I2 C Interface MCF52277 Reference Manual Rev 1 31 16 Freescale Semiconductor...
Page 790: ...Debug Module MCF52277 Reference Manual Rev 1 32 50 Freescale Semiconductor...