Browse Source

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

pull/4530/head
Dave Hylands 6 years ago
committed by Damien George
parent
commit
a270cf280b
  1. 14
      ports/stm32/stm32_it.c

14
ports/stm32/stm32_it.c

@ -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);
}

Loading…
Cancel
Save