zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.84k stars 6.6k forks source link

power_init for STM32L4 and STM32G0 in POST_KERNEL #41442

Closed benediktibk closed 2 years ago

benediktibk commented 2 years ago

Describe the bug For STM32L4 and STM32G0 stm32_power_init is executed in POST_KERNEL.

Expected behavior For STM32L4 and STM32G0 stm32_power_init should be executed in PRE_KERNEL_1.

Impact Did not stumble upon any problems, it just came up during the review of #41439.

FRASTM commented 2 years ago

All stm32 mcu with low power modes (power.c)

have the SYS_INIT(stm32_power_init, POST_KERNEL So that I propose to change each with PRE_KERNEL_1 in their soc/power.c