zephyr/soc/st/stm32/stm32u5x/poweroff.c

22 lines
378 B
C

/*
* Copyright (c) 2023 Nordic Semiconductor ASA
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/sys/poweroff.h>
#include <zephyr/toolchain.h>
#include <stm32_ll_cortex.h>
#include <stm32_ll_pwr.h>
void z_sys_poweroff(void)
{
LL_PWR_SetPowerMode(LL_PWR_SHUTDOWN_MODE);
LL_LPM_EnableDeepSleep();
k_cpu_idle();
CODE_UNREACHABLE;
}