Atmel SAM4L Xplained Pro Evaluation Kit Atmel ATSAM4L-XPRO ATSAM4L-XPRO Data Sheet

Product codes
ATSAM4L-XPRO
Page of 1204
344
42023E–SAM–07/2013
ATSAM4L8/L4/L2
17.6
Functional Description
17.6.1
USB General Operation
17.6.1.1
Initialization
After a hardware reset, the USBC is disabled. When enabled, the USBC runs in either device
mode or in host mode according to the ID detection.
The USBC Mode (USBCON.UIMOD) should be configured to set the USBC controller in either
Host mode or Device mode.
Figure 17-2. General states
After a hardware reset, the USBC is in the Reset state. In this state:
• The module is disabled. The USBC Enable bit in the General Control register 
(USBCON.USBE) is reset.
• The module clock is stopped in order to minimize power consumption. The Freeze USB Clock 
bit in USBCON (USBCON.FRZCLK) is set.
• The USB pad is in suspend mode.
• The internal states and registers of the device and host modes are reset.
• The Freeze USB Clock (FRZCLK), USBC Enable (USBE), USBC Mode (UIMOD) in 
USBCON, and the Low-Speed mode bit in the Device General Control register (UDCON.LS) 
can be written to by software, so that the user can configure pads and speed before enabling 
the module. These values are only taken into account once the module has been enabled 
and unfrozen.
After writing a one to USBCON.USBE, the USBC enters device or host mode (according to
UIMOD) in idle state.
Refer to 
 for the basic operation of the device mode.
Refer to 
 for the basic operation of the host mode.
The USBC can be disabled at any time by writing a zero to USBCON.USBE, this acts as a hard-
ware reset, except that the FRZCLK and UIMOD bits in USBCON, and the LS bits in UDCON
are not reset.
Device
Reset
USBE = 0
<any
other
state>
USBE = 1
UIMOD = 1
USBC off:
USBE = 0
Clock stopped:
FRZCLK = 1
USBE = 0
Host
USBE = 0
HW
RESET
USBE = 1
UIMOD = 0