![](http://datasheet.mmic.net.cn/30000/MR80C52CXXX-20SCR_datasheet_2377250/MR80C52CXXX-20SCR_88.png)
88
32142D–06/2013
ATUC64/128/256L3/4U
8.6.2
USBC Device Mode Operation
8.6.2.1
Device Enabling
In device mode, the USBC supports full- and low-speed data transfers.
Including the default control endpoint, a total of seven endpoints are provided. They can be con-
After a hardware reset, the USBC device mode is in the reset state (see
Section 8.6.1.1). In this
state, the endpoint banks are disabled and neither DP nor DM are pulled up (DETACH is one).
DP or DM will be pulled up according to the selected speed as soon as the DETACH bit is writ-
When the USBC is enabled (USBE is one) in device mode, it enters the Idle state, minimizing
power consumption. Being in Idle state does not require the USB clocks to be activated.
The USBC device mode can be disabled or reset at any time by disabling the USBC (by writing
a zero to USBE).
8.6.2.2
USB reset
The USB bus reset is initiated by a connected host and managed by hardware.
When a USB reset state is detected on the USB bus, the following operations are performed by
the controller:
UDCON register is reset except for the DETACH and SPDCONF bits.
Device Frame Number Register (UDFNUM), Endpoint n Configuration Register (UECFGn),
and Endpoint n Control Register (UECONn) registers are cleared.
The data toggle sequencing in all the endpoints are cleared.
At the end of the reset process, the End of Reset (EORST) bit in the UDINT register is set.
8.6.2.3
Endpoint activation
When an endpoint is disabled (UERST.EPENn = 0) the data toggle sequence, Endpoint n Status
Set (UESTAn), and UECONn registers will be reset. The controller ignores all transactions to
this endpoint as long as it is inactive.
To complete an endpoint activation, the user should fill out the endpoint descriptor: see
Figure 8-8.6.2.4
Data toggle sequence
In order to respond to a CLEAR_FEATURE USB request without disabling the endpoint, the
user can clear the data toggle sequence by writing a one to the Reset Data Toggle Set bit in the
Endpoint n Control Set register (UECONnSET.RSTDTS)
8.6.2.5
Busy bank enable
In order to make an endpoint bank look busy regardless of its actual state, the user can write a
one to the Busy Bank Enable bit in the Endpoint n Control Register (UECONnSET.BUSY0/1ES).
If a BUSYnE bit is set, any transaction to this bank will be rejected with a NAK reply.
8.6.2.6
Address setup
The USB device address is set up according to the USB protocol.