DocID025202 Rev 7
876/1080
RM0365
Universal synchronous asynchronous receiver transmitter (USART)
901
USART is not requesting it. The LSE clock is not OFF but there is a clock gating to
avoid useless consumption.
The MCU wakeup from Stop mode can be done using the standard RXNE interrupt. In this
case, the RXNEIE bit must be set before entering Stop mode.
Alternatively, a specific interrupt may be selected through the WUS bit fields.
In order to be able to wake up the MCU from Stop mode, the UESM bit in the USART_CR1
control register must be set prior to entering Stop mode.
When the wakeup event is detected, the WUF flag is set by hardware and a wakeup
interrupt is generated if the WUFIE bit is set.
Note:
Before entering Stop mode, the user must ensure that the USART is not performing a
transfer. BUSY flag cannot ensure that Stop mode is never entered during a running
reception.
The WUF flag is set when a wakeup event is detected, independently of whether the MCU is
in Stop or in an active mode.
When entering Stop mode just after having initialized and enabled the receiver, the REACK
bit must be checked to ensure the USART is actually enabled.
When DMA is used for reception, it must be disabled before entering Stop mode and re-
enabled upon exit from Stop mode.
The wakeup from Stop mode feature is not available for all modes. For example it doesn’t
work in SPI mode because the SPI operates in master mode only.
Using Mute mode with Stop mode
If the USART is put into Mute mode before entering Stop mode:
•
Wakeup from Mute mode on idle detection must not be used, because idle detection
cannot work in Stop mode.
•
If the wakeup from Mute mode on address match is used, then the source of wake-up
from Stop mode must also be the address match. If the RXNE flag is set when entering
the Stop mode, the interface will remain in mute mode upon address match and wake
up from Stop.
•
If the USART is configured to wake up the MCU from Stop mode on START bit
detection, the WUF flag is set, but the RXNE flag is not set.
Determining the maximum USART baud rate allowing to wakeup correctly
from Stop mode when the USART clock source is the HSI clock
The maximum baud rate allowing to wakeup correctly from stop mode depends on:
•
the parameter t
WUUSART
provided in the device datasheet
•
the USART receiver tolerance provided in the
Section 29.5.5: Tolerance of the USART
.
Let us take this example: OVER8 = 0, M bits = 10, ONEBIT = 1, BRR [3:0] = 0000.
In these conditions, according to
Table 155: Tolerance of the USART receiver when BRR
, the USART receiver tolerance is 4.86 %.
DTRA + DREC + DTCL + DWU < USART receiver's tolerance
DWU max = t
WUUSART
/ (9 x Tbit Min)
Tbit Min = t
WUUSART
/ (9 x DWU max)