1 /*
2  * Copyright (c) 2024 Kickmaker
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #include <zephyr/kernel.h>
7 #include <zephyr/sys/poweroff.h>
8 #include <zephyr/toolchain.h>
9 
10 #include <stm32_ll_cortex.h>
11 #include <stm32_ll_pwr.h>
12 
z_sys_poweroff(void)13 void z_sys_poweroff(void)
14 {
15 	LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
16 	LL_LPM_EnableDeepSleep();
17 
18 	k_cpu_idle();
19 
20 	CODE_UNREACHABLE;
21 }
22