2017-04-21 07:05 AM
Hi everyone,
I'm using STM32F103 with CubeMX.
I enabled the RTC Global Interrupt but I don't know how to configure it to generate a 1/4 second interrupt?
Because the Reference Manual says:
Three dedicated maskable interrupt lines:
– Alarm interrupt, for generating a software programmable alarm interrupt.–Seconds interrupt, for generating a periodic interrupt signal with a programmable
period length (up to 1 second).
– Overflow interrupt, to detect when the internal programmable counter rolls over tozero.Could anybody show me how to configure this with HAL Library?
Best regards,
ReV.
2017-04-21 08:55 AM
Hi,
Enable the RTC Alarm interrupt using HAL_RTC_ALARM_ENABLE_IT (hrtc,RTC_IT_ALRA)
You can refer to ready RTC example
inside the STM32CubeF1 at this path, it may help you on how implementation is done:
STM32Cube_FW_F1_V1.4.0\Projects\STM32F103RB-Nucleo\Examples\RTC\RTC_Alarm
The
Description of STM32F1xx HAL drivers, may help you to have more idea about the use of HAL functions.
Imen