Rainbow Electronics AT91CAP9S250A User Manual

Page 871

Advertising
background image

871

6264A–CAP–21-May-07

AT91CAP9S500A/AT91CAP9S250A

44.4.12.2

Not Powered State

Self powered devices can detect 5V VBUS using a PIO. When the device is not connected to a
host, device power consumption can be reduced by the DETACH bit in UDPHS_CTRL. Dis-
abling the transceiver is automatically done. HSDM, HSDP, FSDP and FSDP lines are tied to
GND pull-downs integrated in the hub downstream ports.

44.4.12.3

Entering Attached State

When no device is connected, the USB FSDP and FSDM signals are tied to GND by 15 K

pull-

downs integrated in the hub downstream ports. When a device is attached to an hub down-
stream port, the device connects a 1.5 K

pull-up on FSDP. The USB bus line goes into IDLE

state, FSDP is pulled-up by the device 1.5 K

resistor to 3.3V and FSDM is pulled-down by the

15 K

resistor to GND of the host.

After pull-up connection, the device enters the powered state. The transceiver remains disabled
until bus activity is detected.

In case of low power consumption need, the device can be stopped. When the device detects
the VBUS, the software must enable the USB transceiver by enabling the EN_UDPHS bit in
UDPHS_CTRL register.

The software can detach the pull-up by setting DETACH bit in UDPHS_CTRL register.

44.4.12.4

From Powered State to Default State (Reset)

After its connection to a USB host, the USB device waits for an end-of-bus reset. The unmasked
flag ENDRESET is set in the UDPHS_IEN register and an interrupt is triggered.

Once the ENDRESET interrupt has been triggered, the device enters Default State. In this state,
the UDPHS software must:

• Enable the default endpoint, setting the EPT_ENABL flag in the UDPHS_EPTCTLENB[0]

register and, optionally, enabling the interrupt for endpoint 0 by writing 1 in EPT_INT_0 of the
UDPHS_IEN 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.

In this state, the EN_UDPHS bit in UDPHS_CTRL register must be enabled.

44.4.12.5

From Default State to Address State (Address Assigned)

After a Set Address standard device request, the USB host peripheral enters the address state.

Warning: before the device enters address state, it must achieve the Status IN transaction of
the control transfer, i.e., the UDPHS device sets its new address once the TX_COMPLT flag in
the UDPHS_EPTCTL[0] register has been received and cleared.

To move to address state, the driver software sets the DEV_ADDR field and the FADDR_EN
flag in the UDPHS_CTRL register.

44.4.12.6

From Address State to Configured State (Device Configured)

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
BK_NUMBER, EPT_TYPE, EPT_DIR and EPT_SIZE fields in the UDPHS_EPTCFGx registers
and enabling them by setting the EPT_ENABL flag in the UDPHS_EPTCTLENBx registers, and,
optionally, enabling corresponding interrupts in the UDPHS_IEN register.

Advertising