Skip to content

Commit

Permalink
get rid of routine that sleeps CPU on msp430 temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
vadixidav committed Mar 12, 2023
1 parent 17d7b35 commit 2a43df7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion embassy-executor/src/arch/msp430.rs
Expand Up @@ -64,7 +64,12 @@ impl Executor {
}
// if not, wait for interrupt
else {
asm!("bis #16, R2", options(nomem, nostack, preserves_flags));
// TODO: This stops the CPU, but with Rust it isn't yet clear how to clear
// the CPUOFF bit in the stack's status register before its popped. Likely
// a macro needs to be added to msp430-rt to generate a wrapper that
// ensures the SP on the stack is corrected by calling a generated function.
// asm!("bis #16, R2", options(nomem, nostack, preserves_flags));
asm!("nop", options(nomem, nostack, preserves_flags));
}
});
// if an interrupt occurred while waiting, it will be serviced here
Expand Down

0 comments on commit 2a43df7

Please sign in to comment.