This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to recover bricked nRF52832 with ST Link?

Hi,

I was trying to write the s132 SoftDevice from the nRF5_SDK_13.0.0 onto the Sparkfun nRF52832 breakout via OpenOCD and an ST-Link v2 debugger. The SoftDevice flashed and verified successfully. After reset, I am not able to connect to the nRF52832 via SWD any more. How to check if this is a FW or a HW failure? Is there any way to recover using only the hardware above?

I have seen that the nRF Go Tools and nrfjprog support recovery option, but those seem to be working with Segger only. Are there any options for doing the same via ST-Link?

This is the OpenOCD log from failed connection attempts:

Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 10000 kHz
Info : Unable to match requested speed 10000 kHz, using 4000 kHz
Info : Unable to match requested speed 10000 kHz, using 4000 kHz
Info : clock speed 4000 kHz
Info : STLINK v2 JTAG v27 API v2 SWIM v6 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.193663
Error: init mode failed (unable to connect to the target)
in procedure 'init' 
in procedure 'ocd_bouncer'

Error code from more verbose debug output:

Debug: 218 3 stlink_usb.c:1659 stlink_usb_open(): transport: 1 vid: 0x0483 pid: 0x3748 serial: 
Info : 219 6 stlink_usb.c:563 stlink_usb_version(): STLINK v2 JTAG v27 API v2 SWIM v6 VID 0x0483 PID 0x3748
Info : 220 6 stlink_usb.c:1770 stlink_usb_open(): using stlink api v2
Debug: 221 6 stlink_usb.c:762 stlink_usb_init_mode(): MODE: 0x02
Info : 222 7 stlink_usb.c:595 stlink_usb_check_voltage(): Target voltage: 3.193663
Debug: 223 7 stlink_usb.c:817 stlink_usb_init_mode(): MODE: 0x01
Debug: 224 8 stlink_usb.c:442 stlink_usb_error_check(): unknown/unexpected STLINK status code 0xb
Error: 225 8 stlink_usb.c:1779 stlink_usb_open(): init mode failed (unable to connect to the target)
Debug: 226 8 hla_layout.c:47 hl_layout_open(): failed
Debug: 227 8 command.c:626 run_command(): Command failed with error code -4
User : 228 8 command.c:687 command_run_line(): in procedure 'init' 
in procedure 'ocd_bouncer'
Debug: 229 8 command.c:626 run_command(): Command failed with error code -4
User : 230 8 command.c:687 command_run_line(): 
Debug: 231 8 hla_interface.c:117 hl_interface_quit(): hl_interface_quit

The ST-Link interface is working, I've checked it with another platform. If there is no way to recover using ST-Link, I'll get a JLink from work and see if it helps. Thanks in advance!

Parents
  • Update: The JLink connected to the board without problem. I ran "nrfjprog --recover". Now the OpenOCD sees the device, but I will not use it for development, because it seems unstable and may brick the board again. I'll use JLink while it is available, until I find a suitable OpenOCD version to work with nrf52. I'm leaving this question open because no fix through OpenOCD was found.

Reply
  • Update: The JLink connected to the board without problem. I ran "nrfjprog --recover". Now the OpenOCD sees the device, but I will not use it for development, because it seems unstable and may brick the board again. I'll use JLink while it is available, until I find a suitable OpenOCD version to work with nrf52. I'm leaving this question open because no fix through OpenOCD was found.

Children
No Data
Related