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

How to protect firmware during production in case of the unique Zigbee production configuration needs to be added to each chip?

As far as I understood, the flash protection can be realized by writing the 0x00 to the lowest 8 bits of UICR APPPROTECT register either putting it code image or via the nrfjprog after the image flashing.

Our production firmware consists of two parts: main hex is the same for all chips and contains the firmware itself, that needs to be protected from reading. Second part is the Zigbee production configuration hex (like described here), unique for each chip, that supposed to be added later to simplify device accounting while packaging, etc.

So, question is, what is the correct workflow to realize the firmware protection in this case?

Is there any possibility to add the second hex to the write-protected chip without making the full erase?

Parents
  • Hi Anna

    Would you not be able to enable the readback protection after the second configuration HEX is written, rather than enabling it immediately after writing the main firmware?

    If not I think the only option is to have the application firmware write the configuration hex into flash through a bootloader of some kind. Then you would need to write the code through some interface that the MCU can access, such as UART, SPI or RF, and write some code in your application to handle it. 

    Best regards
    Torbjørn

Reply
  • Hi Anna

    Would you not be able to enable the readback protection after the second configuration HEX is written, rather than enabling it immediately after writing the main firmware?

    If not I think the only option is to have the application firmware write the configuration hex into flash through a bootloader of some kind. Then you would need to write the code through some interface that the MCU can access, such as UART, SPI or RF, and write some code in your application to handle it. 

    Best regards
    Torbjørn

Children
Related