What does nrfjprog --rbp ALL enable?

My assumption is, that `nrfjprog --rbp ALL` sets APPROTECT to the apropriate non-0xFFFFFFFF value.
But does it additionally also set SECUREAPPROTECT?

I found documentation here, but it did not specify in detail: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf_cltools%2FUG%2Fcltools%2Fnrf_nrfjprogexe_reference.html

Edit: My understanding is, that it does NOT enable erase protection. Is this correct?


Thanks in advance.

  • Hi, 

    `nrfjprog --rbp ALL` would also set SECUREAPPROTECT protected. See the following test with nRF9160DK:

    >nrfjprog --version
    nrfjprog version: 10.23.2 external
    JLinkARM.dll version: 7.80c
    
    >nrfjprog --deviceversion
    960011386  - NRF9160_xxAA_REV2
    
    >nrfjprog --memrd 0x00FF8000
    0x00FF8000: FFFFFFFF                              |....|
    
    >nrfjprog --memrd 0x00FF802C
    0x00FF802C: FFFFFFFF                              |....|
    
    >nrfjprog --rbp ALL
    Protected the device against read and debug. Only a --recover, --debugreset,
    or --pinreset operations will work from now on.
    
    >nrfjprog --memrd 0x00FF8000
    [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] [  JLink] - Could not find core in Coresight setup
    [error] [SeggerBackend] - JLinkARM.dll reported error -1 at line 3720.
    [error] [  JLink] - Could not find core in Coresight setup
    [error] [SeggerBackend] - JLinkARM.dll reported error -1 at line 3720.
    [error] [  JLink] - Could not find core in Coresight setup
    [error] [SeggerBackend] - JLinkARM.dll reported error -1 at line 3720.
    [error] [  JLink] - Could not find core in Coresight setup
    [error] [SeggerBackend] - JLinkARM.dll reported error -1 at line 3720.
    [error] [  JLink] - Could not find core in Coresight setup
    [error] [SeggerBackend] - JLinkARM.dll reported error -1 at line 3720.
    [error] [ Client] - Encountered error -90: Command read executed for 1702 milliseconds with result -90
    [error] [  JLink] - Could not find core in Coresight setup
    [error] [SeggerBackend] - JLinkARM.dll reported error -1 at line 3720.
    [error] [ Worker] - Access protection is enabled, can't access memory.
    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.
    
    >nrfjprog --memrd 0x00FF802C
    [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] [  JLink] - Could not find core in Coresight setup
    [error] [SeggerBackend] - JLinkARM.dll reported error -1 at line 3720.
    [error] [  JLink] - Could not find core in Coresight setup
    [error] [SeggerBackend] - JLinkARM.dll reported error -1 at line 3720.
    [error] [  JLink] - Could not find core in Coresight setup
    [error] [SeggerBackend] - JLinkARM.dll reported error -1 at line 3720.
    [error] [  JLink] - Could not find core in Coresight setup
    [error] [SeggerBackend] - JLinkARM.dll reported error -1 at line 3720.
    [error] [  JLink] - Could not find core in Coresight setup
    [error] [SeggerBackend] - JLinkARM.dll reported error -1 at line 3720.
    [error] [ Client] - Encountered error -90: Command read executed for 1702 milliseconds with result -90
    [error] [  JLink] - Could not find core in Coresight setup
    [error] [SeggerBackend] - JLinkARM.dll reported error -1 at line 3720.
    [error] [ Worker] - Access protection is enabled, can't access memory.
    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.
    
    >nrfjprog --recover
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    
    >nrfjprog --memrd 0x00FF8000
    0x00FF8000: FFFFFFFF                              |....|
    
    >nrfjprog --memrd 0x00FF802C
    0x00FF802C: FFFFFFFF                              |....|

    Regards,
    Amanda H.

  • Thanks.
    My experiment also showed, that it does not set ERASEPROTECT, as suspected.

Related