-
Looking into lowering power consumption by entering the STM32 sleep, standby, stop modes, etc but the only documentation I've found online use STM's HAL. I'm curious if this or similar functionality is supported by modm? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No, not at all. Of course you can manually enter these modes, but the entire architecture of modm is not designed for low-power operations. You could perhaps hack it, for example, the task scheduling is all based on polling, so you could enter WFI sleep mode in the main loop if you set the Perhaps with the fiber scheduler, we could support low-power, but that's definitely not gonna happen anytime soon. I would recommend looking into a modern RTOS like Zephyr for low-power operations instead or perhaps something completely different like RTIC.rs. Generally though, really low-power (10y on a coin cell) is going to require a whole system approach and you need to measure and fine tune your whole application including non-microcontroller hardware. |
Beta Was this translation helpful? Give feedback.
No, not at all. Of course you can manually enter these modes, but the entire architecture of modm is not designed for low-power operations. You could perhaps hack it, for example, the task scheduling is all based on polling, so you could enter WFI sleep mode in the main loop if you set the
modm:platform:systick
frequency to 1kHz, cos then you wake up at least every ms and run through the main loop once. But it's really a bad substitute for a proper RTOS which wakes up the right threads on an event.Perhaps with the fiber scheduler, we could support low-power, but that's definitely not gonna happen anytime soon. I would recommend looking into a modern RTOS like Zephyr for low-power operati…