Universal Serial Bus (USB)
Am186™CC/CH/CU Microcontrollers User’s Manual
18-23
18.5.6.6
Error Recovery on Isochronous Endpoints
Isochronous data, by definition, is very time-sensitive. Neither PCM highway nor USB have
any mechanism or concept of retransmission of isochronous data. Nevertheless, there are
error-recovery issues with isochronous data. For the intended audio applications, these
primarily revolve around making sure that FIFO pointers do not overlap or drift too far apart.
For example, assume the Am186CC microcontroller’s HDLC controller is storing audio data
in a circular FIFO, and the USB peripheral controller is pulling audio data out of the FIFO.
Because USB operation happens in (nominally) 8 sample bursts, and PCM highway
operation happens one sample at a time, if the FIFO pointers ever overlapped, old data
could be transmitted intermixed with the new data, and the audio would be garbled. Likewise,
if the pointers get too far apart, excessive delay is introduced in the audio.
During normal operation, the pointers should stay a relatively constant distance apart.
However, it is possible to miss a frame’s worth of data on the USB, because isochronous
transfers are not guaranteed. When this occurs, the best that software can do is to adjust
the DMA pointers to keep the error localized as a single glitch in the audio, rather than let
it accumulate and cause excessive delay, or cause garbled audio (by the pointers repeatedly
crossing each other). It is probably also a good idea for a missed OUT transaction for USB
(PCM highway pipes) to inject silence into the FIFO for the duration of the missed
transaction, to minimize the annoyance of the audio glitch.
Adjusting the pointers is very straightforward on a general-purpose DMA circular FIFO (e.g.,
stop the DMA, add a constant to the pointer, and restart the DMA), but is more complicated
on the SmartDMA channel. If a SmartDMA channel is being used for isochronous data, the
simplest thing to do is to set it up so that there are two descriptors in the ring. Each descriptor
points to a portion of the circular FIFO. When a pointer needs to be adjusted, the DMA is
stopped, the current location (low order 16 bits) of the memory pointer is read from the
DMA hardware, a new value is calculated by adding or subtracting the adjustment from the
memory pointer, and the FIFO descriptors are updated so that the next one executed covers
the portion of the FIFO from the new memory pointer to the end of the FIFO, and the other
descriptor covers the portion of the FIFO from the start of the FIFO to the new pointer. Then
the DMA is restarted.
Note that, because such an adjustment could make one FIFO very small (e.g. one byte),
it is important to use the feature that allows DMA OWN bits to be reset. Otherwise, DMA
effectively stops and requires software intervention each time through the FIFOs, and there
is a latency requirement to service both the descriptors within a very short time period.
18.5.7
Isochronous Transfer Synchronization
The isochronous transfer type is required by audio, telephony, or other applications that
need real-time streaming delivery to avoid distortion. The USB configuration process
ensures that the data pipe from the host to an isochronous endpoint has enough bandwidth
to transfer the endpoint's maximum packet size in every frame, but the design must also
synchronize the data so it is delivered at the correct rate.
CC
Содержание Am186 CC
Страница 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Страница 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Страница 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Страница 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Страница 39: ...Architectural Overview Am186 CC CH CU Microcontrollers User s Manual 1 15 Figure 1 6 32 Channel Linecard CH CC...
Страница 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Страница 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Страница 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Страница 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Страница 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...