Skip to content

Commit 8edcf02

Browse files
erwangocfriedt
authored andcommitted
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: Erwan Gouriou <[email protected]>
1 parent d33017b commit 8edcf02

File tree

1 file changed

+4
-0
lines changed
  • soc/arm/st_stm32/stm32wb

1 file changed

+4
-0
lines changed

soc/arm/st_stm32/stm32wb/soc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ static int stm32wb_init(const struct device *arg)
4545
/* At reset, system core clock is set to 4 MHz from MSI */
4646
SystemCoreClock = 4000000;
4747

48+
/* Set C2 Power Mode to shutdown */
49+
/* It will be udated by C2 when required */
50+
LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
51+
4852
return 0;
4953
}
5054

0 commit comments

Comments
 (0)