NRF52840: UICR not erasable when RBP is set?

Hi,

related issue:   ERASEUICR not erasing UICR 

But I thought I rather raise a separate issue, since the issue is a different one:

We're using NRF52840, NRF_FICR->INFO.VARIANT is 0x41414430 / AAD0.

After flashing the firmware in our production, an nrfjprog --rbp ALL is done. Then, in the further production process, some data is written in the UICR->CUSTOMER registers. (Via the actual firmware, controlled by commands sent via BLE).

It seems at this point we have no possibility of erasing the CUSTOMER registers of the UICR anymore, to possibly change the values in the register again (without access to the debug port to do a --recover) with nrfx_nvmc_uicr_erase()? Neither

    NRF_APPROTECT->DISABLE = APPROTECT_DISABLE_DISABLE_SwDisable;
    NRF_UICR->APPROTECT = UICR_APPROTECT_PALL_HwDisabled;

Will work. The datasheet says that ERASEUICR is not possible when APPROTECT is enabled, but I can't disable APPROTECT without doing a full erase?

Is this correct?

With best regards,

Andreas

Parents
  • Hello Andreas,

    You are correct in that it is not possible to perform an ERASEUICR while APPROTECT is enabled. It's also not possible to disable APPROTECT when it's enabled in UICR without performing a full chip erase. For this reason, UICR is generally only suitable for one-time configurations. Data that needs to be updated regularly should be stored in the FLASH region.

    Some ideas for working around this:

    1. Keep the data in flash memory, for example, in the FDS if using the nRF5 SDK. This would be the best solution.

    2. Write to a new CUSTOMER register and invalidate the previous one every time you need to update the data. This approach obviously limits the number of updates you can support.

    Best regards,

    Vidar

Reply
  • Hello Andreas,

    You are correct in that it is not possible to perform an ERASEUICR while APPROTECT is enabled. It's also not possible to disable APPROTECT when it's enabled in UICR without performing a full chip erase. For this reason, UICR is generally only suitable for one-time configurations. Data that needs to be updated regularly should be stored in the FLASH region.

    Some ideas for working around this:

    1. Keep the data in flash memory, for example, in the FDS if using the nRF5 SDK. This would be the best solution.

    2. Write to a new CUSTOMER register and invalidate the previous one every time you need to update the data. This approach obviously limits the number of updates you can support.

    Best regards,

    Vidar

Children
No Data
Related