Skip to content

Issue flashing soft device on nRF52832 module - Error: Could not find MEM-AP to control the core #522

Open
@EmikVayts

Description

@EmikVayts

Hello,

I am facing an issue with flashing S132 soft device to a nRF52832 module. I am using a J-Link EDU Mini to flash.

The specific error shown is: "Error: Could not find MEM-AP to control the core". Here is the screenshot from Arduino IDE:
nrf52_memory_access_error

I did not find this same error in any issues of this project (which is why I am starting a new issue on this) - but I did find this same error mentioned in this blog post: https://limitedresults.com/2020/06/nrf52-debug-resurrection-approtect-bypass/

The blog post says that this error is due to APPROTECT register, which seems to protect the board from being programmed or debugged with the J-Link.

The blog post offered two methods for removing APPROTECT - one method using OpenOCD to modify the register - and the other method to use 'nrfjprog' utility to 'recover' the module. The OpenOCD method didn't work for me, but looks like I was able to recover the board using 'nrfjprog' method:
nrfjprog_recover

After resetting the board using nrfjprog, I used 'Zadig' utility to switch my J Link back to WinUSB, and at this point I was able to successfuly flash the S132 soft device to my nRF52832 module.

TLDR - I was able to find a workaround to this issue but it required resetting my module using external 'nrfjprog' utility. I am wondering if there is a more efficient way to reset the board from Arduino IDE, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions