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

nRF52 Flash Protection

We would like to enable the flash protection for an nRF52 application with the typical scenario:

  • to disable flash reads from the JTAG,SWD interface; only erase/reprogram should be possible.
  • flash writes from our firmware internally should be enabled.

We went through the infocenter docs and the product spec, but are not sure how exactly to use the UICR register to achieve this. We seen UICR doc and uicr_config.h example, but it's not clear where is 'the bit' to enable the firmware protection. We are not using soft devices, nor DFU.

Are we missing something? There are a lot of articles for nRF51? Are those relevant for nRF52?

Parents
  • This is in section 14.1.62 of the product spec, the description for the APPPROTECT register which tells you to write 0x00 to the lowest 8 bits of that register to disable SWD access.

    You can do that any way you please, by putting it in the code image, by setting it afterwards with a debugger (thus disabling that debugger from then on) or having the code check and write it the first time it runs.

Reply
  • This is in section 14.1.62 of the product spec, the description for the APPPROTECT register which tells you to write 0x00 to the lowest 8 bits of that register to disable SWD access.

    You can do that any way you please, by putting it in the code image, by setting it afterwards with a debugger (thus disabling that debugger from then on) or having the code check and write it the first time it runs.

Children
Related