DocID024597 Rev 3 1219/1693
RM0351 Universal synchronous asynchronous receiver transmitter (USART)
1282
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 baudrate allowing to wakeup correctly
from stop mode when the USART clock source is the HSI clock
The maximum baudrate allowing to wakeup correctly from stop mode depends on:
• the parameter t
WUSTOP
(wakeup time from Stop mode) provided in the device
datasheet
• the USART receiver tolerance provided in the Section 36.5.5: Tolerance of the USART
receiver to clock deviation.
Let's take this example: OVER8 = 0, M bits = 01, ONEBIT = 0, BRR [3:0] = 0000
In these conditions, according to Table 194: Tolerance of the USART receiver when BRR
[3:0] = 0000, the USART receiver tolerance is 3.41 %.
DTRA + DQUANT + DREC + DTCL + DWU < USART receiver's tolerance
DWU max = t
WUSTOP
/ (11 x Tbit Min)
Tbit Min = t
WUSTOP
/ (11 x DWU max)
If we consider an ideal case where the parameters DTRA, DQUANT, DREC and DTCL are
at 0%, the DWU max is 3.41 %. In reality, we need to consider at least the HSI inaccuracy.
Let's consider the HSI inaccuracy = 1 %, t
WUSTOP
= 3 s (values provided as example, for
correct values, please refer to the device datasheet).
DWU max = 3.41 % - 1 % = 2.41 %
Tbit min = 3 s / (11 2.41 %) = 11.32 s
In these conditions, the maximum baudrate allowing to wakeup correctly from stop mode is
1/11.32 s = 88.36 Kbaud.