cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMx RTC Timeout does not trigger ISR

taraben
Senior
Posted on November 28, 2015 at 18:00

Hello all,

I made a new project with latests CubeMx 1.9 for stm32f4

My problem is that the autogenerated code does not trigger the ISR.

I found out that when I

__HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF);

just before

HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 1000, RTC_WAKEUPCLOCK_RTCCLK_DIV16);

in the MX_RTC_Init() function, then it works as ecpected.

Seems that WUTF flag unintentional set and that will block any further timouts to not activate the ISR.

Bug or feature? I would call it bug.

Regards, Adib.

#!stm32-!cubemx-!rtc-!timeout
2 REPLIES 2
Posted on December 03, 2015 at 12:15

Hi adib,

Which line of STM32F4 are you using? and Which low power mode are you experimenting? Also you should upgrade to the latest Version 4.11.0 of STM32CubeMx.

 

Referring to

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/errata_sheet/DM00068628.pdf

of STM32F427/437 and STM32F429/439, there is a limitation related to the wake up sequence from Stand by mode (section 2.1.3) that lead the user to clear all  related wake up flags before enabling sources.

This limitation is not taken into account in the generated code by STM32CubeMx.

This issue is reported to dedicated team. Sorry for inconvenience it may bring

-Shahrzad-

stm32cube-t
Senior III
Posted on April 12, 2016 at 14:34

Dear user,

This issue is now fixed by adding in MX_RTC_Init():

__HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF);

Before the call to:

HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 1000, RTC_WAKEUPCLOCK_RTCCLK_DIV16);