Figure 50. USB Connection
ON
Out
UBIAS
UVCON
RUFT
RUFT
UVCC
UID
RUB
CUB
DPF
DMF
OTG 5V
Generator
D+
D-
ID
UVSS
DPH
DMH
VBUS
GND
VSS
General Operating Modes
Introduction
After a hardware reset, the USB controller is disabled.
When enabled, the USB controller has to run the Device Controller or the Host Control-
ler. This is performed using the ID detection.
•
If the ID pin is not connected to ground, the ID bit is set by hardware (internal pull up
on the UID pad) and the USB Device controller is selected.
•
The ID bit is cleared by hardware when a low level has been detected on the ID pin.
The Device controller is then disabled and the Host controller enabled.
The software anyway has to select the mode (Host, Device) in order to access to the
Device controller registers or to the Host controller registers, which are multiplexed. For
example, even if the USB controller has detected a Device mode (pin ID high), the soft-
ware shall select the device mode (bit HOST cleared), otherwise it will access to the
host registers. This is also true for the Host mode.
Power-On and Reset
Figure 51 shows the USB controller main states after power-on.
Figure 51. USB Controller Reset State Machine
Clockstopped
FRZCLK=1
Mac rooff
<anyother
state>
USBE=0
Reset
HW
RESET
USBE=1
ID=1
USBE=0
USBE=0
USBE=1
ID=0
USBE=0
Dev ice
Host
USB Controller state after an hardware reset is ‘Reset’. In this state:
•
•
USBE is not set,
the macro clock is stopped in order to minimize the power consumption
(FRZCLK=1),
•
•
•
the macro is disabled,
the pad is in the suspend mode,
the Host and Device USB controllers internal states are reset.
86
AT85C51SND3Bx
7632A–MP3–03/06