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

how to erase nrf51822 softdevice or app code

I write NRF_UART0->ENABLE = 0x00 in my app in first line code, but now nrf51822 can connect but cannot Download and erase;

  1. in keil it report:

**JLink Warning: Could not read memory location 0x20000000 when trying to set soft RAM BP Cannot setup Breakpoint at Address

  1. I try nRFgo Studio to erase all, but :

image description when I try push "Recover" button, it tell me: Recover failed Invalid operation

  1. I try nrfjprog to erase, but :

image description

  1. I try jlink-flash, but

Failed to download RAMCode. Failed to prepare for programming. Failed to download RAMCode! Erase Thread exited Erase failed.

Is there other method to erase my app-code or softdevice? Did "NRF_UART0->ENABLE = 0x00" caused the ic cannot download(I test it in another nrf51822,it cannot download and erase, and report the same error)。

my softdevice is s130_nrf51_2.0.1_softdevicehex.; my ic is nrf51822_xxac, 32kram, 256+1K flash;

Parents
  • As I say, if you really believe that malfunctioning of JTAG/SWD interface relates to NRF_UART0 register then it indicates rather some electrical problem. Have you tried with different wiring, USB port etc.? Like really revised entire set-up not only changing one wire to another from the same box and claiming "neah, it didn't help"?! What HW do you use? If it would be a problem of nRF51 chip then you could reproduce it on nRF5 DK board. If so then you can use another SEGGER J-Link (or similar SWD compatible) programmer, attach to DEBUG IN port and try to erase the target this way (bypassing internal SEGGER J-Link OB). There are many things you can try and while there might be a failure of the chip or relation to some FW features you have enabled in your code it's so unlikely that I would never claim it unless I tried very hard all other ways!

Reply
  • As I say, if you really believe that malfunctioning of JTAG/SWD interface relates to NRF_UART0 register then it indicates rather some electrical problem. Have you tried with different wiring, USB port etc.? Like really revised entire set-up not only changing one wire to another from the same box and claiming "neah, it didn't help"?! What HW do you use? If it would be a problem of nRF51 chip then you could reproduce it on nRF5 DK board. If so then you can use another SEGGER J-Link (or similar SWD compatible) programmer, attach to DEBUG IN port and try to erase the target this way (bypassing internal SEGGER J-Link OB). There are many things you can try and while there might be a failure of the chip or relation to some FW features you have enabled in your code it's so unlikely that I would never claim it unless I tried very hard all other ways!

Children
No Data
Related