Skip to main content
Visitor II
May 9, 2018
Question

Waking up from STOP mode using UART

  • May 9, 2018
  • 1 reply
  • 1704 views
Posted on May 09, 2018 at 22:36

I am using STM32L051 mcu. The mcu goes to STOP mode after initialization and only wakes up if there is any incoming byte at USART1. MCU wakes up with START_BIT_DETECTION on USART1 and goes back to sleep after it receives a byte. Everything works fine.

The problem occurs when I receive a frame error. The other device that is connected with the USART1 sometimes holding the Rx Bus low which leads to a frame error. If I get a frame error I cleared the Frame Error bit, read the byte anynway and go back to STOP mode. But after that no other USART byte can wake up the MCU.

I tried to debug through line by line. Interestingly, when I enable debug I don't have that problem. Maybe that's because I set DBGMCU->CR's  DBGMCU_CR_DBG_STOP bit.

So, I am out of ideas why it doesn't wake up after frame error. Any hint, idea, direction would be much appreciated.

#stop-mode #stm32l0-uart
    This topic has been closed for replies.

    1 reply

    Graduate
    April 29, 2024

    I have the same issue for STM32L4 series on stop mode 2.

    The baudrate is 115200. If I reduce the baudrate, is it a solution?

    Super User
    April 29, 2024

    @hkoc_poelsan wrote:

    If I reduce the baudrate, is it a solution?


    Have you tried it?

    Graduate
    April 29, 2024

    Yeah I reduced the baudrate as 57600. And it is solved.

    LPUART wake-up time is 8.5uS and receiption time of 1 bit is 8.68uS for 115200 baudrate.

    But I don't know that it is must or not. Maybe my wake-up time is delayed for some reason.