cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G431 LED Toggle Issue – LED Stays ON Until Power Cycle

Sethnittu
Associate II

I am using an STM32G431CBT6. I wrote code to toggle an LED in stm32cubeide. When I build the project in STM32G431, the LED stays permanently ON. However, when I power the board OFF and ON again, the LED starts toggling. Why is this happening?

12 REPLIES 12

Hi @Sethnittu 

If your goal is to have a blinking LED, well you have one.

If your goal is to learn how to program an STM32 device, well you need to put some effort into investigating the problem. e.g. Did you consider single stepping (debug mode) into HAL_Delay to see why it never returns?

Roll your sleeves up, put your thinking hat on, and get stuck in to your own debugging!

 

TDK
Super User

Ensure USER_VECT_TAB_ADDRESS is uncommented in the system_stm32*.c file.

If you feel a post has answered your question, please click "Accept as Solution".

With recent code/build changes this might be most likely what SysTick doesn't appear to be firing.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..