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

Read back protection without debugger command

Is it possible or there is support in nrf52840 such that I can enable readback protection from the firmware itself?

I found an APPROTECT register in bitfields. But how to configure this register?

One more thing, after enabling readback protection, can we see logs on RTT viewer

Parents
  • Hi

    There are two rather simple ways to enable readback protection using the APPROTECT register. Either, you can set it in your application code like my colleague explains in this thread. Or, you can download nrfjprog on your computer and enable APPROTECT by calling the command nrfjprog --rbp all in a command window when your device is connected. In both cases, you will have to recover the chip/ do a full chip erase in order to access the memory of the chip. 

    When you set the APPROTECT register, JTAG will keep working until you reset the device, at which point the readback protection will kick in, and your JTAG and SWD will be disabled, and you won't be able to use the RTT viewer.

    Best regards,

    Simon

Reply
  • Hi

    There are two rather simple ways to enable readback protection using the APPROTECT register. Either, you can set it in your application code like my colleague explains in this thread. Or, you can download nrfjprog on your computer and enable APPROTECT by calling the command nrfjprog --rbp all in a command window when your device is connected. In both cases, you will have to recover the chip/ do a full chip erase in order to access the memory of the chip. 

    When you set the APPROTECT register, JTAG will keep working until you reset the device, at which point the readback protection will kick in, and your JTAG and SWD will be disabled, and you won't be able to use the RTT viewer.

    Best regards,

    Simon

Children
Related