MCF548x Reference Manual, Rev. 3
29-50 Freescale Semiconductor

29.4.1.4 FIFO Sizes

FIFO sizes must be programmed to match the traffic sent across the USB. The EPnFRCFGR along with
the USBCR[RAMSPLIT] bit allow software to specify the memory configuration that is to be used at any
given time.
In most cases, all endpoints should be disabled and all FIFOs should be flushed following the
reconfiguration of the FIFO sizes.

29.4.1.5 Enable the Device

One of the last steps in initializing the module is to enable it for processing via the RAMEN bit in the
USBCR.

29.4.2 Exception Handling

Exception handling refers to two situations. The first occurs when corrupted frames must be discarded.
The second is when an error situation occurs on the USB.
Corrupted frames are automatically discarded by the hardware. No software intervention is required to
deal with this problem.
If the device cannot respond to the host in the time allotted, hardware automatically handles retries. No
software intervention is required in this case.
The following types of error situations can arise and must be dealt with by the software.

29.4.2.1 Unable to Fill or Empty FIFO Due to Temporary Problem

If the module is unable to fill or empty a FIFO due to a temporary problem (for example the OS did not
service the FIFO in time and it overflowed), the software should stall the endpoint via the PSTALL bit in
the EPnSR. This will abort the transfer in progress and force intervention from the USB host to clear the
stall condition. The PSTALL bit automatically clears once the next SETUP token is received from the host.
It is up to the application software on the host to deal with the stall condition and notify the device as to
how it should proceed.

29.4.2.2 Catastrophic Error

In the case of a catastrophic error, the software should execute a hard reset, reinitialize the USB module,
and wait for the USB host to re-enumerate the bus.

29.4.3 Data Transfer Operations

Three types of data transfer modes exist for this module: control transfers, bulk transfers, and isochronous
transfers. In addition to the three data transfer modes listed, the USB specification also supports an
interrupt transfer. From the point of view of this module, the interrupt transfer type is identical to the bulk
data transfer mode, and no additional hardware is supplied to support it. This section covers the transfer
modes and how they work from the ground up.
All data is moved across the USB in terms of packets. Groups of packets are combined to form data
transfers. The same packet transfer mechanism applies to bulk, interrupt, and control transfers.
Isochronous data is also moved in the form of packets, but since isochronous pipes are given a fixed
portion of the USB bandwidth at all time, there is no concept of an end of transfer.