APPROTEC can't be disabled

Hello everyone!

We've integrated the readout protection to our project, but unfortunately now we don't able to disable it.

The activation code presented below:

  if ((NRF_UICR->APPROTECT & UICR_APPROTECT_PALL_Msk) == UICR_APPROTECT_PALL_Enabled)
  {
    return false;
  }

  NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos);
  while (NRF_NVMC->READY == NVMC_READY_READY_Busy) {}
  NRF_UICR->APPROTECT = UICR_APPROTECT_PALL_Enabled;
  while (NRF_NVMC->READY == NVMC_READY_READY_Busy) {}
  NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos);
  while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}

  return true;

So we tried to use nrfjprog.exe --recover and did manipulations with jlinkcommander (access via control access port).

Each time everything looks like protection is disabled, but chip remains unflashable.

Could you help us please with this issue?

Many thanks in advance!

Best Regards

Ernst

Parents Reply
  • Hello Elfving!

    Thanks for your answer!

    We use nrf52840.

    And in what way does it seem like it is disabled?

    So, we read the following register via JLinkCommander

    SWDReadAP 3 //CTRL-AP Bank 0, register offset 3 (APPROTECTSTATUS 0x00C): Access port protection status
    SWDReadAP 3 //Second read returns the value: 0: enabled 1: not enabled

    And it is returned as 1.

    nRF Connect doesn't warn anything after unlock, but after power re-connection it complain about the protection is activated.

    Best Regards!

    Ernst

Children
Related