Skip to content

Commit

Permalink
fix(threads/rp2040): enable SIO_IRQ_PROC0 interrupt
Browse files Browse the repository at this point in the history
  • Loading branch information
elenaf9 committed Sep 18, 2024
1 parent 57e9515 commit ececc6c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/riot-rs-threads/src/smp/rp2040.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use crate::arch::{Arch as _, Cpu};
use cortex_m::peripheral::SCB;
use embassy_rp::{
interrupt,
interrupt::InterruptExt as _,
multicore::{spawn_core1, Stack},
peripherals::CORE1,
};
Expand All @@ -25,11 +26,15 @@ impl Multicore for Chip {
static STACK: ConstStaticCell<Stack<4096>> = ConstStaticCell::new(Stack::new());
// Trigger scheduler.
let start_threading = move || {
unsafe {
interrupt::SIO_IRQ_PROC1.enable();
}
Cpu::start_threading();
unreachable!()
};
unsafe {
spawn_core1(CORE1::steal(), STACK.take(), start_threading);
interrupt::SIO_IRQ_PROC0.enable();
}
}

Expand Down

0 comments on commit ececc6c

Please sign in to comment.