We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 067126a commit f1e3784Copy full SHA for f1e3784
soc/st/stm32/stm32c0x/poweroff.c
@@ -1,19 +1,30 @@
1
/*
2
* Copyright (c) 2024 Kickmaker
3
+ * Copyright (c) 2025 Tomas Jurena
4
+ *
5
* SPDX-License-Identifier: Apache-2.0
6
*/
7
8
#include <zephyr/kernel.h>
9
#include <zephyr/sys/poweroff.h>
10
#include <zephyr/toolchain.h>
11
+#include <zephyr/drivers/misc/stm32_wkup_pins/stm32_wkup_pins.h>
12
13
#include <stm32_ll_cortex.h>
14
#include <stm32_ll_pwr.h>
15
+#include <stm32_ll_system.h>
16
17
void z_sys_poweroff(void)
18
{
19
+#ifdef CONFIG_STM32_WKUP_PINS
20
+ stm32_pwr_wkup_pin_cfg_pupd();
21
+
22
+ LL_PWR_ClearFlag_WU();
23
+#endif /* CONFIG_STM32_WKUP_PINS */
24
25
LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
26
LL_LPM_EnableDeepSleep();
27
+ LL_DBGMCU_DisableDBGStandbyMode();
28
29
k_cpu_idle();
30
0 commit comments