cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging, but not running.

Ole Thomsen
Associate II

Hey,

I build my own STM32 board with the STM32L011G3 and started testing with a simple blinking program via SWD and ST-Link V2.  When I'm debugging it, everything works fine, but when I use the run command in SW4STM32 the LED lights up, but does not toggle.

Is there any configuration I shood change or any known problem?

Thanks for help 🙂

4 REPLIES 4
Bob S
Principal

Probably some initialization that the debugger does that your code does not, or the interrupt vector table is not correct. If you can, while running the program under the debugger, toggle the reset line to the CPU (if you have a switch on your board that makes it easy, otherwise you need to use a wire). Does the LED blink or it is on solid? If on solid, halt the debugger and see what is (or isn't) happening.

Some models need a power cycle if they previously had a blank FLASH, as the ROM code will be run.

More generally, make sure BOOT(0) pin is pulled LOW to assure FLASH code is run

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

The BOOT(0) is pulled down. In the meantime everything works. I have no clue what the problem was. But plugging off the board and repowering it makes the program work.

In the debugging mode there was a blinking light, but after running it, it just lights up and never goes off again (HAL_Delay(1000)) but after repowering it blinks like it should. Thanks for your help.

Mohammed Eshaq
Associate III

I have the same issue (posted here: MCU works with DEBUG but not with RUN - Reset is required with RUN (st.com)).

Did you manage to solve the problem? Or you are still using power cycling to start your code?