Open
Open
Enhancement
Description
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
- 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):
- OS: Arch Linux, kernel 6.3.4-arch1-1
- Toolchain: Zephyr-SDK 0.16.1
- Commit: HEAD of main
- Board: Olimex LoRa-STM32WL-DevKit
Related issues
### Tasks
- [ ] https://github.com/zephyrproject-rtos/zephyr/pull/60369
- [ ] https://github.com/zephyrproject-rtos/zephyr/pull/60998
- [ ] https://github.com/zephyrproject-rtos/zephyr/pull/59200
- [ ] https://github.com/zephyrproject-rtos/zephyr/pull/61680