STM32L4 Low Power Management - Simple example?
New to Zephyr am trying to get a simple example working, leveraging the Zephyr low power architecture on a Nucleo STM32L433 development board.
This is very critical to our requirement.
There are functions in power.h / power.c in the STML4 soc directory to support entering low power states. But it's unclear what other code is needed and whether that has been implemented.
I enable power management in prj.conf and make such calls as the following taken from an example elsewhere for a different board/mcu:
printk("Busy-wait %u s with UART off\n", BUSY_WAIT_S);
status = device_set_power_state(cons, DEVICE_PM_LOW_POWER_STATE, NULL,
k_busy_wait(BUSY_WAIT_S * USEC_PER_SEC);
status = device_set_power_state(cons, DEVICE_PM_ACTIVE_STATE, NULL,
However this doesn't work as the mcu doesn't enter low power mode when sleeping.
Perhaps something fundamental/critical that I've omitted.
Note that there is no problem using STM HAL commands directly to get into stop modes but that bypasses Zephyr's power management capability (https://docs.zephyrproject.org/latest/reference/power_management/index.html).
Suggestions would be very much appreciated.