summaryrefslogtreecommitdiff
path: root/stmhal/stm32f4xx_it.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-03-15 17:15:55 +0000
committerDamien George <damien.p.george@gmail.com>2015-03-15 17:15:55 +0000
commitdac79324b5a49a81435a9dafc389353a4fa8739b (patch)
tree51954db200a982357ad7b1bbfed46a18696fa8bd /stmhal/stm32f4xx_it.c
parent1ef26b35c1682637de143ccb0449acb42428ed5c (diff)
stmhal: Add rtc.wakeup method, to set wakeup timer.
This allows to wake from low-power modes at a regular interval. This method is preliminary, pending testing and API overhaul.
Diffstat (limited to 'stmhal/stm32f4xx_it.c')
-rw-r--r--stmhal/stm32f4xx_it.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stmhal/stm32f4xx_it.c b/stmhal/stm32f4xx_it.c
index f06c4081c..9be180a05 100644
--- a/stmhal/stm32f4xx_it.c
+++ b/stmhal/stm32f4xx_it.c
@@ -341,7 +341,8 @@ void TAMP_STAMP_IRQHandler(void) {
}
void RTC_WKUP_IRQHandler(void) {
- Handle_EXTI_Irq(EXTI_RTC_WAKEUP);
+ RTC->ISR &= ~(1 << 10); // clear wakeup interrupt flag
+ Handle_EXTI_Irq(EXTI_RTC_WAKEUP); // clear EXTI flag and execute optional callback
}
void TIM1_BRK_TIM9_IRQHandler(void) {