Chapter 12. Universal Serial Bus (USB)
12-31
Software Architecture and Application Notes
number, alternate setting for each interface, and each endpoint’s type and packet size. The
USB module contains two separate 512-byte FIFO spaces: one for IN and one for OUT
endpoints. The following guidelines must be adhered to when configuring the FIFO’s:
•
The MAX_PACKET field in the EPnCFG registers must match the
wMaxPacketSize field in the corresponding endpoint descriptor. An incorrect setting
causes USB errors and unexpected interrupts.
•
EPnCFG[FIFO_SIZE] must be a power of 2 and must be at least two packets for
non-isochronous endpoints.
•
The FIFO_ADDR field in the EPnCFG registers must be aligned to a boundary
defined by the FIFO_SIZE field. For example, a FIFO with a size equal to 64 bytes
can have a starting address of 0, 64, 128, 192, 256, etc.
•
The FIFO space for an endpoint defined by FIFO_SIZE and FIFO_ADDR must not
overlap with the FIFO space for any other endpoint with the same direction.
An example FIFO configuration with a variety of endpoint types and packet sizes is shown
in Table 12-20.
12.4.4 Data Flow
The handling of the data flow to and from each endpoint can be divided between
isochronous and non-isochronous endpoints. Isochronous endpoints are designed to
transfer streaming data which is continuous and real-time in creation, delivery, and
consumption. The timely delivery of isochronous data is ensured at the expense of potential
transient losses in the data stream. In other words, any error in electrical transmission in not
corrected by hardware mechanisms such as retries. An example of streaming data is voice.
The other endpoint types transfer message based, or bursted data where integrity of the data
is more important than timely delivery.
Table 12-20. Example FIFO Setup
Endpoint
Number
Endpoint
Direction
Endpoint
Type
Max Packet
Size
FIFO Size
FIFO Starting
Address
EPnCFG
Value
0
IN
Control
8
32
480
0x020101C0
0
OUT
Control
8
32
384
0x02010180
1
IN
Interrupt
17
64
384
0x04420180
2
IN
Bulk
64
128
256
0x10040100
3
OUT
Bulk
32
128
256
0x08040100
4
IN
Isochronous
5
32
448
0x014101C0
5
OUT
Isochronous
5
32
416
0x014101A0
6
IN
Isochronous
300
256
0
0x4B080000
7
OUT
Isochronous
300
256
0
0x4B080000
Содержание 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 ...