Hihdl

STM32L0 Low power UART-receiver reads the wrong data at high baudrate after MCU waking up

Recommended Posts

I'm using a STM32L0 MCU for my project. The MCU has a Low-power Timer (LPTIM) for waking the MCU up from Stop-Mode, and a Low-power UART (LPUART) for both waking up the MCU from stop mode and receive/transmit data.

My problem is: - When I let the MCU staying in running mode, LPUART working fine at baudrate over 256000. - When I set MCU to go to Stop-mode, then when the MCU receives something from LPUART-Rx, it's woken up and keep reading the received sequence data. For this set up, when UART baudrate is lower than 56000 it works fine. However when the baudrate is higher than this (e.g at 115200), LPUART read the wrong data. I'm aware that in this set-up, the first transmitted byte will be lost but the others should be read correctly.

there is a limit in Low-power UART but only when using LSI/LSE. In my case, when LPUART receives something, DSP will be woken up and using HSI clock. And also when staying in Run-mode, LPUART has no problem with high baudrate (at least up to 256000 as I tested).

I tried with several different transmitted data with different lengths, however the received data is always wrong. (work fine when baudrate is 56000 though).

Hope you can give me some advice! 

Best regards!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now