diff --git a/samples/boards/ti/cc13x2_cc26x2/system_off/prj.conf b/samples/boards/ti/cc13x2_cc26x2/system_off/prj.conf index cd2033b868..28a8d5f248 100644 --- a/samples/boards/ti/cc13x2_cc26x2/system_off/prj.conf +++ b/samples/boards/ti/cc13x2_cc26x2/system_off/prj.conf @@ -1,5 +1,3 @@ CONFIG_GPIO=y - CONFIG_PM=y - -CONFIG_PM_DEVICE=y +CONFIG_POWEROFF=y diff --git a/samples/boards/ti/cc13x2_cc26x2/system_off/src/main.c b/samples/boards/ti/cc13x2_cc26x2/system_off/src/main.c index 3d8229d5f2..8b02b7611f 100644 --- a/samples/boards/ti/cc13x2_cc26x2/system_off/src/main.c +++ b/samples/boards/ti/cc13x2_cc26x2/system_off/src/main.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include @@ -53,26 +53,13 @@ int main(void) printk("Sleep %u s (STANDBY)\n", SLEEP_S); k_sleep(K_SECONDS(SLEEP_S)); - printk("Entering system off (SHUTDOWN); press BUTTON1 to restart\n"); + printk("Powering off; press BUTTON1 to restart\n"); /* Clear GPIO interrupt */ status = GPIO_getEventMultiDio(GPIO_DIO_ALL_MASK); GPIO_clearEventMultiDio(status); - /* - * Force the SOFT_OFF state. - */ - pm_state_force(0u, &(struct pm_state_info){PM_STATE_SOFT_OFF, 0, 0}); + sys_poweroff(); - /* Now we need to go sleep. This will let the idle thread runs and - * the pm subsystem will use the forced state. To confirm that the - * forced state is used, lets set the same timeout used previously. - */ - k_sleep(K_SECONDS(SLEEP_S)); - - printk("ERROR: System off failed\n"); - while (true) { - /* spin to avoid fall-off behavior */ - } return 0; }