Universal Serial Bus Interface – On-The-Go Module
MCF52277 Reference Manual, Rev. 1
20-54
Freescale Semiconductor
20.5.3
Device Operation
The device controller performs data transfers using a set of linked list transfer descriptors pointed to by a
queue head. The next sections explain the use of the device controller from the device controller driver
(DCD) point-of-view and further describe how specific USB bus events relate to status changes in the
device controller programmer's interface.
20.5.3.1
Device Controller Initialization
After hardware reset, USB OTG is disabled until the run/stop bit in the USBCMD register is set. At
minimum, it is necessary to have the queue heads set up for endpoint 0 before the device attach occurs.
Shortly after the device is enabled, a USB reset occurs followed by setup packet arriving at endpoint 0. A
queue head must be prepared so the device controller can store the incoming setup packet.
To initialize a device, the software must:
1. Optionally set streaming disable in the USBMODE[SDIS] bit.
2. Optionally modify the BURSTSIZE register.
3. Write the appropriate value to the USBINTR to enable the desired interrupts. For device operation,
setting UE, UEE, PCE, URE, and SLE is recommended.
For a list of available interrupts, refer to
Section 20.3.4.3, “USB Interrupt Enable Register
Section 20.3.4.2, “USB Status Register (USBSTS).”
4. Set the USBMODE[CM] field to enable device mode, and set the USBMODE[ES] bit for big
endian operation.
5. Optionally write the USBCMD register to set the desired interrupt threshold.
6. Set USBMODE[SLOM] to disable setup lockouts.
7. Initialize the EPLISTADDR.
8. Create two dQHs for endpoint 0—one for IN transactions and one for OUT transactions.
For information on device queue heads, refer to
Section 20.5.2.1, “Endpoint Queue Head.”
9. Set the CCM’s UOCSR[BVLD] bit to allow device to connect to a host.
10. Set the USBCMD[RS] bit.
After the run/stop bit is set, a device reset occurs. The DCD must monitor the reset event and set the
DEVICEADDR and EPCR
n
registers,
and adjust the software state as described in
NOTE
Endpoint 0 is a control endpoint only and does not need to configured using
the EPCR0 register.
It is not necessary to initially prime endpoint 0 because the first packet received is always a setup packet.
The contents of the first setup packet requires a response in accordance with USB device framework
command set.
Содержание MCF52277
Страница 1: ...MCF52277 Reference Manual Devices Supported MCF52274 MCF52277 Document Number MCF52277RM Rev 1 04 2008...
Страница 22: ...MCF52277 Reference Manual Rev 1 Freescale Semiconductor xxii...
Страница 32: ...MCF52277 Reference Manual Rev 0 xxxii Freescale Semiconductor...
Страница 60: ...Signal Descriptions MCF52277 Reference Manual Rev 1 2 16 Freescale Semiconductor...
Страница 112: ...Enhanced Multiply Accumulate Unit EMAC MCF52277 Reference Manual Rev 1 4 20 Freescale Semiconductor...
Страница 128: ...Static RAM SRAM MCF52277 Reference Manual Rev 1 6 6 Freescale Semiconductor...
Страница 140: ...Clock Module MCF52277 Reference Manual Rev 1 7 12 Freescale Semiconductor...
Страница 172: ...Chip Configuration Module CCM MCF52277 Reference Manual Rev 1 9 16 Freescale Semiconductor...
Страница 180: ...Serial Boot Facility SBF MCF52277 Reference Manual Rev 1 10 8 Freescale Semiconductor...
Страница 188: ...Reset Controller Module MCF52277 Reference Manual Rev 1 11 8 Freescale Semiconductor...
Страница 210: ...Crossbar Switch XBS MCF52277 Reference Manual Rev 1 13 8 Freescale Semiconductor...
Страница 480: ...Liquid Crystal Display Controller LCDC MCF52277 Reference Manual Rev 1 21 44 Freescale Semiconductor...
Страница 510: ...Touchscreen Controller Analog to Digital Converter MCF52277 Reference Manual Rev 1 22 30 Freescale Semiconductor...
Страница 542: ...FlexCAN MCF52277 Reference Manual Rev 1 23 32 Freescale Semiconductor...
Страница 568: ...Pulse Width Modulation PWM Module MCF52277 Reference Manual Rev 1 24 26 Freescale Semiconductor...
Страница 640: ...Programmable Interrupt Timers PIT0 PIT1 MCF52277 Reference Manual Rev 1 27 8 Freescale Semiconductor...
Страница 690: ...DMA Serial Peripheral Interface DSPI MCF52277 Reference Manual Rev 1 29 40 Freescale Semiconductor...
Страница 724: ...UART Modules MCF52277 Reference Manual Rev 1 30 34 Freescale Semiconductor...
Страница 740: ...I2 C Interface MCF52277 Reference Manual Rev 1 31 16 Freescale Semiconductor...
Страница 790: ...Debug Module MCF52277 Reference Manual Rev 1 32 50 Freescale Semiconductor...