English
Language : 

SAM4L Datasheet, PDF (338/1185 Pages) ATMEL Corporation – ATSAM ARM-based Flash MCU
ATSAM4L4/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
USBC off:
USBE = 0
Clock stopped:
FRZCLK = 1
Reset
USBE = 0
HW
RESET
USBE = 1
UIMOD = 1
USBE = 0 USBE = 1
UIMOD = 0
Device
USBE = 0
<any
other
state>
Host
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 Section 17.6.2 for the basic operation of the device mode.
Refer to Section 17.6.3 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.
42023C–SAM–02/2013
338