From 8ccd4f36606a56dbdabdcd849712d4ac02a18497 Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 25 Jun 2025 11:00:24 +0200 Subject: [PATCH] stm32: implement halt and reset --- src/helpers/stm32/STM32Board.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/helpers/stm32/STM32Board.h b/src/helpers/stm32/STM32Board.h index 65c7414b..06bc768f 100644 --- a/src/helpers/stm32/STM32Board.h +++ b/src/helpers/stm32/STM32Board.h @@ -23,6 +23,13 @@ public: } void reboot() override { + NVIC_SystemReset(); + } + + void powerOff() override { + HAL_PWREx_DisableInternalWakeUpLine(); + __disable_irq(); + HAL_PWREx_EnterSHUTDOWNMode(); } #if defined(P_LORA_TX_LED)