9.2.3.1.2 USB Device/Peripheral Mode

In this mode, the USB OTG controller acts as a USB device, and device functionality are defined by the standard- class- specific or vendor- specific- class firmware and application implementations. In this mode, the USB controller; along with associated firmware, class drivers, and application code, responds to the USB commands sent by the USB host that is connected.

The USB controller allows its connection to the USB bus to be controlled by the software. When the USB controller operates in Peripheral mode, the UTMI+-compliant PHY that is used alongside the USB controller, can be switched between normal mode and non-driving mode by setting/clearing the Soft Conn bit in Table 9-11.

When the Soft Conn bit is set to 1, the PHY is placed in its normal mode and the D+/D- lines of the USB bus are enabled. When this feature is enabled and the Soft Conn bit is zero, the PHY is put into 
non-driving mode (OPMODE[1:0] set to 01) and D+ and D- are tristated. The USB controller then appears to other devices on the USB bus to have been disconnected.

After hardware reset, Soft Conn is cleared to 0. The USB controller therefore appears disconnected until the software has set Soft Conn to 1. The application software can then choose when to set the PHY into its normal mode. Systems with a lengthy initialization procedure may use this to ensure that initialization is completed and the system is ready to perform enumeration before connecting to the USB.

The following figure shows the flowchart of the overall operation in the USB Device mode.

Figure 9-6. Basic USB Flow Diagram when USB Controller is in USB Device/Peripheral Mode