Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Projects/P-NUCLEO-WB55.Nucleo/Applications/Thread/Thread_SED_Coap_Multicast/Core/Src/app_entry.c')
-rw-r--r--Projects/P-NUCLEO-WB55.Nucleo/Applications/Thread/Thread_SED_Coap_Multicast/Core/Src/app_entry.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/Projects/P-NUCLEO-WB55.Nucleo/Applications/Thread/Thread_SED_Coap_Multicast/Core/Src/app_entry.c b/Projects/P-NUCLEO-WB55.Nucleo/Applications/Thread/Thread_SED_Coap_Multicast/Core/Src/app_entry.c
index c0478d8be..1a1eade9c 100644
--- a/Projects/P-NUCLEO-WB55.Nucleo/Applications/Thread/Thread_SED_Coap_Multicast/Core/Src/app_entry.c
+++ b/Projects/P-NUCLEO-WB55.Nucleo/Applications/Thread/Thread_SED_Coap_Multicast/Core/Src/app_entry.c
@@ -103,7 +103,6 @@ void APPE_Init( void )
/* USER CODE BEGIN APPE_Init_1 */
Init_Debug();
- UTIL_LPM_SetOffMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE);
Led_Init();
Button_Init();
/* USER CODE END APPE_Init_1 */
@@ -189,6 +188,10 @@ static void SystemPower_Config( void )
/* Initialize low power manager */
UTIL_LPM_Init( );
+ /* Disable low power mode until INIT is complete */
+ UTIL_LPM_SetOffMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE);
+ UTIL_LPM_SetStopMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE);
+
#if (CFG_USB_INTERFACE_ENABLE != 0)
/**
* Enable USB power
@@ -287,7 +290,13 @@ static void APPE_SysEvtReadyProcessing( void )
TL_TRACES_Init( );
APP_THREAD_Init();
+
+#if ( CFG_LPM_SUPPORTED == 1)
+ /* Thread stack is initialized, low power mode can be enabled */
UTIL_LPM_SetOffMode(1U << CFG_LPM_APP, UTIL_LPM_ENABLE);
+ UTIL_LPM_SetStopMode(1U << CFG_LPM_APP, UTIL_LPM_ENABLE);
+#endif
+
return;
}