2024-08-15 04:49 AM
I would like to use the Stop3 low-power mode on an STM32U545RE (NUCLEO-U545RE-Q board) and to wake-up the device by the RTC. I have a working example for Stop2 mode for which I largely used the inspiration from the stm32u5 workshop. But when I replace the HAL_PWREx_EnterSTOP2Mode call(s) with HAL_PWREx_EnterSTOP3Mode, the device does not wake up from the stop mode anymore. At least the current consumption drops down to 3uA so I am confident that the Stop3 mode itself is working.
The code parts of my main function which I believe are relevant look as follows:
HAL_Init();
SystemClock_Config();
SystemPower_Config();
MX_GPIO_Init();
MX_ICACHE_Init();
MX_RTC_Init();
/* The SMPS regulator supplies the Vcore Power Domains */
HAL_PWREx_ConfigSupply(PWR_SMPS_SUPPLY);
/* Enable ultra low power mode */
HAL_PWREx_EnableUltraLowPowerMode();
/* Enable the Autonomous Mode for the RTC Stop0/1/2 */
__HAL_RCC_RTCAPB_CLKAM_ENABLE();
/* Set RTC wakeup timer for 2s */
HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 2, RTC_WAKEUPCLOCK_CK_SPRE_16BITS, 0);
/* Enter in Stop 3 mode */
HAL_PWREx_EnterSTOP3Mode(PWR_STOPENTRY_WFI);
Is there anything missing to make the RTC (interrupt) work in Stop3 mode? In the reference manual, I found that the RTC should be able to run and to wake up the CPU from Stop3 mode but I guess some configuration is missing here. Thanks in advanve for any helpful advice.
2024-08-23 05:14 AM
Hello @TNaum
Your issue has been reported internally. We will come back to you as soon as possible.
Internal ticket number: 189257 (This is an internal tracking number and is not accessible or usable by customers)
2024-08-23 06:01 AM - last edited on 2024-08-23 07:28 AM by Saket_Om
Hello @TNaum,
I have ported an example for STM32U545RE "Stop 3 mode with RTC Timer wake-up". The applicative part is functional (Go to Stop 3 and wake-up with RTC Timer, check the IRQHandler when interrupt occurs).
But as you mentioned, the current remains at 3µA after wake-up, which is not expected. We have reported this issue internally.
You can find the example in the attached Zip folder.
I hope this helps !
2024-08-23 06:31 AM
Hi,
if your current stays at 3uA, how can you be sure that the wake up works?
Additionally, I see that you call HAL_NVIC_SystemReset() after wake-up. Wouldn't this restart the whole program so that you would go to stop3 mode over and over again?
Best regards
2024-08-23 06:57 AM
I have monitored the CDSTOP signal to verify if the system enters Stop 3 mode. It operates as expected: when the core enters Stop 3 mode, the "CDSTOP is set", and when the core wakes up, the "CDSTOP is cleared".
Regarding HAL_NVIC_SystemReset(), it is used to reset the application, allowing us to observe the system repeatedly entering Stop 3 mode. You can remove this function if needed.
2024-08-27 01:17 AM
So CDSTOP gets cleared but the current stays at 3uA? That behaviour is pretty weird.
Regarding HAL_NVIC_SystemReset: If you reset the whole system immediately after wake-up, and if you go to stop3 mode immediately after application start, the MCU will nearly always be in stop3 mode, because it immediately goes to stop3 mode again after waking up. Effectively, the system reset causes your application to go to stop3 mode in a loop. Like this, observing a difference in the current consumption is difficult.
2024-08-27 10:03 AM
Exactly, but even after removing this function from my code, the behavior remains unchanged (same current value).
2024-09-04 06:50 AM
Hi,
is there any progress on this issue? If not yet, can you estimate when we can expect an update?
Best regards
2024-09-27 02:26 AM
Hi @Saket_Om ,
you said the issue has been reported internally. Have you seen any results on this?
Best regards
2024-09-27 03:08 AM
Hello @TNaum
We are actively working on the ticket and will provide you with an update as soon as possible.