2021-11-25 03:40 AM
I am using STM32f103 and Cubemx ide. I implemented small project 1 month back and that time it was working fine but now when i am trying to use same code then i observed weired behaviour.
Code runs only after binary flashing and after that if i press reset then it doesn't work (executes only few function and gets stuck).
i tried to debug but facing some issue on Ubuntu.
2021-11-25 04:56 AM
Make sure that the BOOT pins are correctly set externally. BOOT0 should be pulled LOW
2021-11-25 06:40 AM
> executes only few function and gets stuck
How do you know it executes a few functions? Where does it get stuck?
2021-11-25 06:58 AM
Absent the ability to effectively debug via a debugger, one would want to make sure the HardFault_Handler() and Error_Handler() were capable of outputting some useful diagnostics rather than die silently in a while(1) loop. Ideally have output to a serial port, but minimally a GPIO or LED.
Have code early in Reset_Handler to indicate entry
Watch how you use auto/local variables, and that structures are cleanly initialized, make sure clear them, and the content is otherwise undefined, and liable to break the HAL library code.
Get a better debugging platform. Windows machines can be sourced for a few hundred dollars.