diff --git a/examples/lorawan/main.c b/examples/lorawan/main.c index 7bb6d0671c1b..ff7f99432ed5 100644 --- a/examples/lorawan/main.c +++ b/examples/lorawan/main.c @@ -154,7 +154,7 @@ int main(void) * in general provides RAM retention after wake-up. */ #if IS_USED(MODULE_PM_LAYERED) - for (unsigned i = 1; i < PM_NUM_MODES; ++i) { + for (unsigned i = 1; i < PM_NUM_MODES - 1; ++i) { pm_unblock(i); } #endif diff --git a/pkg/openwsn/contrib/board.c b/pkg/openwsn/contrib/board.c index 1d57838ac8c1..262a020c59f2 100644 --- a/pkg/openwsn/contrib/board.c +++ b/pkg/openwsn/contrib/board.c @@ -49,8 +49,8 @@ void board_init_openwsn(void) LOG_DEBUG("[openwsn/board]: init\n"); #ifdef MODULE_PM_LAYERED - /* sleeping is currently not supported, block all sleep modes */ - for (uint8_t i = 0; i < PM_NUM_MODES; i++) { + /* sleeping is currently not supported, block all sleep modes except IDLE */ + for (uint8_t i = 0; i < PM_NUM_MODES - 1; i++) { pm_block(i); } #endif