2022-10-05 07:26 AM
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
Solved! Go to Solution.
2023-08-28 04:48 AM
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.
2022-10-05 07:30 AM
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.
2023-08-28 04:48 AM
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.