Universal Serial Bus Interface – On-The-Go Module
MCF52277 Reference Manual, Rev. 1
Freescale Semiconductor
20-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.
20.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.
20.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 20-57. 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
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...