About device recovery and disabling protection

Hello.

I started using a custom board with the nRF5340.
After flashing the program, it seems that protection was enabled, and operations such as erase, read, and write became impossible.
Recovery also failed.

  • Is the recovery procedure correct?
    The commands and results are as follows:
    Net Core
    Command Line

    Full Log


    App Core
    Command Line

    Full Log


  • Is the flashing procedure correct?
    I pressed the Flash button in VS Code.
    Should I use J-Flash (Lite)?
  • Please tell me the procedure to disable the protection.

Until now, I have mainly used the nRF5340DK along with nRF Connect for Desktop / VS Code.
As I am not familiar with handling custom boards and J-Link, I appreciate your understanding.

Thanks for reading.

a.da

  • Additional Note:

    Before flashing, I was able to read via J-Flash or Programmer.

  • Hi,

    nRF5340 Production Programming guide describes how to enable and disable protection.

    You can try reading the register values to check which type of protection is enabled and determine how to disable it.

    Best regards,
    Charlie

  • Hi Charlie, thanks for your reply.

    You can try reading the register values to check which type of protection is enabled and determine how to disable it.

    I am unable to connect to the device via J-Link Commander, so I can't even read the registers.
    I was able to connect before flashing, but after flashing, I can no longer do so.
    Is there anything else I can do?

    Kind regards,

    a.da

  • Hi,

    Cloud you explain more about how and which protection was enabled?

    If it is APPROTECT, the device can be lock and unlock with following commands using nrfutil:

    Enabling device protection

    Recovering the device

    https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/security/ap_protect.html#enabling_hardware_ap-protect_by_locking_the_uicrapprotect_register

    Best regards,

    Charlie

  • Hi Charlie,

    Cloud you explain more about how and which protection was enabled?

    I apologize for the unclear explanation.
    The fact that some kind of protection was enabled is just my assumption.
    First, I need to check the current state of the board.

    After flashing the program, it seems that protection was enabled, and operations such as erase, read, and write became impossible.

    If it is APPROTECT, the device can be lock and unlock with following commands using nrfutil:

    Thank you for providing the specific commands.
    However, unfortunately, failed to execute protection-get.

    Failed to execute recover.

    Please let me know if there are any other ways to obtain clues.

    Kind regards,

    a.da

1 2