stm32/stm32_it: Fix RTC IRQ handler to handle all EXTI IRQs on F0 MCUs.

This commit is contained in:
Dave Hylands 2019-02-14 12:38:48 -08:00 committed by Damien George
parent 67b326d97e
commit a270cf280b

View File

@ -509,8 +509,18 @@ void RTC_WKUP_IRQHandler(void) {
void RTC_IRQHandler(void) {
IRQ_ENTER(RTC_IRQn);
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_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);
}