Hello Nordic team,
I have a question related to the “nRF5340 Production Programming – Troubleshooting” documentation, specifically the part that says the access port protection on nRF5340 is enabled by default and that we must run nrfjprog -f nrf53 --recover before we can program a new device.
Our use case is Matter devices based on nRF5340.
In production we need to program factory data (DAC/PAI/CD/keys etc.) in addition to the normal application firmware. Each device must get unique Matter credentials, and it is very important that we never overwrite an MCU that has already been programmed with a different device’s factory data.
However, because new nRF5340 devices come with access port protection enabled by default (and we always do a --recover first), we are worried about the following scenario on the production line:
Operator forgets to replace the board in the fixture.
The same physical PCB is programmed again with the next device’s factory data.
As a result, the factory data for the previous device is silently overwritten.
My questions are:
Do you have any recommended solution or best practice to prevent overwriting factory data on an nRF5340 that has already been programmed (for example, in a high-volume production line)?
Is there any reliable way, from the programming tool side (nrfjprog / J-Link / other Nordic tools or recommended flow), to detect that:
this MCU is “brand new / never programmed before”, versus
this MCU has already been successfully programmed with application + factory data?
Our goal is to follow Nordic-recommended methods as much as possible, instead of inventing our own ad-hoc checks. Any guidance or pointers to documentation would be greatly appreciated.
Thank you very much for your help.