The peripherals on many SoCs lose register contents (and additional bus configuration) when entering low-power modes, even though RAM contents and general OS state is persisted.
The drivers for these peripherals need a mechanism for reinitializing the partial configuration lost.
Example:
With CONFIG_PM enabled on STM32* series, accessing certain peripherals after returning from STOP2 to RUN mode will fail.
To Reproduce
Choose a sample on an SoC utilizing an affected peripheral, e.g. SPI/I2C1-2/ADC/SUBGHZSPI-LoRa on STM32WL
Enable CONFIG_PM and build
Run the sample, and observe peripheral accesses failing after the SoC has entered and left STOP2 mode
Expected behavior
Peripherals operate correctly after the SoC returns from a low-power mode.
Impact
Only select low-power modes are usable when these certain peripherals are utilized
Environment (please complete the following information):
Thank you for the work on this issue. Looking forward to see this merged. This set of PRs is still the only way for to have STOP2 mode supported with STM32WL. We merge it with every release.
Describe the bug
The peripherals on many SoCs lose register contents (and additional bus configuration) when entering low-power modes, even though RAM contents and general OS state is persisted.
The drivers for these peripherals need a mechanism for reinitializing the partial configuration lost.
Example:
With
CONFIG_PM
enabled on STM32* series, accessing certain peripherals after returning from STOP2 to RUN mode will fail.To Reproduce
CONFIG_PM
and buildExpected behavior
Peripherals operate correctly after the SoC returns from a low-power mode.
Impact
Environment (please complete the following information):
Related issues
37352
37414