Skip to main content
Associate
November 1, 2023
Question

Analog Watchdog Interrupt feature in STOP Mode

Hello, this is my first project here, I'd like to get some guidance please. 

 I work with STM32L073 Nucleo board, and along other features successfully configured Analog Watchdog Interrupt on PA4 pin, it works great in normal mode, but not when the IC in STOPMode.

Here is my Enter_Stop_Mode function, anything wrong? Attached SysClock_Cfg and ADC_Cfg

void Enter_Stop_Mode(void)

{

HAL_SuspendTick();

HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 0x500B, RTC_WAKEUPCLOCK_RTCCLK_DIV16); // 0x500B ~ 8.5sec

 

__HAL_RCC_WAKEUPSTOP_CLK_CONFIG(RCC_STOP_WAKEUPCLOCK_HSI);

/* Enter STOP 2 mode */

HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);

SystemClock_Config();

 

HAL_ResumeTick();

}

Thank you guys.

Regards

This topic has been closed for replies.

1 reply

SergioLAuthor
Associate
November 1, 2023

For clarification: The chip goes to STOPMode , and automatically wakes up every ~8.5sec by RTC timer 

(HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 0x500B, RTC_WAKEUPCLOCK_RTCCLK_DIV16); // 0x500B ~ 8.5sec)

but doesn't wake up by the ADC OutOfWindow interrupt, it's reacts to ADC only on next wake-up by RTC, but not by AWD.