Chapter 12. Universal Serial Bus (USB)
12-33
Software Architecture and Application Notes
12.4.4.2 Isochronous Endpoints
The data flow for isochronous endpoints must be handled differently than the data flow for
non-isochronous endpoints. Data on isochronous endpoints is generally streaming data.
Therefore, there is no concept of transfers and EOT. In addition, isochronous endpoints
differ from other endpoint types in two distinct ways. Isochronous endpoints support packet
sizes up to 1023 bytes and isochronous packets are never resent. In order to support the
large packet sizes, the FIFO size can be less than two times the packet size and the EPDPn
registers are updated in real-time, not just at the end of a packet as with other endpoint
types. If the packet size is larger than the FIFO size, the FIFO level interrupt must be used.
Isochronous packets are guaranteed to occur once per USB frame. The SOF and ASOF
interrupts are provided in order for the user to synchronize the data flow with the USB. The
SOF interrupt occurs every 1 ms provided the USB is active. The ASOF interrupt is
generated if the USB module fails to detect a SOF packet within the set timeout period.
It is strongly recommended that interrupts be used rather than polling for isochronous
endpoints as isochronous endpoints do not have any error detection or flow-control
mechanisms. If the packet size is larger than the FIFO size, using interrupts is required.
12.4.4.2.1 IN Endpoints
The user should write one packet of data to the IN FIFO per frame. If an ASOF interrupt
occurs, the user may wish to discard the data for the frame. The following example
demonstrates how to handle an isochronous IN packet each frame with a packet size larger
than the FIFO size:
1. Wait for the SOF interrupt for synchronization.
2. Write data to the FIFO until filled.
3. Wait for FIFO_LVL interrupt.
4. Read EPnDP to determine the number of bytes that can be written to the FIFO.
5. Write data to the FIFO to fill it or until all of the data for the packet has been written.
6. Repeat steps 3–5 until the entire packet has been written to the FIFO.
12.4.4.2.2 OUT Endpoints
The user should read one packet of data from the OUT FIFO per frame. If an ASOF
interrupt occurs, the user may wish to insert additional data in the data stream if the data
for the frame is lost. The following example demonstrates how to handle an isochronous
OUT packet each frame with a packet size larger than the FIFO size:
1. Wait for SOF interrupt for synchronization. The user may want to track that a packet
is received for every frame.
2. Wait for the FIFO_LVL interrupt.
3. Read EPDPn to determine number of bytes in the FIFO.
4. Read data the indicated number of bytes from the FIFO.
Содержание DigitalDNA ColdFire MCF5272
Страница 1: ...MCF5272UM D Rev 0 02 2001 MCF5272 ColdFire Integrated Microprocessor User s Manual ...
Страница 38: ...xxxviii MCF5272 User s Manual TABLES Table Number Title Page Number ...
Страница 58: ...1 10 MCF5272 User s Manual MCF5272 Specific Features ...
Страница 90: ...2 42 MCF5272 User s Manual Exception Processing Overview ...
Страница 96: ...3 6 MCF5272 User s Manual MAC Instruction Execution Timings ...
Страница 158: ...5 46 MCF5272 User s Manual Motorola Recommended BDM Pinout ...
Страница 184: ...7 12 MCF5272 User s Manual Interrupt Controller Registers ...
Страница 338: ...13 44 MCF5272 User s Manual Application Examples ...
Страница 414: ...18 6 MCF5272 User s Manual PWM Programming Model ...
Страница 452: ...19 38 MCF5272 User s Manual Power Supply Pins ...
Страница 482: ...20 30 MCF5272 User s Manual Reset Operation ...
Страница 492: ...21 10 MCF5272 User s Manual Non IEEE 1149 1 Operation ...
Страница 548: ...INDEX Index 12 MCF5272 User s Manual ...