diff options
| author | James Munns <[email protected]> | 2025-12-08 17:58:00 +0100 |
|---|---|---|
| committer | James Munns <[email protected]> | 2025-12-08 17:58:00 +0100 |
| commit | 6680ef22fa4b46adb4cda46d6cdbc9dac39dc78c (patch) | |
| tree | 367bfba7c960798db8f5813629e5bb206158e80c /embassy-mcxa/src/lib.rs | |
| parent | 5d8f3a3d18eda339e258193295cf332d7e01882e (diff) | |
Clean up examples, move interrupts to be more fully managed
Diffstat (limited to 'embassy-mcxa/src/lib.rs')
| -rw-r--r-- | embassy-mcxa/src/lib.rs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/embassy-mcxa/src/lib.rs b/embassy-mcxa/src/lib.rs index 23cda7511..724f99234 100644 --- a/embassy-mcxa/src/lib.rs +++ b/embassy-mcxa/src/lib.rs | |||
| @@ -400,41 +400,6 @@ pub fn init(cfg: crate::config::Config) -> Peripherals { | |||
| 400 | peripherals | 400 | peripherals |
| 401 | } | 401 | } |
| 402 | 402 | ||
| 403 | // /// Optional hook called by cortex-m-rt before RAM init. | ||
| 404 | // /// We proactively mask and clear all NVIC IRQs to avoid wedges from stale state | ||
| 405 | // /// left by soft resets/debug sessions. | ||
| 406 | // /// | ||
| 407 | // /// NOTE: Manual VTOR setup is required for RAM execution. The cortex-m-rt 'set-vtor' | ||
| 408 | // /// feature is incompatible with our setup because it expects __vector_table to be | ||
| 409 | // /// defined differently than how our RAM-based linker script arranges it. | ||
| 410 | // #[no_mangle] | ||
| 411 | // pub unsafe extern "C" fn __pre_init() { | ||
| 412 | // // Set the VTOR to point to the interrupt vector table in RAM | ||
| 413 | // // This is required since code runs from RAM on this MCU | ||
| 414 | // crate::interrupt::vtor_set_ram_vector_base(0x2000_0000 as *const u32); | ||
| 415 | |||
| 416 | // // Mask and clear pending for all NVIC lines (0..127) to avoid stale state across runs. | ||
| 417 | // let nvic = &*cortex_m::peripheral::NVIC::PTR; | ||
| 418 | // for i in 0..4 { | ||
| 419 | // // 4 words x 32 = 128 IRQs | ||
| 420 | // nvic.icer[i].write(0xFFFF_FFFF); | ||
| 421 | // nvic.icpr[i].write(0xFFFF_FFFF); | ||
| 422 | // } | ||
| 423 | // // Do NOT touch peripheral registers here: clocks may be off and accesses can fault. | ||
| 424 | // crate::interrupt::clear_default_handler_snapshot(); | ||
| 425 | // } | ||
| 426 | |||
| 427 | /// Internal helper to dispatch a type-level interrupt handler. | ||
| 428 | #[inline(always)] | ||
| 429 | #[doc(hidden)] | ||
| 430 | pub unsafe fn __handle_interrupt<T, H>() | ||
| 431 | where | ||
| 432 | T: crate::interrupt::typelevel::Interrupt, | ||
| 433 | H: crate::interrupt::typelevel::Handler<T>, | ||
| 434 | { | ||
| 435 | H::on_interrupt(); | ||
| 436 | } | ||
| 437 | |||
| 438 | /// Macro to bind interrupts to handlers, similar to embassy-imxrt. | 403 | /// Macro to bind interrupts to handlers, similar to embassy-imxrt. |
| 439 | /// | 404 | /// |
| 440 | /// Example: | 405 | /// Example: |
