12-32
MCF5272 User’s Manual
Software Architecture and Application Notes
12.4.4.1 Control, Bulk, and Interrupt Endpoints
The data flow for control, bulk, and interrupt endpoints can be handled the same way for all
3 types of endpoints. Control, bulk, and interrupt endpoints all support guaranteed data
delivery. If the host detects an error during the read of a packet from an IN endpoint, it
requests that the packet be resent from the device. The USB FIFO mechanism takes care of
this without interrupting the CPU. In a similar fashion, the USB FIFO mechanism keeps a
received packet from being read by the user until the control logic validates the packet for
transmission errors.
12.4.4.1.1 IN Endpoints
The following example demonstrates how to transmit a transfer on an IN endpoint:
1. Wait until the last transfer is complete (an EOT interrupt has occurred).
2. Write data to the FIFO to fill it.
3. Wait for EOP interrupt or poll EOP bit.
4. Read EPnDP to determine the number of bytes that can be written to the FIFO.
Normally, only one packet should be written unless the software does not service the
EOP immediately.
5. Write data to the FIFO to fill it or until all of the data for the transfer has been
written.
6. Repeat steps 5–7 until all of the data for the transfer has been written to the FIFO.
7. Clear EPnCTL[IN_DONE].
8. Wait for the EOT interrupt or poll the EOT bit. The user can now begin processing
the next transfer.
12.4.4.1.2 OUT Endpoints
The following example demonstrates how to handle a received transfer on an OUT
endpoint:
1. Wait for the EOP interrupt or poll the EOP bit.
2. Read EPnDP to determine number of bytes in the FIFO.
3. Read the indicated number of bytes of data from the FIFO into a buffer.
4. Repeat steps 1–3 until EOT is set.
5. When EOT is set, the transfer is complete. While EOT is set, the FIFO is locked and
any packets sent for the next transfer cause a NAK response.
6. Read EPnDP to determine the number of bytes in the FIFO if any for the last transfer.
The EOT bit can be cleared once this register has been read.
7. Read the indicated number of bytes of data from the FIFO into a buffer.
8. The user can now process the received transfer.
Summary of Contents for DigitalDNA ColdFire MCF5272
Page 1: ...MCF5272UM D Rev 0 02 2001 MCF5272 ColdFire Integrated Microprocessor User s Manual ...
Page 38: ...xxxviii MCF5272 User s Manual TABLES Table Number Title Page Number ...
Page 58: ...1 10 MCF5272 User s Manual MCF5272 Specific Features ...
Page 90: ...2 42 MCF5272 User s Manual Exception Processing Overview ...
Page 96: ...3 6 MCF5272 User s Manual MAC Instruction Execution Timings ...
Page 158: ...5 46 MCF5272 User s Manual Motorola Recommended BDM Pinout ...
Page 184: ...7 12 MCF5272 User s Manual Interrupt Controller Registers ...
Page 338: ...13 44 MCF5272 User s Manual Application Examples ...
Page 414: ...18 6 MCF5272 User s Manual PWM Programming Model ...
Page 452: ...19 38 MCF5272 User s Manual Power Supply Pins ...
Page 482: ...20 30 MCF5272 User s Manual Reset Operation ...
Page 492: ...21 10 MCF5272 User s Manual Non IEEE 1149 1 Operation ...