![Freescale Semiconductor MCF54455 Скачать руководство пользователя страница 263](http://html1.mh-extra.com/html/freescale-semiconductor/mcf54455/mcf54455_reference-manual_2330541263.webp)
Universal Serial Bus Interface – On-The-Go Module
10-56
Freescale Semiconductor
10.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.
10.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. Program the PORTSC1[PTS] field if using a non-ULPI PHY.
4. 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 10.3.4.3, “USB Interrupt Enable Register
Section 10.3.4.2, “USB Status Register (USBSTS).”
5. Set the USBMODE[CM] field to enable device mode, and set the USBMODE[ES] bit for big
endian operation.
6. Optionally write the USBCMD register to set the desired interrupt threshold.
7. Set USBMODE[SLOM] to disable setup lockouts.
8. Initialize the EPLISTADDR.
9. Create two dQHs for endpoint 0—one for IN transactions and one for OUT transactions.
For information on device queue heads, refer to
Section 10.5.2.1, “Endpoint Queue Head.”
10. Set the CCM’s UOCSR[BVLD] bit to allow device to connect to a host.
11. 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.
Содержание MCF54455
Страница 33: ...xxviii Freescale Semiconductor ...
Страница 67: ...Freescale Semiconductor 1 ...
Страница 125: ...Freescale Semiconductor 1 ...
Страница 145: ...Enhanced Multiply Accumulate Unit EMAC 5 21 Freescale Semiconductor ...
Страница 173: ...Cache 6 28 Freescale Semiconductor ...
Страница 179: ...Static RAM SRAM 7 6 Freescale Semiconductor ...
Страница 207: ...Power Management 9 16 Freescale Semiconductor ...
Страница 323: ...Reset Controller Module 13 8 Freescale Semiconductor ...
Страница 389: ...Pin Multiplexing and Control 16 44 Freescale Semiconductor ...
Страница 575: ...PCI Bus Controller 22 58 Freescale Semiconductor ...
Страница 600: ...Advanced Technology Attachment ATA Freescale Semiconductor 23 25 ...
Страница 601: ...Freescale Semiconductor 1 ...
Страница 842: ...I2 C Interface Freescale Semiconductor 33 16 ...
Страница 843: ...Freescale Semiconductor 1 ...
Страница 921: ...Revision History A 6 Freescale Semiconductor ...