Retained Memory for nrf5340 cpu app

Hello,

We have an nrf522840 board using retained memory feature following this sample and using the NRF_RETENTION setting: 

https://github.com/zephyrproject-rtos/zephyr/tree/191d38dee89dd1e03e525ec2d24a8a1210751517/samples/boards/nordic/system_off

We are upgrading to use the nrf5340 chip and trying to adapt the code. We are setting to use RETAINED_MEM but are having trouble with retainedmemory device not being  defined. 

This is the line throwing an error: const static struct device *retained_mem_device = DEVICE_DT_GET(DT_ALIAS(retainedmemdevice));

The sample has some definitions of the device for the nrf54 boards, but none for the nrf53. 

Appreciate any pointers. We are building using the nrf5340ns.

Parents Reply
  • Hi Amanda, 

    I have the exact same question but for a nrf9151dk board. I tried to create a 'nrf9151dk_nrf9151_ns.overlay' file with the followin content

    / {

        aliases {
            retainedmemdevice = &sram0_ns_app;
        };
    };

    .. but nothing good happened. (retained.c:73: undefined reference to `__device_dts_ord_56'). If I use &sram0 I get more or less the same. Not sure what ro do here ?

Children
No Data
Related