5 usb transaction, 5 usb transaction -8 – Freescale Semiconductor ColdFire MCF52210 User Manual

Page 236

Advertising
background image

Universal Serial Bus, OTG Capable Controller

MCF52211 ColdFire® Integrated Microcontroller Reference Manual, Rev. 2

15-8

Freescale Semiconductor

15.3.5

USB Transaction

When the USB-FS transmits or receives data, it computes the BDT address using the address generation
shown in Table 2. After the BDT has been read and if the OWN bit equals 1, the SIE transfers the data via
the DMA to or from the buffer pointed to by the ADDR field of the BD. When the TOKEN is complete,
the USB-FS updates the BDT and change the OWN bit to 0 if KEEP is 0. The STAT register is updated
and the TOK_DNE interrupt is set. When the microprocessor processes the TOK_DNE interrupt it reads
the status register, this gives the microprocessor all the information it needs to process the endpoint. At
this point, the microprocessor allocates a new BD so additional USB data can be transmitted or received
for that endpoint, and process then the last BD. The following figure shows a time line how a typical USB
token would be processed.

Figure 15-6. USB Token Transaction

The USB has two sources for the DMA overrun error. First, the memory latency on the BVCI initiator
interface may be too high and cause the receive FIFO to overflow. This is predominantly a hardware
performance issue, usually caused by transient memory access issues. Second, the packet received may be
larger than the negotiated MaxPacket size. This would be caused by a software bug.

In the first case, the USB responds with a NAK or Bus Timeout (BTO - See bit 4 in

Section 15.4.1.11,

“Error Interrupt Status Register (ERR_STAT)

”) as appropriate for the class of transaction. The DMA_ERR

bit is set in the ERR_STAT register of the core for host and device modes of operation. Depending on the
values of the INT_ENB and ERR_ENB register, the core may assert an interrupt to notify the processor of
the DMA error. In device mode, the BDT is not written back nor is the TOK_DNE interrupt triggered

1–0

Reserved

Reserved, should read as zeroes

ADDR[31:0]

The Address bits represent the 32 -bit buffer address in system memory. These bits are unchanged by the
USB-FS.

Table 15-3. Buffer Descriptor Byte Fields (continued)

SETUP TOKEN

DATA

ACK

USB RST

SOF

SOF

Interrupt Generated

TOK_DNE

Interrupt Generated

IN TOKEN

DATA

ACK

TOK_DNE

Interrupt Generated

OUT TOKEN

DATA

ACK

TOK_DNE

Interrupt Generated

USB_RST

Interrupt Generated

USB Host

Function

Advertising
This manual is related to the following products: