NCS 2.5.0 NRF9160 PM

Hello,

recently i migrated my code from 1.5.0 to 2.5.0 (it took a lot of effort). and i got confused with power management in 2.5.0.

Apparently, in v2.5.0  CONFIG_PM=y doesn't support Nrf9160. in sample codes for Nrf9160 as long as I add CONFIG_PM=y it won't compile due to this error: 

/home/*/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/libzephyr.a(pm.c.obj): in function `pm_system_resume':
/home/*/ncs/v2.5.0/zephyr/subsys/pm/pm.c:152: undefined reference to `pm_state_exit_post_ops'
/home/*/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/libzephyr.a(pm.c.obj): in function `pm_system_suspend':
/home/*/ncs/v2.5.0/zephyr/subsys/pm/pm.c:240: undefined reference to `pm_state_set'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

I tried to look it up online to find another way to put the device in DEVICE_PM_LOW_POWER_STATE to reduce the power consumption but I couldn't find another way than useing pm_state_force() which needs the  CONFIG_PM.

Any help would be appreciated.

Related