28-38
MC9328MX1 Reference Manual
MOTOROLA
USB Device Port
28.6 Exception Handling
Exception handling occurs in two situations:
•
When corrupted frames must be discarded
•
When an error occurs on the USB
The hardware automatically discards corrupted frames, so no software intervention is required.
If the device cannot respond to the host in the time allotted, the hardware automatically handles retries. No
software intervention is required.
There are four error situations that must be dealt with by the software:
•
Unable to Complete Device Request
•
Aborted Device Request
•
Unable to Fill or Empty FIFO Due to Temporary Problem
•
Catastrophic Error.
Explanations for each of the errors are described in the following sections.
28.6.1 Unable to Complete Device Request
In the event that the software receives a device request it cannot interpret, it asserts the CMD_ERROR and
CMD_OVER bits (in the USB_CTRL register) to the UDC. This results in a STALL to the endpoint in
question and requires intervention from the USB host to clear. When the CMD_OVER bit clears, it means
that the USB host has cleared the stall condition.
28.6.2 Aborted Device Request
When the host sends a setup packet to the device, the ACK handshake from the device can become
corrupted and lost on its way to the host. If this happens, the host retries the setup packet, and the device
can wind up with two or more setup packets in its FIFO. There are two ways to detect this condition:
•
The presence of a MDEVREQ interrupt (in the USB_EPn_INTR register)
•
The SIP bit in the Endpoint n Status/Control Register (USB_EPn_STAT) is active
In either case, the presence of more than one setup packet invalidates the first one in the FIFO. When
MDEVREQ is active, software must discard the first one, and process the second one. When SIP is active,
software must discard the first one, clear the device request, and wait for it to reassert.
28.6.3 Unable to Fill or Empty FIFO Due to Temporary Problem
When the USB module is unable to fill or empty a FIFO due to a temporary problem (such as the OS did
not service the FIFO in time and it overflowed), the software stalls the endpoint through the
FORCE_STALL bit in the USB_EPn_STAT register. This aborts the transfer in progress and forces
intervention from the USB host to clear the stall condition. The FORCE_STALL register bit automatically
clears after the stall takes effect. The application software on the host must deal with the stall condition and
notify the device on how to proceed.
Содержание DragonBall MC9328MX1
Страница 68: ...1 12 MC9328MX1 Reference Manual MOTOROLA Introduction ...
Страница 86: ...2 18 MC9328MX1 Reference Manual MOTOROLA Signal Descriptions and Pin Assignments ...
Страница 116: ...3 30 MC9328MX1 Reference Manual MOTOROLA Memory Map ...
Страница 126: ...4 10 MC9328MX1 Reference Manual MOTOROLA ARM920T Processor ...
Страница 160: ...8 8 MC9328MX1 Reference Manual MOTOROLA System Control ...
Страница 272: ...13 32 MC9328MX1 Reference Manual MOTOROLA DMA Controller ...
Страница 281: ...Programming Model MOTOROLA Watchdog Timer Module 14 9 ...
Страница 282: ...14 10 MC9328MX1 Reference Manual MOTOROLA Watchdog Timer Module ...
Страница 300: ...15 18 MC9328MX1 Reference Manual MOTOROLA Analog Signal Processor ASP ...
Страница 438: ...18 16 MC9328MX1 Reference Manual MOTOROLA Serial Peripheral Interface Modules SPI 1 and SPI 2 ...
Страница 478: ...19 40 MC9328MX1 Reference Manual MOTOROLA LCD Controller ...
Страница 542: ...20 64 MC9328MX1 Reference Manual MOTOROLA Multimedia Card Secure Digital Host Controller Module MMC SD ...
Страница 574: ...21 32 MC9328MX1 Reference Manual MOTOROLA Memory Stick Host Controller MSHC Module ...
Страница 598: ...23 16 MC9328MX1 Reference Manual MOTOROLA Real Time Clock RTC ...
Страница 670: ...24 72 MC9328MX1 Reference Manual MOTOROLA SDRAM Memory Controller ...
Страница 726: ...25 56 MC9328MX1 Reference Manual MOTOROLA SmartCard Interface Module SIM ...
Страница 736: ...26 10 MC9328MX1 Reference Manual MOTOROLA General Purpose Timers ...
Страница 854: ...29 18 MC9328MX1 Reference Manual MOTOROLA I2C Module ...
Страница 900: ...30 46 MC9328MX1 Reference Manual MOTOROLA Synchronous Serial Interface SSI ...
Страница 942: ...32 26 MC9328MX1 Reference Manual MOTOROLA GPIO Module and I O Multiplexer IOMUX ...