Skip to main content
Visitor II
October 5, 2022
Solved

How to fix LPUART Transmit on STM32L010 after reset

  • October 5, 2022
  • 2 replies
  • 1645 views

Hello, I have an STM32L010F4P6. I am using HAL libraries, STM32Cube IDE 1.10. And i wrote my program in language C. I must set optimalization to -Os. (Low space) My issue is little bit mysterious. I am using LPUART (115200 8N1) for communication. When I flash fw and run a code all work perfectly, but when i reset the STM32 (unconnected and connected power or terminate by IDE, unconnect ST-link, reset by ide) the MCU Transmit wrong data in response. I could not debug (because -Os) and also because it failed after reset

    This topic has been closed for replies.
    Best answer by Jan Sramota

    Finally I had the time to return to this project. So. The root cause of the problem is a pull-up on pin PB9, which is shared with function BOOT0. n. As a result, after resetting the MCU, it attempts to boot from the system memory instead of the flash memory.

    After I checked checkbox for nBOOT_SEL, nBOOT0 and nBOOT1 in STM32Cube Programmer program runs after reset.

    2 replies

    Graduate II
    October 5, 2022

    See what the signal looks like on a scope or logic-analyzer

    Have an external pull-up on the TX pin so it has known/defined state.

    Jan SramotaAuthorAnswer
    Visitor II
    August 28, 2023

    Finally I had the time to return to this project. So. The root cause of the problem is a pull-up on pin PB9, which is shared with function BOOT0. n. As a result, after resetting the MCU, it attempts to boot from the system memory instead of the flash memory.

    After I checked checkbox for nBOOT_SEL, nBOOT0 and nBOOT1 in STM32Cube Programmer program runs after reset.