summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Hylands <dhylands@gmail.com>2015-04-28 00:17:05 -0700
committerDave Hylands <dhylands@gmail.com>2015-04-28 00:17:05 -0700
commitfdcb3b7ebbb611497866123ec050fc99e5185cd8 (patch)
tree882dc650b2486cd9fd33036753e5ed280fb1e318
parent9472907ae1906ccff7ce5cab24f0fa9d146c4534 (diff)
stmhal: Actually disable unhandled timer interrupts.
-rw-r--r--stmhal/timer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stmhal/timer.c b/stmhal/timer.c
index ecb1f3bf7..68f295b74 100644
--- a/stmhal/timer.c
+++ b/stmhal/timer.c
@@ -1382,6 +1382,7 @@ void timer_irq_handler(uint tim_id) {
// just get called continuously.
uint32_t unhandled = tim->tim.Instance->DIER & 0xff & ~handled;
if (unhandled != 0) {
+ __HAL_TIM_DISABLE_IT(&tim->tim, unhandled);
__HAL_TIM_CLEAR_IT(&tim->tim, unhandled);
printf("Unhandled interrupt SR=0x%02lx (now disabled)\n", unhandled);
}