Commit 8edcf028 authored by Erwan Gouriou's avatar Erwan Gouriou Committed by Christopher Friedt
Browse files

soc/arm: stm32wb: Default C2 power mode to SHUTDOWN



Low power modes entry on stm32wb depends on requests coming from both
cores, with no consideration of the fact that C2 is booted  or not.

By default, set C2 power mode to shutdown at C1 start up.
If required, it will be updated by C2.
In case C2 is not started, this will allow C1 to enter any power mode
with no dependency on C2.

Fixes #38173

Signed-off-by: default avatarErwan Gouriou <erwan.gouriou@linaro.org>
parent d33017b4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -45,6 +45,10 @@ static int stm32wb_init(const struct device *arg)
	/* At reset, system core clock is set to 4 MHz from MSI */
	SystemCoreClock = 4000000;

	/* Set C2 Power Mode to shutdown */
	/* It will be udated by C2 when required */
	LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);

	return 0;
}