2016-08-01 05:31 PM
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.2016-08-01 06:17 PM
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.
2016-08-01 07:02 PM
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?2016-08-01 07:42 PM
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.
2016-08-01 07:52 PM
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.2016-08-02 12:30 AM
Jlink connect under reset does not work at all.
A report this on Segger forum but this was ignored by them.2016-08-02 08:24 AM
2016-08-02 08:27 AM
I just messaged Segger and waiting for their reply. Hopefully they know some way to fix this issue. Thanks!
2016-08-02 05:22 PM
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?2016-08-02 06:35 PM
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?