Freescale Semiconductor MCF5329 Reference Manual page 501

Devices supported: mcf5327; mcf5328; mcf53281; mcf5329
Table of Contents

Advertisement

21.5.3.3.2
Stalling
There USB OTG has two occasions it may need to return to the host a STALL:
The first is the functional stall, a condition set by the DCD as described in the USB 2.0 Device
Framework chapter. A functional stall is used only on non-control endpoints and can be enabled in
the device controller by setting the endpoint stall bit in the EPCRn register associated with the
given endpoint and the given direction. In a functional stall condition, the device controller
continues to return STALL responses to all transactions occurring on the respective endpoint and
direction until the endpoint stall bit is cleared by the DCD.
A protocol stall, unlike a function stall, is used on control endpoints and automatically cleared by
the device controller at the start of a new control transaction (setup phase). When enabling a
protocol stall, DCD must enable the stall bits as a pair (TXS and RXS bits). A single write to the
EPCRn register can ensure both stall bits are set at the same instant.
Any write to the EPCRn register during operational mode must preserve the
endpoint type field (perform a read-modify-write).
SETUP packet received by a non-control
endpoint.
IN/OUT/PING packet received by a
non-control endpoint.
IN/OUT/PING packet received by a
non-control endpoint.
SETUP packet received by a control
endpoint.
IN/OUT/PING packet received by a control
endpoint
IN/OUT/PING packet received by a control
endpoint.
21.5.3.3.3
Data Toggle
Data toggle maintains data coherency between host and device for any given data pipe. For more
information on data toggle, refer to the USB 2.0 specification.
Data Toggle Reset
The DCD may reset the data toggle state bit and cause the data toggle sequence to reset in the device
controller by setting the data toggle reset bit in the EPCRn register. This should only happen when
configuring/initializing an endpoint or returning from a STALL condition.
Freescale Semiconductor
Table 21-50. Device Controller Stall Response Matrix
USB Packet
MCF5329 Reference Manual, Rev 3
Universal Serial Bus Interface – On-The-Go Module
NOTE
Endpoint
Effect on
Stall Bit
Stall bit
N/A
None
1
None
0
None
N/A
Cleared
1
None
0
None
USB Response
STALL
STALL
ACK/NAK/NYET
ACK
STALL
ACK/NAK/NYET
21-59

Advertisement

Table of Contents
loading

Table of Contents