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

Preventing reprogramming an nrf52832

I can see that we can use APPROTECT to disable reading of the flash.   

This seems to be reversible using: nrfjprog -f NRF52 --recover, which will erase the flash and allow reprogramming.

This protects the original code from being discovered but does not prevent malicious reprogramming.

Is there no way to prevent reprogramming the device with arbitrary code once in the field?

Parents
  • Hello,

    There is no way in software to prevent an erase and reprogramming of the nRF if they have physical access to the programming pins of the nRF, but as you say, there is readback protection, to prevent them from reading the .hex file programmed to the chip.

    What you could do, is to pre-program the chip, before soldering it on to the PCB. Then, on the PCB, you can ground the SWDIO and SWDCLK. This will make it impossible to program the chip unless you desolder the chip. In my opinion, if someone is able to desolder the chip, they might as well change the entire PCB with their own chip and firmware.

    BR,

    Edvin

Reply
  • Hello,

    There is no way in software to prevent an erase and reprogramming of the nRF if they have physical access to the programming pins of the nRF, but as you say, there is readback protection, to prevent them from reading the .hex file programmed to the chip.

    What you could do, is to pre-program the chip, before soldering it on to the PCB. Then, on the PCB, you can ground the SWDIO and SWDCLK. This will make it impossible to program the chip unless you desolder the chip. In my opinion, if someone is able to desolder the chip, they might as well change the entire PCB with their own chip and firmware.

    BR,

    Edvin

Children
Related