Universal Serial Bus OTG Controller
UG0331 User Guide Revision 15.0
293
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 flow chart of the overall operation in the USB Device mode.
Figure 143 •
Basic USB Flow Diagram when USB Controller is in USB Device/Peripheral Mode
10.2.3.1.3 USB OTG Mode (Dual Role)
In this mode, the SmartFusion2 USB OTG controller must be configured in OTG mode by using the USB
controller register. Based on the type of the plug connected to the PHY through the USB OTG receptacle,
the controller plays a role as either the USB device or the USB host. If the plug/device with type microA is
connected, the corresponding interrupt generated to the USB controller and the firmware configures the
USB OTG controller into the USB Host mode. If the plug/device with microB is connected, the
corresponding USB interrupt will be generated to the Cortex-M3 processor and the firmware ISR will
configure the USB OTG controller into the USB Device mode.
START
STOP
Initialization
1. Disable/initialize the Watchdog Timer
2. Configure the GPIO for keeping the PHY out of reset
3. .
Register the callback functions and ISRs
4. Clear and enable the interrupts
5. .
In this mode USB OTG microB receptacle on board is
connected to PHY
6. .
Enable the controller in Device mode by using the soft
Connect
Wait for the host detection of this
device
Device will respond to all the
commands of the enumeration
from host
:
1. Set Address
2. Sending the descriptors
3. Set the configuration etc.
Device
Connected o
host ?
ON
Class specific
and application code
execution based on the host
commands to device
START
ISR to handle the USB interrupts in
Device mode
1. Reset
2. Endpoint 0 interrupt
3. TX Endpoint interrupt
4. RX Endpoint interrupt
STOP
YES
Содержание SmartFusion2 MSS
Страница 1: ...UG0331 User Guide SmartFusion2 Microcontroller Subsystem ...
Страница 166: ...Cortex M3 Processor Reference Material UG0331 User Guide Revision 15 0 132 ...
Страница 200: ...Embedded NVM eNVM Controllers UG0331 User Guide Revision 15 0 166 Figure 87 System Builder Window ...
Страница 407: ...Universal Serial Bus OTG Controller UG0331 User Guide Revision 15 0 373 ...
Страница 806: ...Fabric Interface Controller UG0331 User Guide Revision 15 0 772 Figure 345 FIC Master AHB Lite Subsystem ...