Failed to load readback protection status: async task failure

I am using nRF52833 on a custom board and trying to use J-link to connect the IC with SWD.

But when I opened the programmer to connect my device, it got this error log:

And I tried to use nRF command line and type "nrfjprog --recover" and it will proceed successfully.

But when I type in "nrfjprog --eraseall", it got this error:

 

C:\Users\u10166>nrfjprog --eraseall --log
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".

[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".

[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".

[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll ReadMemU32 detected a read error 1.
[error]: [SeggerBackend] - This typically indicates the read was blocked by a memory protection mechanism.
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll ReadMemU32 detected a read error 1.
[error]: [SeggerBackend] - This typically indicates the read was blocked by a memory protection mechanism.
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll ReadMemU32 detected a read error 1.
[error]: [SeggerBackend] - This typically indicates the read was blocked by a memory protection mechanism.
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.

Do someone know why this is happened?

Parents
  • Hi Vincent, 

    From the log:

    [error]: [SeggerBackend] - This typically indicates the read was blocked by a memory protection mechanism.

    Since the protection mechanism is enabled, that means you need to execute "nrfjprog --recover" to disable the memory protection mechanism before erasing ("nrfjprog --recover"). 

    See the nrfjprog commands description:

    --recover Erases all user flash memory and disables the readback protection mechanism if enabled.
    --eraseall Erases all user available program flash memory and the UICR page. Can be combined with the --qspieraseall operation.
    Note the following limitation:
    • For nRF51 devices with a pre-programmed SoftDevice, only the user available code flash and UICR will be erased.

    Regards,
    Amanda

Reply
  • Hi Vincent, 

    From the log:

    [error]: [SeggerBackend] - This typically indicates the read was blocked by a memory protection mechanism.

    Since the protection mechanism is enabled, that means you need to execute "nrfjprog --recover" to disable the memory protection mechanism before erasing ("nrfjprog --recover"). 

    See the nrfjprog commands description:

    --recover Erases all user flash memory and disables the readback protection mechanism if enabled.
    --eraseall Erases all user available program flash memory and the UICR page. Can be combined with the --qspieraseall operation.
    Note the following limitation:
    • For nRF51 devices with a pre-programmed SoftDevice, only the user available code flash and UICR will be erased.

    Regards,
    Amanda

Children
  • Thank you.

    But I tried "nrfjprog --recover" and it still have the memory protection.

    C:\Users\u10166>nrfjprog --recover
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    
    C:\Users\u10166>nrfjprog --eraseall --log
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [SeggerBackend] - JLinkARM.dll ReadMemU32 detected a read error 1.
    [error]: [SeggerBackend] - This typically indicates the read was blocked by a memory protection mechanism.
    [error]: [SeggerBackend] - JLinkARM.dll ReadMemU32 detected a read error 1.
    [error]: [SeggerBackend] - This typically indicates the read was blocked by a memory protection mechanism.
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    Failed to read device memories.
    [error]: [SeggerBackend] - JLinkARM.dll ReadMemU32 detected a read error 1.
    [error]: [SeggerBackend] - This typically indicates the read was blocked by a memory protection mechanism.
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [  nRF52] - Failed when checking readback protect status.
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [error]: [SeggerBackend] - Failed while ensuring debug power was enabled for device connection.
    ERROR: JLinkARM DLL reported an error. Try again. If error condition
    ERROR: persists, run the same command again with argument --log, contact Nordic
    ERROR: Semiconductor and provide the generated log.log file to them.

  • Hi, 

    What is the command line version (nrfjprog -v) you are using? Please try the latest version.  

    -Amanda

  • I have a very simlar issue with my nrf52833 on a custom board. I have no idea why one day debugging on SEGGER Embedded Studio could no longer be performed. As per similar posts on this subject I have tried --recover and -eraseall with similar error messages and the;Failed to load readback protection status: async task failure for id: 1050638938312 msg: [jlink] JLINKARM_DLL_ERROR (Origin: "Error when running operation: protection-get")

    on NRF Programmer 3.0.7. Using latest versions of nrffjprog (10.19) and Jlink 7.80c

    The chip is running through its program as per normal on power up - I just can't connect to debug. Using the nrf52833 DK for debugging and all had been fine for weeks.

  • Hi, 

    Don't forget to also provide power to your custom board while using the nrf52833 DK for debugging. If this cannot help, please create a new support case. Thanks. 

    -Amanda H.

Related