cancel
Showing results for 
Search instead for 
Did you mean: 

BUG: stm32f4xx_hal_rtc_ex.c (RTC)

smhhadima
Associate II
Posted on August 04, 2015 at 15:50

Can someone from ST answer this?

 

 

Bug in HAL library (HAL_RTCEx_SetWakeUpTimer_IT)

 

 

*Bug: HAL_RTC weakup does not interrupt

*Reason: 

 The library  stm32f4xx_hal_rtc_ex.h   does not clear the interrupt flag before enabling the interrupt 

*Solution:

 Manually add this line (clear the interrupt flag):

 /* Clear the Flags in the RTC_ISR register */

    RTC->ISR = (uint32_t)((uint32_t)(~((RTC_FLAG_WUTF | RTC_ISR_INIT)& 0x0000FFFF) | (uint32_t)(RTC->ISR & RTC_ISR_INIT)));

before  the /* RTC WakeUpTimer Interrupt Configuration: EXTI configuration */ line

*ST please fix file:

@file    stm32f4xx_hal_rtc_ex.c

  * @author  MCD Application Team

  * @version V1.3.2

  * @date    26-June-2015

#bug-rtc-weakup-interrupt
1 REPLY 1
tm3341
Associate II
Posted on August 04, 2015 at 16:17

This is not a bug.

Just clear flag by yourself before you call enable function. 

That's all.