
Universal Serial Bus Interface – On-The-Go Module
Freescale Semiconductor
21-71
In addition to checking the status bit, the DCD must read the transfer bytes field to determine the actual
bytes transferred. When a transfer is complete, the total bytes transferred decrements by the actual bytes
transferred. For transmit packets, a packet is only complete after the actual bytes reaches zero. However,
for receive packets, the host may send fewer bytes in the transfer according the USB variable length packet
protocol.
21.5.3.6.5
Flushing/De-priming an Endpoint
It is necessary for the DCD to flush or de-prime endpoints during a USB device reset or during a broken
control transfer. There may also be application specific requirements to stop transfers in progress. The
DCD can use this procedure to stop a transfer in progress:
1. Set the corresponding bit(s) in the EPFLUSH register.
2. Wait until all bits in the EPFLUSH register are cleared.
NOTE
This operation may take a large amount of time depending on the USB bus
activity. It is not desirable to have this wait loop within an interrupt service
routine.
3. Read the EPSR register to ensure that for all endpoints commanded to be flushed, that the
corresponding bits are now cleared. If the corresponding bits are set after step #2 has finished, flush
failed as described below:
In very rare cases, a packet is in progress to the particular endpoint when commanded to flush using
EPFLUSH. A safeguard is in place to refuse the flush to ensure that the packet in progress
completes successfully. The DCD may need to repeatedly flush any endpoints that fail to flush by
repeating steps 1-3 until each endpoint successfully flushes.
21.5.3.6.6
Device Error Matrix
The following table summarizes packet errors not automatically managed by the USB OTG module.
The device controller manages all errors on bulk/control/interrupt endpoints except for a data buffer
overflow. However, for ISO endpoints, errors packets are not retried and errors are tagged as indicated.
Table 21-56. Device Error Matrix
Error
Direction
Packet
Type
Data Buffer
Error Bit
Transaction
Error Bit
Data Buffer Overflow
RX
Any
1
0
ISO Packet Error
RX
ISO
0
1
ISO Fulfillment Error
Both
ISO
0
1
MCF5329 Reference Manual, Rev 3
Summary of Contents for MCF5329
Page 106: ...ColdFire Core 3 32 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 148: ...Cache 5 22 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 154: ...Static RAM SRAM 6 6 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 184: ...Power Management 8 18 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 204: ...Reset Controller Module 10 8 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 220: ...System Control Module SCM 11 16 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 228: ...Crossbar Switch XBS 12 8 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 268: ...General Purpose I O Module 13 40 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 392: ...SDRAM Controller SDRAMC 18 30 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 436: ...Fast Ethernet Controller FEC 19 44 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 594: ...FlexCAN 23 30 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 678: ...Pulse Width Modulation PWM Module 26 22 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 684: ...Watchdog Timer Module 27 6 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 704: ...DMA Timers DTIM0 DTIM3 29 12 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 754: ...UART Modules 31 34 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 770: ...I2 C Interface 32 16 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 866: ...Debug Module 36 50 Freescale Semiconductor MCF5329 Reference Manual Rev 3...