English
Language : 

SAM7X256_14 Datasheet, PDF (444/662 Pages) ATMEL Corporation – ARM-based Flash MCU
34.5.3.2 Entering Attached State
When no device is connected, the USB DP and DM signals are tied to GND by 15 KΩ pull-down resistors integrated in
the hub downstream ports. When a device is attached to a hub downstream port, the device connects a 1.5 KΩ pull-up
resistor on DP. The USB bus line goes into IDLE state, DP is pulled up by the device 1.5 KΩ resistor to 3.3V and DM is
pulled down by the 15 KΩ resistor of the host.
After pullup connection, the device enters the powered state. In this state, the UDPCK and MCK must be enabled in the
Power Management Controller. The transceiver can remain disabled.
34.5.3.3 From Powered State to Default State
After its connection to a USB host, the USB device waits for an end-of-bus reset. The unmaskable flag ENDBUSRES is
set in the register UDP_ISR and an interrupt is triggered.
Once the ENDBUSRES interrupt has been triggered, the device enters Default State. In this state, the UDP software
must:
 Enable the default endpoint, setting the EPEDS flag in the UDP_CSR[0] register and, optionally, enabling the
interrupt for endpoint 0 by writing 1 to the UDP_IER register. The enumeration then begins by a control transfer.
 Configure the interrupt mask register which has been reset by the USB reset detection
 Enable the transceiver clearing the TXVDIS flag in the UDP_TXVC register.
In this state UDPCK and MCK must be enabled.
Warning: Each time an ENDBUSRES interrupt is triggered, the Interrupt Mask Register and UDP_CSR registers have
been reset.
34.5.3.4 From Default State to Address State
After a set address standard device request, the USB host peripheral enters the address state.
Warning: Before the device enters in address state, it must achieve the Status IN transaction of the control transfer, i.e.,
the UDP device sets its new address once the TXCOMP flag in the UDP_CSR[0] register has been received and cleared.
To move to address state, the driver software sets the FADDEN flag in the UDP_GLB_STAT register, sets its new
address, and sets the FEN bit in the UDP_FADDR register.
34.5.3.5 From Address State to Configured State
Once a valid Set Configuration standard request has been received and acknowledged, the device enables endpoints
corresponding to the current configuration. This is done by setting the EPEDS and EPTYPE fields in the UDP_CSRx
registers and, optionally, enabling corresponding interrupts in the UDP_IER register.
34.5.3.6 Entering in Suspend State
When a Suspend (no bus activity on the USB bus) is detected, the RXSUSP signal in the UDP_ISR register is set. This
triggers an interrupt if the corresponding bit is set in the UDP_IMR register.This flag is cleared by writing to the UDP_ICR
register. Then the device enters Suspend Mode.
In this state bus powered devices must drain less than 500uA from the 5V VBUS. As an example, the microcontroller
switches to slow clock, disables the PLL and main oscillator, and goes into Idle Mode. It may also switch off other devices
on the board.
The USB device peripheral clocks can be switched off. Resume event is asynchronously detected. MCK and UDPCK
can be switched off in the Power Management controller and the USB transceiver can be disabled by setting the TXVDIS
field in the UDP_TXVC register.
Warning: Read, write operations to the UDP registers are allowed only if MCK is enabled for the UDP peripheral.
Switching off MCK for the UDP peripheral must be one of the last operations after writing to the UDP_TXVC and
acknowledging the RXSUSP.
34.5.3.7 Receiving a Host Resume
In suspend mode, a resume event on the USB bus line is detected asynchronously, transceiver and clocks are disabled
(however the pullup shall not be removed).
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
444