English
Language : 

AT90USB1287_14 Datasheet, PDF (246/456 Pages) ATMEL Corporation – Non-volatile program and data memories
22.4 General operating modes
22.4.1
Introduction
After a hardware reset, the USB controller is disabled. When enabled, the USB controller has to
run the Device Controller or the Host Controller. This is performed using the USB ID detection.
• If the ID pin is not connected to ground, the USB 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 software shall select the
device mode (bit HOST cleared), otherwise it will access to the host registers. This is also true
for the Host mode.
Note: For the Atmel AT90USB646/1286 products the Host mode is not included in the USB controller,
and the ID pin is not used and should be configured and used as a general I/O.
22.4.2
Power-on and reset
The next diagram explains the USB controller main states on power-on:
Figure 22-9. USB controller states after reset.
Clock stopped
F R Z C LK= 1
M acro off
U SBE= 0
<any other
state>
R eset
HW
R ESET
U SBE= 1
ID = 1
U SBE= 0
USBE=0 USBE=1
ID = 0
D ev ice
U SBE= 0
A T 90USB646/ 1286f orcedm ode
H o st
AT 90US B647/ 1287only
USB Controller state after an hardware reset is ‘Reset’. In this state:
• USBE is not set
• the USB controller clock is stopped in order to minimize the power consumption (FRZCLK=1)
• the USB controller is disabled
• the USB pad is in the suspend mode
• the Host and Device USB controllers internal states are reset
After setting USBE, the USB Controller enters in the Host or in the Device state (according to the
USB ID pin). The selected controller is ‘Idle’.
The USB Controller can at any time be ‘stopped’ by clearing USBE. In fact, clearing USBE acts
as an hardware reset.
246 AT90USB64/128
7593L–AVR–09/12