我想在 STM32U545RE(NUCLEO-U545RE-Q 开发板)上使用 Stop3 低功耗模式,依靠 RTC 唤醒芯片。
我已经实现了Stop2 模式例程。但是当我把`HAL_PWREx_EnterSTOP2Mode`替换为`HAL_PWREx_EnterSTOP3Mode`之后,设备再也无法从任一stop模式唤醒。
测得电流降低至 3μA,可以确认 Stop3 模式正常进入了。参考手册显示RTC能够将 CPU 从 Stop3 模式唤醒
下面是 main 函数代码:
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);
|
|