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
  • In general, but I think I have to look into more details. In firmware start I perform flash page erase from RAM and feel it could be the reason. In RM in section MPU 9.1 Functional description stated "Readback protection of code region 0 is enabled by writing '0' to UICR.RBPCONF.PR0. When enabled, only code running from code region 0 will be able to access the code in code region 0. Accesses generated by code running from code region 1 or from RAM, as well as accesses generated by the debugger (SWD), will not be granted when code region 0 is protected." so may be if PALL set the RAM access to code region1 is also restricted?(RM doesn't state it clear enough for code region 1).

Reply
  • In general, but I think I have to look into more details. In firmware start I perform flash page erase from RAM and feel it could be the reason. In RM in section MPU 9.1 Functional description stated "Readback protection of code region 0 is enabled by writing '0' to UICR.RBPCONF.PR0. When enabled, only code running from code region 0 will be able to access the code in code region 0. Accesses generated by code running from code region 1 or from RAM, as well as accesses generated by the debugger (SWD), will not be granted when code region 0 is protected." so may be if PALL set the RAM access to code region1 is also restricted?(RM doesn't state it clear enough for code region 1).

Children
No Data
Related