At8xc51snd1c – Rainbow Electronics AT89C51SND1C User Manual

Page 96

Advertising
background image

96

AT8xC51SND1C

4109E–8051–06/03

Upstream Resume

A USB device can be allowed by the Host to send an upstream resume for Remote
Wake-up purpose.

W h e n t h e U S B c o n t r o l l e r r e c e i v e s t h e S E T _ F E A T U R E r e q u e s t :
DEVICE_REMOTE_WAKEUP, the firmware should set to 1 the RMWUPE bit in the
USBCON register to enable this functionality. RMWUPE value should be 0 in the other
cases.

If the device is in SUSPEND mode, the USB controller can send an upstream resume by
clearing first the SPINT bit in the USBINT register and by setting then to 1 the SDRM-
WUP 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 5ms. When the upstream resume is com-
pleted, the UPRSM bit is reset to 0 by hardware. The firmware should then clear the
SDRMWUP bit.

Figure 67. Example of REMOTE WAKEUP Management

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

Advertising