Skip to content

Commit 35b8ff4

Browse files
Oleh-Kravchenkodanieldegrasse
authored andcommitted
soc: stm32f1x: Remove redundant code and clear SB flag
There is no need to call stm32_pwr_wkup_pin_cfg_pupd() because the SoC does not have a pull-up/pull-down on the WKUP pin. Call LL_PWR_ClearFlag_SB() before entering StandBy power mode. Signed-off-by: Oleh Kravchenko <[email protected]>
1 parent ce119f5 commit 35b8ff4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

soc/st/stm32/stm32f1x/poweroff.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@
77
#include <stm32f1xx_ll_cortex.h>
88
#include <stm32f1xx_ll_pwr.h>
99

10-
#include <zephyr/drivers/misc/stm32_wkup_pins/stm32_wkup_pins.h>
10+
#include <zephyr/kernel.h>
1111
#include <zephyr/sys/poweroff.h>
1212

1313
void z_sys_poweroff(void)
1414
{
15-
#ifdef CONFIG_STM32_WKUP_PINS
16-
stm32_pwr_wkup_pin_cfg_pupd();
17-
15+
LL_PWR_ClearFlag_SB();
1816
LL_PWR_ClearFlag_WU();
19-
#endif /* CONFIG_STM32_WKUP_PINS */
2017

2118
LL_LPM_DisableEventOnPend();
2219
LL_PWR_SetPowerMode(LL_PWR_MODE_STANDBY);

0 commit comments

Comments
 (0)