aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-rp/src/time_driver.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-rp/src/time_driver.rs b/embassy-rp/src/time_driver.rs
index aa5d564e7..d598287a9 100644
--- a/embassy-rp/src/time_driver.rs
+++ b/embassy-rp/src/time_driver.rs
@@ -86,6 +86,9 @@ impl TimerDriver {
86 fn check_alarm(&self) { 86 fn check_alarm(&self) {
87 let n = 0; 87 let n = 0;
88 critical_section::with(|cs| { 88 critical_section::with(|cs| {
89 // clear the irq
90 TIMER.intr().write(|w| w.set_alarm(n, true));
91
89 let alarm = &self.alarms.borrow(cs); 92 let alarm = &self.alarms.borrow(cs);
90 let timestamp = alarm.timestamp.get(); 93 let timestamp = alarm.timestamp.get();
91 if timestamp <= self.now() { 94 if timestamp <= self.now() {
@@ -96,9 +99,6 @@ impl TimerDriver {
96 TIMER.alarm(n).write_value(timestamp as u32); 99 TIMER.alarm(n).write_value(timestamp as u32);
97 } 100 }
98 }); 101 });
99
100 // clear the irq
101 TIMER.intr().write(|w| w.set_alarm(n, true));
102 } 102 }
103 103
104 fn trigger_alarm(&self, cs: CriticalSection) { 104 fn trigger_alarm(&self, cs: CriticalSection) {