stm32/stm32_it: Fix RTC IRQ handler to handle all EXTI IRQs on F0 MCUs.
@@ -509,8 +509,18 @@ void RTC_WKUP_IRQHandler(void) {
void RTC_IRQHandler(void) {
IRQ_ENTER(RTC_IRQn);
+ if (RTC->ISR & RTC_ISR_WUTF) {
RTC->ISR &= ~RTC_ISR_WUTF; // clear wakeup interrupt flag
Handle_EXTI_Irq(EXTI_RTC_WAKEUP); // clear EXTI flag and execute optional callback
+ }
+ if (RTC->ISR & RTC_ISR_ALRAF) {
+ RTC->ISR &= ~RTC_ISR_ALRAF; // clear Alarm A flag
+ Handle_EXTI_Irq(EXTI_RTC_ALARM); // clear EXTI flag and execute optional callback
+ }
+ if (RTC->ISR & RTC_ISR_TSF) {
+ RTC->ISR &= ~RTC_ISR_TSF; // clear timestamp flag
+ Handle_EXTI_Irq(EXTI_RTC_TIMESTAMP); // clear EXTI flag and execute optional callback
+ }
IRQ_EXIT(RTC_IRQn);
}
