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

Brick after sd_nvic_SystemReset() with enabled readback protection.

Hello,

My device is nRF51822 SD110 8.0.0.

The problem occured after firmware update in bootloader (own, not SDK) with readback protection enabled. So bootloader connects to host, receive the data and write it to firmware area of the flash. After all data transferred, central disconnect device. In bootloader disconnection handled in next way:

...
else if (evt_id == BLE_GAP_EVT_DISCONNECTED){ 
   sd_nvic_SystemReset();
}...

And device restarts, it jumps to botloader first and bootloader switches to firmware. Everithing works fine. But in case when readback protection enabled on chip, the last become brick after sd_nvic_SystemReset(); command. Power reset didn't help. What should I do to fix this?

Parents
  • Hi, I see. But the problem is not in bootloader. The problem is in function that rewrites bootloader from the firmware, when it starting to run with PALL readback activated. Further investigation shown that if I ran the same function code from flash (i.e. region 1) the update succeed and bootloader overwritten correctly. A little bit late I will open support case for this issue and give exect code to test. Now, I can add that the updating code is as simple as erasing and rewritting a few pages sequentially with reset at finish.

Reply
  • Hi, I see. But the problem is not in bootloader. The problem is in function that rewrites bootloader from the firmware, when it starting to run with PALL readback activated. Further investigation shown that if I ran the same function code from flash (i.e. region 1) the update succeed and bootloader overwritten correctly. A little bit late I will open support case for this issue and give exect code to test. Now, I can add that the updating code is as simple as erasing and rewritting a few pages sequentially with reset at finish.

Children
No Data
Related