issuing eraseuicr from openocd

On Seeed Xiao nRF52840, I'm attempting to use reset (P0.18) as GPIO in a Zephyr (ZMK) app.

I've set 

```

&uicr {
/delete-property/ gpio-as-nreset;
nfct-pins-as-gpios;
};
```
in my overlay, and I need to erase the UICR. I do not have a jlink debugger. I have successfully connected using a cmsis-dap debugger, but I am unsure of the register I need to set to issue the eraseuicr command.
https://docs.nordicsemi.com/bundle/ps_nrf52840/page/nvmc.html indicates
ERASEUICR 0x514

Register for erasing user information configuration registers

I ran `nrf52.dap apreg 1 0x04 0x01`, but I only have a uf2 to flash the application from, so I have to install the adafruit boot loader, which seems to reenable the reset behavior in UICR.

I think what would be helpful is to determine how to map the 0x514 register to a form that nrf52.dap apreg could understand.

Any assistance would be greatly appreciated.

Parents
  • Upon examination of the Debug and Trace section of the nRF52840 Product Specification
    from the Nordic website, it seems that eraseuicr is not a part of the ap register? Is it possible to set this in some other way? 

    I ran `nrf52.dap apreg 1 0x04 0x01`, and then flashed the application without a boot loader, but the application doesn't seem to boot, despite flashing verifying as successful in both hex and bin formats. I believe the application has been built correctly as when I flash a boatloader and then the application from the same build in uf2 format, it works as expected.

Reply
  • Upon examination of the Debug and Trace section of the nRF52840 Product Specification
    from the Nordic website, it seems that eraseuicr is not a part of the ap register? Is it possible to set this in some other way? 

    I ran `nrf52.dap apreg 1 0x04 0x01`, and then flashed the application without a boot loader, but the application doesn't seem to boot, despite flashing verifying as successful in both hex and bin formats. I believe the application has been built correctly as when I flash a boatloader and then the application from the same build in uf2 format, it works as expected.

Children
Related