2019-12-20 02:51 AM
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 :)
2019-12-20 08:50 AM
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.
2019-12-20 09:46 AM
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
2019-12-20 10:12 AM
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.
2022-03-16 12:18 AM
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?