ST STM32G0 1 Series Reference Manual page 1280

Table of Contents

Advertisement

Universal serial bus full-speed host/device interface (USB)
The actual procedure used to suspend the USB peripheral is device dependent since
according to the device composition, different actions may be required to reduce the total
consumption.
A brief description of a typical suspend procedure is provided below, focused on the USB-
related aspects of the application software routine responding to the SUSP notification of
the USB peripheral:
1.
Set the SUSPEN bit in the USB_CNTR register to 1. This action activates the suspend
mode within the USB peripheral. As soon as the suspend mode is activated, the check
on SOF reception is disabled to avoid any further SUSP interrupts being issued while
the USB is suspended.
2.
Remove or reduce any static power consumption in blocks different from the USB
peripheral.
3.
Set SUSPRDY bit in USB_CNTR register to 1 to remove static power consumption in
the analog USB transceivers but keeping them able to detect resume activity.
4.
Optionally turn off external oscillator and device PLL to stop any activity inside the
device.
When an USB event occurs while the device is in SUSPEND mode, the RESUME
procedure must be invoked to restore nominal clocks and regain normal USB behavior.
Particular care must be taken to insure that this process does not take more than 10 ms
when the wakening event is an USB reset sequence (see "Universal Serial Bus
Specification" for more details). The start of a resume or reset sequence, while the USB
peripheral is suspended, clears the SUSPRDY bit in USB_CNTR register asynchronously.
Even if this event can trigger a WKUP interrupt if enabled, the use of an interrupt response
routine must be carefully evaluated because of the long latency due to system clock restart;
to have the shorter latency before re-activating the nominal clock it is suggested to put the
resume procedure just after the end of the suspend one, so its code is immediately
executed as soon as the system clock restarts. To prevent ESD discharges or any other kind
of noise from waking-up the system (the exit from suspend mode is an asynchronous
event), a suitable analog filter on data line status is activated during suspend; the filter width
is about 70 ns.
The following is a list of actions a resume procedure should address:
1.
Optionally turn on external oscillator and/or device PLL.
2.
Clear SUSPEN bit of USB_CNTR register.
3.
If the resume triggering event has to be identified, bits RXDP and RXDM in the
USB_FNR register can be used according to
software action in all the cases. If required, the end of resume or reset sequence can
be detected monitoring the status of the above mentioned bits by checking when they
reach the "10" configuration, which represent the idle bus state; moreover at the end of
a reset sequence the RST_DCON bit in USB_ISTR register is set to 1, issuing an
interrupt if enabled, which should be handled as usual.
1280/1390
Table
RM0444 Rev 5
222, which also lists the intended
RM0444

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32G0 1 Series and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF