File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -509,8 +509,18 @@ void RTC_WKUP_IRQHandler(void) {
509
509
510
510
void RTC_IRQHandler (void ) {
511
511
IRQ_ENTER (RTC_IRQn );
512
- RTC -> ISR &= ~RTC_ISR_WUTF ; // clear wakeup interrupt flag
513
- Handle_EXTI_Irq (EXTI_RTC_WAKEUP ); // clear EXTI flag and execute optional callback
512
+ if (RTC -> ISR & RTC_ISR_WUTF ) {
513
+ RTC -> ISR &= ~RTC_ISR_WUTF ; // clear wakeup interrupt flag
514
+ Handle_EXTI_Irq (EXTI_RTC_WAKEUP ); // clear EXTI flag and execute optional callback
515
+ }
516
+ if (RTC -> ISR & RTC_ISR_ALRAF ) {
517
+ RTC -> ISR &= ~RTC_ISR_ALRAF ; // clear Alarm A flag
518
+ Handle_EXTI_Irq (EXTI_RTC_ALARM ); // clear EXTI flag and execute optional callback
519
+ }
520
+ if (RTC -> ISR & RTC_ISR_TSF ) {
521
+ RTC -> ISR &= ~RTC_ISR_TSF ; // clear timestamp flag
522
+ Handle_EXTI_Irq (EXTI_RTC_TIMESTAMP ); // clear EXTI flag and execute optional callback
523
+ }
514
524
IRQ_EXIT (RTC_IRQn );
515
525
}
516
526
You can’t perform that action at this time.
0 commit comments