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

Product codes
ATSAM4L-XPRO
Page of 1204
361
42023E–SAM–07/2013
ATSAM4L8/L4/L2
Figure 17-15. USB Communication Flow
In host mode, the USBC associates a pipe to a device endpoint, according to the device config-
uration descriptors.
17.6.3.4
USB reset
The USBC sends a USB reset signal when the user writes a one to the Send USB Reset bit
(UHCON.RESET). When the USB reset has been sent, the USB Reset Sent Interrupt bit in the
Host Global Interrupt register (UHINT.RSTI) is set and all the pipes will be disabled.
If the bus was previously in a suspended state (UHCON.SOFE is zero) the USBC will switch it to
the Resume state, causing the bus to asynchronously trigger the Host Wakeup Interrupt
(UHINT.HWUPI). The SOFE bit will be set in order to generate SOF’s immediately after the USB
reset.
17.6.3.5
Pipe activation
A disabled pipe is inactive, and will be reset along with its context registers (UPCONn, UPSTAn,
UPINRQn, and UPCFGn). Enabling a pipe is done by writing a one to the Pipe n Enable bit in
the Pipe Enable/Reset Register (UPRST.PENn).
When starting an enumeration, the user gets the device descriptor by sending an
GET_DESCRIPTOR USB request. This descriptor contains the maximal packet size of the
device default control endpoint (bMaxPacketSize0) which the user should use to reconfigure the
size of the default control pipe.
17.6.3.6
Address setup
Once the device has answered the first host requests with the default device address 0, the host
assigns a new address to the device. The host controller has to send a USB reset to the device
and a SET_ADDRESS(addr) SETUP request with the new address to be used by the device.
Once this SETUP transaction is over, the user writes to the device address field in the “control
a n d   s t a t u s   1   o f   e n d p o i n t   n ”   w o r d   o f   t h e   h o s t ’ s   p i p e   n   i n   t h e   U S B   d e s c r i p t o r
(Pn_CTR_STA1.PDADDR). All following requests by this pipe will be performed using this new
address.