2024-06-04 04:21 AM
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 ?
2024-06-04 04:26 AM
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?
2024-06-04 06:42 AM
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
load
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.
2024-06-04 07:01 AM
@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:
https://forum.segger.com/index.php/Board/3-J-Link-Flasher-related/
2024-06-04 09:04 AM
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
2024-06-05 03:26 AM
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