Forced to recover the board each time I flash

Hey all,

Every time I flash, I get the following error message:

Error: One or more batch tasks failed:
- [Probe] Device error: Memory access error at 0x00000000. Probably a memory protection issue. Probe access is Secure, code: Generic

FATAL ERROR: command exited with status 1: nrfutil --json device x-execute-batch --batch-path 'C:\src\warn-zephyr\core\build\generated_nrfutil_batch.json' --serial-number 852006111

I then need to go to the connected devices and recover the board. At that point, I'm able to flash again. If I look at my .config output file, both of the APPROTECT configs are set to disable:

CONFIG_NRF_APPROTECT_DISABLE=y
CONFIG_NRF_SECURE_APPROTECT_DISABLE=y
Is there something more I need to do?
  • Hello,

    Is this a development kit or a custom board?

    Can you try updating the nrfutil device and see if that resolves the issue? If not, I recommend sharing the complete log here so we can get more details. Are you trying this from VS Code?

    Try running the command:
    nrfutil upgrade device

    Kind regards,
    Abhijith

  • It's a custom board. 

    I tried updating the nrfutil. It's now at v2.11.0. 

    PS C:\src\warn-zephyr\core\build\core> nrfutil upgrade device
    Downloading nrfutil-device-x86_64-pc-windows-msvc-2.11.0
    Verifying nrfutil-device-x86_64-pc-windows-msvc-2.11.0
    Updating nrfutil-device to 2.11.0
    [00:00:08] ###### 100% [Upgrade packages] Upgrade packages
    PS C:\src\warn-zephyr\core\build\core>

  • When I attempt to post the log, I get "An error occurred, please try again or contact your administrator." It's only about a hundred lines or so, so...?

  • Hello,

    There might have been a glitch preventing you from pasting the logs. You can always attach a file if pasting doesn't work.
    However, I’ve now received the logs from our FAE (the one you're in touch with). From the logs, I can see that the application is using MCUboot.
    So, please try disabling APPROTECT in the mcuboot.config file as well. This is because the bootloader initializes first after a reset and enables APPROTECT. As a result, the application won’t be able to reach a point where it can enable APPROTECT. 
    Let me know if this resolves the issue or if the problem persists.

    Kind regards,
    Abhijith

  • Alas, the problem still persists. I thought we had it fixed--I _think_ it flashed successfully twice without needing the recover step. And then I tried to connect the RTT up, and now, whether the RTT terminal is there or not, I need to recover each time again.

    mcuboot.config has:

    CONFIG_BOOT_MAX_IMG_SECTORS=512
    CONFIG_NRF_APPROTECT_DISABLE=y
    CONFIG_NRF_SECURE_APPROTECT_DISABLE=y

Related