Datasheet
135
4337K–USB–04/08
AT89C5130A/31A-M
When the USB controller receives the SET_FEATURE request: DEVICE_REMOTE_WAKEUP,
the firmware will set to 1 the RMWUPE bit in the USBCON register to enable this functionality.
RMWUPE value will be 0 in the other cases.
If the device is in SUSPEND mode, the USB controller can send an upstream resume by clear-
ing first the SPINT bit in the USBINT register and by setting then to 1 the SDRMWUP bit in the
USBCON register. The USB controller sets to 1 the UPRSM bit in the USBCON register. All
clocks must be enabled first. The Remote Wake is sent only if the USB bus was in Suspend
state for at least 5 ms. When the upstream resume is completed, the UPRSM bit is reset to 0 by
hardware. The firmware will then clear the SDRMWUP bit.
Figure 21-12. Example of REMOTE WAKEUP Management
21.9 Detach Simulation
In order to be re-enumerated by the Host, the AT89C5130A/31A-M has the possibility to simu-
late a DETACH - ATTACH of the USB bus.
The V
REF
output voltage is between 3.0V and 3.6V. This output can be connected to the D+ pull-
up as shown in Figure 21-13. This output can be put in high-impedance when the DETACH bit is
set to 1 in the USBCON register. Maintaining this output in high impedance for more than 3 µs
will simulate the disconnection of the device. When resetting the DETACH bit, an attach is then
simulated.
USB Controller Init
Detection of a SUSPEND State
SPINT
Set RMWUPE
Suspend Management
Enable Clocks
Upstream RESUME Sent
UPRSM
Clear SPINT
Set SDMWUP
Clear SDRMWUP
SET_FEATURE: DEVICE_REMOTE_WAKEUP
Need USB Resume
UPRSM = 1