Need basic example for STM32U575 to use Standby mode within FreeRTOS
I'm trying to get Standby mode to work, but no luck. Using the following code in STOP_MODE_2 everything works fine.
void StartMainTask(void *argument)
{
/* USER CODE BEGIN mainTask */
/* Infinite loop */
for(;;)
{
HAL_GPIO_TogglePin(LED_GREEN_GPIO_Port, LED_GREEN_Pin);
osDelay(500);
HAL_GPIO_TogglePin(LED_BLU_GPIO_Port, LED_BLU_Pin);
osDelay(500);
HAL_GPIO_TogglePin(LED_RED_GPIO_Port, LED_RED_Pin);
osDelay(500);
HAL_SuspendTick();
HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 5, RTC_WAKEUPCLOCK_CK_SPRE_16BITS, 0);
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
//HAL_PWR_EnterSTANDBYMode();
SystemClock_Config();
HAL_ResumeTick();
}
/* USER CODE END mainTask */
}If I uncomment HAL_PWR_EnterSTANDBYMode and comment HAL_PWREx_EnterSTOP2Mode doesn't work nothing.
Memory configuration is
RAM (xrw) : ORIGIN = 0x20030000, LENGTH = 64K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048KRAM address is SRAM2 because is the only memory available in Standby, is It correct?
To wakeup I use RTC, that is configured correctly because in StopMode2 It is working as expected.
Is there an example about using Standby mode and FreeRTOS? Or is not possible to use FreeRTOS in Standby mode? What are the steps to correctly implement Standby mode?
Best regards
GMG
