This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

INVALID MEMORY ACCESS when writing to NRF_POWER->GPREGRET

I am trying to write to NRF_POWER->GPREGRET to store some variables that should be retained through a software reset.

I am running SD 5, SDK 14 and using GCC to compile.

When I try to write to the register, i.e:

NRF_POWER->GPREGRET = 0x01

The program is halted by the error:

<error> app: SOFTDEVICE: INVALID MEMORY ACCESS

Printed out over UART.

Any thoughts on what is causing this error or how it could be solved?

Related