cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS app wakes up earlier than RTC requested from standby

gil_dobjanschi
Associate III

Hi,

I have developed an application for the STM32C562RET microcontroller that wakes up the MCU from standby mode, initially based on an example provided by ST. The non-FreeRTOS version of this application works fine; it wakes up the MCU from standby using the RTC in 3 seconds. Subsequently, I created a FreeRTOS version of the same application that starts a task. When the user presses a button, the MCU enters the standby low power state using the code below.

HAL_RTC_WAKEUP_Start(HAL_RTC_WAKEUP_IT_ENABLE);

HAL_PWR_CleanPreviousSystemPowerMode();

LL_PWR_ClearFlag_SB();

HAL_SuspendTick();
HAL_PWR_EnterStandbyMode();

The MCU does wake up, but not at the specified time interval (3 seconds) specified in the ioc2 file in the RTC wakeup configuration. The wakeup time is less than or equal to the time specified in the configuration (between 0 and 3 seconds), seemingly at random.

Do you have any suggestions on how to make the MCU wake up after the specified RTC wakeup time interval?

Thanks,

-Gil

 

0 REPLIES 0