Datasheet
SAM3X / SAM3A [DATASHEET]
Atmel-11057C-ATARM-SAM3X-SAM3A-Datasheet_23-Mar-15
1068
See Section 39.5.1.6 for more details about DPRAM management.
39.5.2.6 Address Setup
The USB device address is set up according to the USB protocol.
After all kinds of resets, the USB device address is 0.
The host starts a SETUP transaction with a SET_ADDRESS (addr) request.
The user writes this address to the USB Address (UOTGHS_DEVCTRL.UADD) field, and writes a zero to
the Address Enable (UOTGHS_DEVCTRL.ADDEN) bit, so the actual address is still 0.
The user sends a zero-length IN packet from the control endpoint.
The user enables the recorded USB device address by writing a one to UOTGHS_DEVCTRL.ADDEN.
Once the USB device address is configured, the controller filters the packets to only accept those targeting the
address stored in UOTGHS_DEVCTRL.UADD.
UOTGHS_DEVCTRL.UADD and UOTGHS_DEVCTRL.ADDEN shall not be written all at once.
UOTGHS_DEVCTRL.UADD and UOTGHS_DEVCTRL.ADDEN are cleared:
on a hardware reset,
when the UOTGHS is disabled (UOTGHS_CTRL.USBE written to zero),
when a USB reset is detected.
When UOTGHS_DEVCTRL.UADD or UOTGHS_DEVCTRL.ADDEN is cleared, the default device address 0 is
used.
39.5.2.7 Suspend and Wake-up
When an idle USB bus state has been detected for 3 ms, the controller sets the Suspend
(UOTGHS_DEVISR.SUSP) interrupt bit. The user may then write a one to the UOTGHS_CTRL.FRZCLK bit to
reduce the power consumption.
To recover from the Suspend mode, the user shall wait for the Wake-Up (UOTGHS_DEVISR.WAKEUP) interrupt
bit, which is set when a non-idle event is detected, then write a zero to UOTGHS_CTRL.FRZCLK.
As the UOTGHS_DEVISR.WAKEUP interrupt bit is set when a non-idle event is detected, it can occur whether the
controller is in the Suspend mode or not. The UOTGHS_DEVISR.SUSP and UOTGHS_DEVISR.WAKEUP
interrupts are thus independent, except that one bit is cleared when the other is set.
39.5.2.8 Detach
The reset value of the UOTGHS_DEVCTRL.DETACH bit is one.
It is possible to initiate a device re-enumeration by simply writing a one then a zero to
UOTGHS_DEVCTRL.DETACH.
UOTGHS_DEVCTRL.DETACH acts on the pull-up connections of the D+ and D- pads. See “Device mode” for
further details.
39.5.2.9 Remote Wake-up
The Remote Wake-Up request (also known as Upstream Resume) is the only one the device may send on its own
initiative, but the device should have beforehand been allowed to by a DEVICE_REMOTE_WAKEUP request from
the host.
First, the UOTGHS must have detected a “Suspend” state on the bus, i.e. the Remote Wake-Up request can
only be sent after a UOTGHS_DEVISR.SUSP interrupt has been set.
The user may then write a one to the Remote Wake-Up (UOTGHS_DEVCTRL.RMWKUP) bit to send an
upstream resume to the host for a remote wake-up. This will automatically be done by the controller after
5ms of inactivity on the USB bus.










