Should the Init_Debug() function be called for the SED thread's low-power operation?
Hello.
I am building a Thread SED product using the STM32W5MMG.
Recently, after upgrading the firmware version to v1.24.0, I encountered a problem with low-power startup.
Upon investigation, I discovered that the location of the “Init_Debug();” call within the MX_APPE_Init() method in app_entry.c was different.
Previously (in v1.23.0), I had written the following code within the /* USER CODE BEGIN APPE_Init_1 */ block, and this worked correctly.
HW_TS_Init(hw_ts_InitMode_Full, &hrtc); /**< Initialize the TimerServer */
/* USER CODE BEGIN APPE_Init_1 */
#if (CFG_FULL_LOW_POWER != 1)
Init_Debug();
#endif
UTIL_LPM_SetStopMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE);
UTIL_LPM_SetOffMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE);
Led_Init();
Button_Init();
/* USER CODE END APPE_Init_1 */
However, with the transition to v1.24.0, the call location of Init_Debug(); was changed as follows.
HW_TS_Init(hw_ts_InitMode_Full, &hrtc); /**< Initialize the TimerServer */
Init_Debug();
/* USER CODE BEGIN APPE_Init_1 */
UTIL_LPM_SetStopMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE);
UTIL_LPM_SetOffMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE);
Led_Init();
Button_Init();
/* USER CODE END APPE_Init_1 */So, from now on, even if CFG_FULL_LOW_POWER is set to enabled in CubeMX, Init_Debug() must be called.
But in this case, my system freezes somewhere I don't know and does not enter low power mode also.
So I have to manually comment out the Init_Debug() call to solve this problem.
I don’t think this way is a good way.
I wonder if I need to artificially block Init_Debug calls to ensure my product works from now on, or if there is another pitfall I am missing.
Thanks,
