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

SWD access after sd_power_system_off in early main() :-) ??

Hi,

Have flashed an early sd_power_system_off  first line in main() when measuring power-consumption...

Now the SWD access seems gone. Is there a trick to get it back in bizness!?

note: I only have SWD/SWCLK, no XRES can be wired up unfortunately.

thx 

Parents Reply
  • Recover erases all flash.

    I'm not sure about nrfjprog or jlink tools. I've once done something simular using OpenOCD. When I tried to enable DCDC early in main on a board that does not support it.

    I've been trying to connect to it in a loop, something like

    while true; do openocd -f "interface/jlink.cfg"-c "transport select swd" -f "target/nrf52.cfg"; done

    and then connect and disconnect power until I get a connection, and then use

    nrf5 mass_erase 0
    to erase all flash.

    I suppose this would work with other tools such as jlink and nrfjprog as well. Create a command or script that continuously tries to connect, add and remove power, untill you connect at a moment the code is still in the Reset Handler, just before main, and then you're in. 

Children
Related