diff options
| author | Lena Berlin <[email protected]> | 2024-09-11 11:36:24 -0400 |
|---|---|---|
| committer | Lena Berlin <[email protected]> | 2024-10-08 11:18:59 -0400 |
| commit | df0fc041981105a19beb690e30c3ab1f532d7298 (patch) | |
| tree | 4942f558cbc5411d5faf1b286f2764e9371abff9 | |
| parent | 1cf778904d597a5bc01a4b7862f965681636faf1 (diff) | |
fix: stm32l0 low-power EXTI IRQ handler wiped pending bits before they were checked
| -rw-r--r-- | embassy-stm32/src/exti.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-stm32/src/exti.rs b/embassy-stm32/src/exti.rs index 224d51b84..87512c92d 100644 --- a/embassy-stm32/src/exti.rs +++ b/embassy-stm32/src/exti.rs | |||
| @@ -41,9 +41,6 @@ fn exticr_regs() -> pac::afio::Afio { | |||
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | unsafe fn on_irq() { | 43 | unsafe fn on_irq() { |
| 44 | #[cfg(feature = "low-power")] | ||
| 45 | crate::low_power::on_wakeup_irq(); | ||
| 46 | |||
| 47 | #[cfg(not(any(exti_c0, exti_g0, exti_u0, exti_l5, exti_u5, exti_h5, exti_h50)))] | 44 | #[cfg(not(any(exti_c0, exti_g0, exti_u0, exti_l5, exti_u5, exti_h5, exti_h50)))] |
| 48 | let bits = EXTI.pr(0).read().0; | 45 | let bits = EXTI.pr(0).read().0; |
| 49 | #[cfg(any(exti_c0, exti_g0, exti_u0, exti_l5, exti_u5, exti_h5, exti_h50))] | 46 | #[cfg(any(exti_c0, exti_g0, exti_u0, exti_l5, exti_u5, exti_h5, exti_h50))] |
| @@ -68,6 +65,9 @@ unsafe fn on_irq() { | |||
| 68 | EXTI.rpr(0).write_value(Lines(bits)); | 65 | EXTI.rpr(0).write_value(Lines(bits)); |
| 69 | EXTI.fpr(0).write_value(Lines(bits)); | 66 | EXTI.fpr(0).write_value(Lines(bits)); |
| 70 | } | 67 | } |
| 68 | |||
| 69 | #[cfg(feature = "low-power")] | ||
| 70 | crate::low_power::on_wakeup_irq(); | ||
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | struct BitIter(u32); | 73 | struct BitIter(u32); |
