After using the APPROTECT function, complete erasure became impossible.that right?

My customer is now unable to disable secure erasure after using the APPROTECT function. Is this correct?

Please let me know if there is another way to check this.

”nrfjprog --recover”log

PS C:\Users\hoko> nrfjprog --memrd 0x10001200 --n 4
0x10001200: FFFFFFFF |....|
PS C:\Users\hoko> nrfjprog --memrd 0x10001004 --n 4
0x10001004: FFFFFFFF |....|
PS C:\Users\hoko> nrfjprog --log --recover --clockspeed 1000
Recovering device. This operation might take 30s.
Erasing user code and UICR flash areas.
Writing image to disable ap protect.

Flash Programer Check Image.

Erase Log (Flash Programmer)

20:13:30.343   Device connected with the serial number 000483012562

20:13:52.798   Getting serial port options from the persistent store for 000483012562.pc-nrfconnect-programmer

20:13:52.799   Device connected with the serial number 000483012562

20:13:55.525   Selecting device with the serial number 000483012562

20:13:56.354   Selected device with the serial number 000483012562

20:13:56.354   Using nrfutil device to communicate with target via JLink

20:13:56.355   JLink OB firmware version J-Link OB-SAM3U128 V3 compiled Sep 13 2023 14:47:14

20:13:56.355   Device family

20:13:56.355   Device version

20:13:56.356   Board version

20:13:57.395   Reading readback protection status for Application core

20:13:57.396   Reading readback protection status for Application core 0%

20:13:57.417   Reading readback protection status for Application core 100%

20:13:57.417   Application core protection status 'NRFDL_PROTECTION_STATUS_ALL'

20:13:57.420   Reading readback protection status for Application core completed

20:13:57.551   Skipping reading core Application information as it is protected.

20:13:59.827   Reading readback protection status for Application core

20:13:59.828   Reading readback protection status for Application core 0%

20:13:59.845   Reading readback protection status for Application core 100%

20:13:59.845   Application core protection status 'NRFDL_PROTECTION_STATUS_ALL'

20:13:59.846   Reading readback protection status for Application core completed

20:13:59.991   Device is loaded and ready for further operation

20:14:03.977   Recovering Application core

20:14:03.978   Recovering Application core 0%

20:14:06.081   Recovering Application core 100%

20:14:06.082   Recovering Application core completed

20:14:06.082   Loading core information for Application core

20:14:06.083   Loading core information for Application core 0%

20:14:06.109   Loading core information for Application core 100%

20:14:06.111   Loading core information for Application core completed

20:14:09.171   Reading readback protection status for Application core

20:14:09.172   Reading readback protection status for Application core 0%

20:14:09.180   Reading readback protection status for Application core 100%

20:14:09.180   Application core protection status 'NRFDL_PROTECTION_STATUS_NONE'

20:14:09.181   Reading readback protection status for Application core completed

20:14:19.528   Reading memory for Application core

20:14:19.529   Reading memory for Application core 0%

20:14:23.133   Reading memory for Application core 100%

20:14:23.605   Reading memory for Application core completed

20:14:23.607   Parse memory regions for Application core

Thanks

Hoko

Parents
  • Hello,

    The nRF52832 does not have erase protection like some other nRF chips, but it does have readback protection with the APPROTECT mechanism. After APPROTECT is enabled, it can only be disabled with a full chip erase through the CTRL-AP - Control access port.

    You can use the following command to ensure approtect gets enabled:

    # Enable APPROTECT
    nrfjprog --rbp all

    Please also note that the APPROTECT mechanism works differently between revision 2 and 3 as explain in this Informational Notice: IN142 v1.1

    Best regards,

    Vidar

  • Thanks Vidar.

    I tried ”nrfjprog --rbp all”,

    But.I can't elase flash.

    PS C:\Users\hoko> nrfjprog --rbp all
    [error] [ Client] - Encountered error -90: Command read_device_info executed for 15 milliseconds with result -90
    [error] [ Worker] - Access protection is enabled, can't read device version.
    [error] [ Client] - Encountered error -90: Command read_memory_descriptors executed for 15 milliseconds with result -90
    [error] [ Worker] - Can't read memory descriptors, ap-protection is enabled.
    [error] [ Client] - Encountered error -90: Command readback_protect executed for 15 milliseconds with result -90
    [error] [ Worker] - Ap-protection is already enabled, can't enable ap protection.
    ERROR: The operation attempted is unavailable due to readback protection in
    ERROR: your device. Please use --recover to unlock the device.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.

    I tried recovering as instructed.

    PS C:\Users\hoko> nrfjprog --recover
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.
    PS C:\Users\hoko> nrfjprog --rbp all --log
    Protected the device against read and debug. Only a --recover, --debugreset,
    or --pinreset operations will work from now on.

    Hiroaki 

  • Hello,

    Sorry, but I'm not sure I understand what you are trying to achieve. It is working as expected here:

    PS C:\Users\hoko> nrfjprog --recover
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.
    PS C:\Users\hoko> nrfjprog --rbp all --log
    Protected the device against read and debug. Only a --recover, --debugreset,
    or --pinreset operations will work from now on.

    The "recover" command will first erase the chip through the CTRL-AP then it will load a small FW binary which will do the SW unlocking of the approtect mechansim.

  • Sorry. I use NRF52833. 

    PS C:\Users\hoko> nrfjprog --deviceversion
    483012109 - NRF52833_xxAA_REV2

    PS C:\Users\hoko> nrfjprog --recover -f NRF52 --log
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.

Reply Children
Related