6 host mode operation examples, 6 host mode operation examples -34 – Freescale Semiconductor ColdFire MCF52210 User Manual

Page 262

Advertising
background image

Universal Serial Bus, OTG Capable Controller

MCF52211 ColdFire® Integrated Microcontroller Reference Manual, Rev. 2

15-34

Freescale Semiconductor

Host mode is intended for use in handheld-portable devices to allow easy connection to simple HID class
devices such as printers and keyboards. It is NOT intended to perform the functions of a full OHCI or
UHCI compatible host controller found on PC motherboards. The USB-FS is not supported by Windows
98 as a USB host controller. Host mode allows bulk, Isochronous, interrupt and control transfers. Bulk data
transfers are performed at nearly the full USB bus bandwidth. Support is provided for ISO transfers, but
the number of ISO streams that can be practically supported is affected by the interrupt latency of the
processor servicing the token during interrupts from the SIE. Custom drivers must be written to support
Host mode operation.

Setting the HOST_MODE_EN bit in the CTL register enables host Mode. The USB-FS core can only
operate as a peripheral device or in Host Mode. It cannot operate in both modes simultaneously. When
HOST_MODE is enabled, only endpoint zero is used. All other endpoints should be disabled by software.

15.6

Host Mode Operation Examples

The following sections illustrate the steps required to perform USB host functions using the USB-FS core.
The following sections are useful to understand the interaction of the hardware and the software at a
detailed level, but an understanding of the interactions at this level is not required to write host applications
using the API software.

To enable host mode and discover a connected device:

1. Enable Host Mode (CTL[HOST_MODE_EN]=1). Pull down resistors enabled, pull-up disabled.

SOF generation begins. SOF counter loaded with 12,000. Eliminate noise on the USB by disabling
Start of Frame packet generation by writing the USB enable bit to 0 (CTL[USB_EN]=0).

2. Enable the ATTACH interrupt (INT_ENB[ATTACH]=1).

3. Wait for ATTACH interrupt (INT_STAT[ATTACH]). Signaled by USB Target pull-up resistor

changing the state of DPLUS or DMINUS from 0 to 1 (SE0 to J or K state).

4. Check the state of the JSTATE and SE0 bits in the control register. If the JSTATE bit is 0 then the

connecting device is low speed. If the connecting device is low speed then set the low speed bit in
the address registers (ADDR[LS_EN]=1) and the host the host without hub bit in endpoint 0
register control (EP_CTL0[HOST_WO_HUB]=1).

5. Enable RESET (CTL[RESET]=1) for 10 ms

6. Enable SOF packet to keep the connected device from going to suspend (CTL[USB_EN=1])

7. Start enumeration by sending a sequence of Chapter 9, device frame work packets to the default

control pipe of the connected device.

Advertising
This manual is related to the following products: