Showing results for 
Search instead for 
Did you mean: 

After I program the board with j link the program doesnot run unless power is re-applied

Associate II

hi , 

I am testing some code on a custom board containing stm32H7 , using CudeIDE and segger J-link EDU . using STlink V2 everything works normally. however using J-link debugging works OK , but when I program release version it programs correctly but program doesnot start. even if debugger is removed from board . the only solution is to turn my board off then on. then the program starts executing. 

info: i am using SWD interface , Reset is connected and verified it is being pulled low breifly during flashing. Also on the custom board the boot0 is connected to GND using pull down resistor . 

is this normal behavior ? is there a way to make the program run after flashing using J-link ?


Andrew Neil
Evangelist III

What happens if you just give the target a reset (assert NRST) - does that get it going?

Is there a J-Link option required to reset the system after programming?

If i give the target a reset (nrst to GND) the program is solved . the target starts . In Cubeide there is no option that i can find to reset after programming ,

So I installed another IDE (VS + visualgdb) there is option to rest after program : In Startup GDB command :

Mon reset


mon reset

and on scope i can verify that It is restarting . however the program still needs external reset. 

What is different between Stlink and Jlink is that stlink holds reset low for longer , Jlink pulls RST for very short time. then the RST capacitor (100nF as per ST recommendation) starts charging immediately.


@xchen.3 wrote:

What is different between Stlink and Jlink is that stlink holds reset low for longer , Jlink pulls RST for very short time. 

Might be worth asking Segger about that:


The H7 treats a power-cycle and reset differently. The power cycle latches the Option Bytes. There's also a determination about if there is usable code in the User Flash Banks, and that can be sticky

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

how to give commands to Jlink from stm32cubeIDE ?

I am sure there is a command like Go or continue to make target run but where to put this ? I have read somewhere that the default settings in J-link is to halt CPU after programming , not sure how to change that