Power management issue (LoRa E4-mini + LoRaWAN stack + UART)

I am trying to complete an apparently very simple application where a LoRa E4-Mini should power a sensor, read the sentences on UART, send over LoRaWAN, and go to sleep in low power mode. My initial development was using stdio over uart and functions such as stdio_write() and stdio_read(). The software was functional but would not allow to reach a low power mode, since apparently with RIOT-OS the developer is not allowed to set the LPM bits but must hope the scheduler understands that all threads have completed their tasks to automagically set a low power mode. This feature does not seem functional with stdio over uart if I understand pm: is the overall power management flawed? · Issue #8428 · RIOT-OS/RIOT · GitHub correctly.

So I rewrote the program without relying on stdio but only with the uart example and a callback function going to sleep with the ztimer (see RIOT_NyAlesund/lora_snowdepth/main.c at main · jmfriedt/RIOT_NyAlesund · GitHub ). The new example is functional as well (i.e. I get the UART collected sentences on the LoRaWAN network server) but again power consumption remains at 9 mA, so the microcontroller is not going to sleep I believe. Am I missing a low-power mode capability when writing RIOT_NyAlesund/lora_snowdepth/main.c at main · jmfriedt/RIOT_NyAlesund · GitHub ?

Thanks

I am unable to update the title which should read “LoRa E5-mini” of course, misspelled board name. I just ran the tests/periph/pm example and the current consumption also remains at 10 mA.