Skip to content

Commit 9b1add3

Browse files
authored
Merge pull request #4794 from doxxx/gpio-nointr
mspm0: group irq handlers must check for NO_INTR (#4785)
2 parents 2c1c523 + 102cceb commit 9b1add3

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

embassy-mspm0/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
<!-- next-header -->
99
## Unreleased - ReleaseDate
10-
10+
1111
- feat: Add I2C Controller (blocking & async) + examples for mspm0l1306, mspm0g3507 (tested MCUs) (#4435)
1212
- fix gpio interrupt not being set for mspm0l110x
1313
- feat: Add window watchdog implementation based on WWDT0, WWDT1 peripherals (#4574)
@@ -17,3 +17,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
- fix: add MSPM0C1106 to build test matrix
1818
- feat: add MSPM0H3216 support
1919
- feat: Add i2c target implementation (#4605)
20+
- fix: group irq handlers must check for NO_INTR (#4785)

embassy-mspm0/build.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,15 @@ fn generate_groups() -> TokenStream {
194194
use crate::pac::#group_enum;
195195

196196
let group = crate::pac::CPUSS.int_group(#group_number);
197-
// MUST subtract by 1 since 0 is NO_INTR
198-
let iidx = group.iidx().read().stat().to_bits() - 1;
197+
let stat = group.iidx().read().stat();
198+
199+
// check for spurious interrupts
200+
if stat == crate::pac::cpuss::vals::Iidx::NO_INTR {
201+
return;
202+
}
203+
204+
// MUST subtract by 1 because NO_INTR offsets IIDX values.
205+
let iidx = stat.to_bits() - 1;
199206

200207
let Ok(group) = #group_enum::try_from(iidx as u8) else {
201208
return;

0 commit comments

Comments
 (0)