From 4fcc74dbd3906db35a56dc179b08b23bfd5bdffa Mon Sep 17 00:00:00 2001 From: Bogdan Petru Chircu Mare Date: Thu, 6 Nov 2025 13:04:42 -0800 Subject: chore(mcxa276): pin mcxa-pac to a9dd33; docs: OS_EVENT/WAKETIMER0 fix now historical with SVD 25.06.00 --- Cargo.toml | 2 +- README.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fd3fba042..cf7ba854e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ name = "embassy_mcxa276" [dependencies] cortex-m = { version = "0.7", features = ["critical-section-single-core"] } cortex-m-rt = { version = "0.7", features = ["device"] } -mcxa276-pac = { git = "https://github.com/bogdan-petru/mcxa-pac", features = ["rt"] } +mcxa276-pac = { git = "https://github.com/bogdan-petru/mcxa-pac", features = ["rt"], rev = "a9dd330149912c26f252f0f3c419f6435c1216e2", version = "0.1.0" } embedded-io = "0.6" # Optional defmt support defmt = { version = "0.3", optional = true } diff --git a/README.txt b/README.txt index 7baf8a9cb..80fa81b07 100644 --- a/README.txt +++ b/README.txt @@ -312,6 +312,8 @@ cargo build --features "lpuart2 rtc0" --example rtc_alarm ### Critical Fix: MCXA276 Interrupt Vector Table + +Update (SVD 25.06.00, mcxa-pac a9dd33): No manual PAC edits are required anymore. OS_EVENT and WAKETIMER0 are present and the vector table is correct. The section below is kept for historical context. **Problem:** The OSTIMER examples crashed during interrupt handling with a hardfault (SP=0x00000000). Investigation revealed the OS_EVENT interrupt vector was NULL in the vector table, causing the CPU to jump to address 0 when OSTIMER interrupts fired. **Root Cause:** The `mcxa276-pac/src/lib.rs` file (generated from the SVD file) was missing the `WAKETIMER0` interrupt handler declaration. This caused the `__INTERRUPTS` array to have an off-by-one error, placing OS_EVENT at IRQ 58 instead of the correct IRQ 57 position. @@ -337,4 +339,4 @@ Using `#[inline(always)]` can cause the Rust compiler to generate incorrect asse ## License -This project is licensed under MIT OR Apache-2.0. +This project is licensed under MIT OR Apache-2.0. \ No newline at end of file -- cgit