English
Language : 

K60P100M100SF2RM Datasheet, PDF (1267/1809 Pages) Freescale Semiconductor, Inc – K60 Sub-Family Reference Manual
Chapter 45 Universal Serial Bus OTG Controller (USBOTG)
45.5 OTG and Host Mode Operation
The Host Mode logic allows devices such as digital cameras and palmtop computers to
function as a USB Host Controller. The OTG logic adds an interface to allow the OTG
Host Negotiation and Session Request Protocols (HNP and SRP) to be implemented in
software. Host Mode allows a peripheral such as a digital camera to be connected directly
to a USB compliant printer. Digital photos can then be easily printed without having to
upload them to a PC. In the palmtop computer application, a USB compliant keyboard/
mouse can be connected to the palmtop computer with the obvious advantages of easier
interaction.
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.
45.6 Host Mode Operation Examples
The following sections illustrate the steps required to perform USB host functions using
the USB-FS core. While it is useful to understand the interaction of the hardware and the
software at a detailed level, 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). The pull-down resistors are
enabled, and pull-up disabled. Start of Frame (SOF) generation begins. SOF counter
loaded with 12,000. Disable SOF packet generation to eliminate noise on the USB by
writing the USB enable bit to 0 (CTL[USB_EN]=0).
K60 Sub-Family Reference Manual, Rev. 6, Nov 2011
Freescale Semiconductor, Inc.
1267