![Texas Instruments AM1808 Technical Reference Manual Download Page 1611](http://html.mh-extra.com/html/texas-instruments/am1808/am1808_technical-reference-manual_10945581611.webp)
Architecture
1611
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Universal Serial Bus 2.0 (USB) Controller
34.2.4 USB PHY Initialization
Two boot configuration registers, pin multiplexing control registers, and chip configuration 2 register
(CFGCHIP2) are used to configure the multiplexed pins for USB 2.0 uses. See the
System Configuration
(SYSCFG) Module
chapter for more information on the pin multiplexing control registers and CFGCHIP2.
The general procedure for USB PHY initialization starts by releasing the PHY from reset and programming
the corresponding bits within the pin multiplexing control registers and CFGCHIP2, for achieving the
multiplexed pins for the use of the USB2.0. Next, configuring PHY input clock related information and
other PHY general configuration attributes.
When the USB2.0 controller assumes the role of a host, it is tasked to source the required 5V supply via
USB0_VBUS (must be at least
≥
4.75V) pin. The USB2.0 controller makes use of an external charge
pump or logic by enabling and disabling the external power logic from the USB2.0 controller core level. It
uses the USB0_DRVVBUS for controlling the enable/disable state of the external power logic. In order to
achieve this task, the pin multiplexing control registers should be configured accordingly to map the
USB0_DRVVBUS pin to be used for USB2.0 purposes. In addition, the source (internal or external) and
frequency of the PHY clock should be identified and should be configured by the firmware. This is
achieved using CFGCHIP2. Other PHY related fields within CFGCHIP2 should be programmed as:
USB0PHYPWDN and USB0OTGPWRDN should be cleared to 0 and USB0DATPOL, USB0SESNDEN,
and USB0VBDTCTEN should be set to 1. This will configure the PHY for normal operation as well as also
turn on the PHYs VBUS comparator logic. The final task is to turn on the PHY PLL and wait until it locks.
You should wait for the PHY clock good status to be set prior to ending the PHY initialization process.
34.2.5 VBUS Voltage Sourcing Control
When the USB controller assumes the role of a host, it is required to supply 5V power to an attached
device through its VBUS line. In order to achieve this task, the USB controller requires the use of an
external logic (or charge pump) capable of sourcing 5V power. A USB_DRVVBUS is used as a control
signal to enable/disable the external logic to either source or disable power on the VBUS line. This control
is automatic and is handled by the controller. The USB controller drives the USB_DRVVBUS signal high
when it assumes the role of a host while the controller is in Session. When assuming the role of a device,
the controller drives the USB_DRVVBUS signal low disabling the external charge pump; hence, no power
is driven on the VBUS line.
34.2.6 Dynamic FIFO Sizing
The USB controller supports a total of 4K RAM to dynamically allocate FIFO to all endpoints. The
allocation of FIFO space to the different endpoints requires the specification for each Tx and Rx endpoint
of:
•
The start address of the FIFO within the RAM block
•
The maximum size of packet to be supported
•
Whether double-buffering is required.
These details are specified through four registers, which are added to the indexed area of the memory
map. That is, the registers for the desired endpoint are accessed after programming the INDEX register
with the desired endpoint value.
,
,
, and
provide details of these registers.
NOTE:
The option of dynamically setting FIFO sizes only applies to Endpoints 1-4. The Endpoint 0
FIFO has a fixed size (64 bytes) and a fixed location (start address 0).
It is the responsibility of the firmware to ensure that all the Tx and Rx endpoints that are
active in the current USB configuration have a block of RAM assigned exclusively to that
endpoint. The RAM must be at least as large as the maximum packet size set for that
endpoint.