cancel
Showing results for 
Search instead for 
Did you mean: 

J-Link could not ''connect under reset'' to the STM32F103RD

Posted on August 02, 2016 at 02:31

Hello, 

I am using the Segger J-Link+ to connect to my target board with the STM32F103RD chip installed. I connected all the necessary pins of the target board (TMS, TDO, TDI, NTRST, TCK, and RESET) to the corresponding pins of the J-Link. Before, I was able to connect to the target board and upload my firmware using J-Flash with no problem. All of a sudden, when I was trying to upload new firmware to the board, I got the ''ERROR: STM32: Connecting to CPU via connect under reset failed.'' I've been looking for possible solutions, but still no luck and I've resorted on posting in this forum.

All the connections are connected properly and the board is powered up as before. The chip doesn't seem to be bricked since the last firmware that I loaded is still running whenever I push the buttons. 

I really hope someone could help me with this. Any help will be appreciated. 
14 REPLIES 14
Posted on August 02, 2016 at 03:17

Pull BOOT0 High, and confirm if you can program the device like that. If it does, then reflect on what you are doing to preclude debugging, like interfering with the pins, or powering down the device.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on August 02, 2016 at 04:02

Hello Clive1,

Thanks for the fast response! 

I just found out that the boot0 pin is floating. Once I set the boot0 HIGH, I will boot to the system memory instead of the flash memory. Am I going to be able to program it using J-Flash still or do I need to use a different way of programming the chip? Also, am I going to be able to reprogram the chip so I could go back in using the flash memory instead of the system memory?

Posted on August 02, 2016 at 04:42

The JTAG/SWD should be agnostic to if you boot into ROM or FLASH, but if you've broken the debug interface, then the ROM offers safe-harbour from which to reflash the device.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on August 02, 2016 at 04:52

You can control how it boots, BOOT0 High ROM, BOOT0 Low FLASH

When it is in ROM you can Erase the Flash, a blank device should be flashable in either state.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Radosław
Senior II
Posted on August 02, 2016 at 09:30

Jlink connect under reset does not work at all.

A report this on Segger forum but this was ignored by them.

Posted on August 02, 2016 at 17:24

I see, thanks clive1! I will try to do that and will update you on whatever happens. Hoping for the best! 

Posted on August 02, 2016 at 17:27

I just messaged Segger and waiting for their reply. Hopefully they know some way to fix this issue. Thanks!

Posted on August 03, 2016 at 02:22

Hello Clive1,

I'm still unable to access the board through the JTAG connection after setting boot0 pin HIGH. Now it says ''STM32: Connecting to CPU via connect under reset failed F(TAP Command:10) @Off 0x5''. Do you think this indicates that the MCU disabled the JTAG/SWD for some reason?

You said I could still erase and reflash the device through the ROM. I found a way of resetting the STM32F103RD chip by using the JLinkSTM32.exe that is included when I downloaded the J-Link software. Unfortunately, it still doesn't work since J-Link could not make a connection with the target board. Is there any other way I could recover my board to its working state?

Posted on August 03, 2016 at 03:35

It is sounding a lot like an electrical/connectivity issue.

>>I connected all the necessary pins of the target board (TMS, TDO, TDI, NTRST, TCK, and RESET) to the corresponding pins of the J-Link.

And Ground?

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