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

nrf51822 is so easy to be damaged?

Hi, Nordic I added "//" to the srccode of main.c in project ble_app_hrs just like below

bond_manager_init();

// ble_stack_init(); ble_error_log_init(); timers_init(); gap_params_init();

then I built the project and burned it to pca10005,the system prompted can not finish program and I can not connect to the pca10005 any more,nrfgo studio prompted an error: System off disabled until pin reset or power on reset is done. ERROR: An error occurred while connecting to the device

I want to know if the chip is damaged,

  • Hi,

    Most likely, your device has gone into systemoff mode, and in this mode the debugger interface is detached.

    Try using nrfjprog from the command line to recover the device: nrfjprog --recover

    If you used the nRF51 SDK installer, then nrfjprog should be located in your windows PATH (you can call it from where-ever).

    Best regards Håkon

  • Hi thanks for you reply,I am trying recover in nrfgo studio.but it gave me the infomation is as below: Could not read AHB-AP Id,Could not cnonect to target.

    Running application C:/DOCUME~1/dan.sun/LOCALS~1/Temp/nrf51Studio/nrfjprog.exe --snr 518002423 --recover System off disabled until pin reset or power on reset is done. ERROR: An error occurred while connecting to the device

    I tried from command line nrfjprog --recover it prompt" Applying pin reset if debugger is not active System off disabled unti pin reset or power on reset is done Halting device. ERROR: Cannot connect to the nRF51 device

  • I have identical behaviour caused by processor resetting at 44Hz. This reset is caused by SW bug I'm unable to debug.

    I think reset comes too fast for the Segger to do anything useful with default settings. It seems to me that some simpler halt or erase operation is needed to break vicious cycle of resets.

  • As Juha says, you are most likely in a reset-loop due to assertions in your application. I've done this a couple of times myself, and you will just have to try different combinations of power-cycling and running "--recover".

    Create a batch file similar to this: :run nrfjprog.exe --snr XXXXXXXX --recover ping -n 2 127.0.0.1 goto run

    Note that the ping is just to add a 1 sec delay.

    BR Håkon

  • Luckily there is easier way to reset chip. Run JLink Commander ( JLink.exe ) and in it's command window give following commands; si 1 r h w4 4001e504 2 w4 4001e50C 1 w4 4001e514 1 r

    That reset's whole flash, so you need to program Softdevice again, if you have one. Håkon, with what commands could we erase application only??

Related