cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved] Not able to connect using stlink after power reset.

sanjuchopracool
Associate II

I am porting opentx code to a board I am using. I have changed some part of the code and I am able to boot opentx and show something on display.

https://github.com/sanjuchopracool/opentx

But I have one serious issue. If I power off the board and power on again. Board does not connect to stlink. I have to press reset pin and erase all memory and again program it( this video helped to bring board up https://www.youtube.com/watch?v=jEz0C2bT2M0&list=LLW7VfakxkgeK75-Ki-53dOQ&index=4&t=0s).

How ever if I don't power it off , I can connect to it and reprogram it. in option byte WDG_SW was checked..

Please guide me to fix this issue.

0693W000000V6c3QAC.jpg

2 REPLIES 2

Most probable that your code fiddles with the GPIO pins used by the debugger, or disables the debug interface.

Make sure NRST is connected so the ST-LINK can actually attempt "connect under reset"

The debugger has to wrestle control from code you have running on the part, if it can't get access it will fail to connect. Try adding a delay in the Reset_Handler.

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

NRST pin was not connected , after connecting NRST, it worked fine with ST-Link utility.

Although NRST pin does not work with linux utility (https://github.com/texane/stlink).

Thanks for the help.