Merge pull request #3284 from korken89/fix-can-log-spam

stm32: Fix log storm when no CAN is connected
This commit is contained in:
Ulf Lilleengen 2024-08-25 06:04:48 +00:00 committed by GitHub
commit f4c7ec7462
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,7 +68,6 @@ pub struct SceInterruptHandler<T: Instance> {
impl<T: Instance> interrupt::typelevel::Handler<T::SCEInterrupt> for SceInterruptHandler<T> {
unsafe fn on_interrupt() {
info!("sce irq");
let msr = T::regs().msr();
let msr_val = msr.read();
@ -76,9 +75,8 @@ impl<T: Instance> interrupt::typelevel::Handler<T::SCEInterrupt> for SceInterrup
msr.modify(|m| m.set_slaki(true));
T::state().err_waker.wake();
} else if msr_val.erri() {
info!("Error interrupt");
// Disable the interrupt, but don't acknowledge the error, so that it can be
// forwarded off the the bus message consumer. If we don't provide some way for
// forwarded off the bus message consumer. If we don't provide some way for
// downstream code to determine that it has already provided this bus error instance
// to the bus message consumer, we are doomed to re-provide a single error instance for
// an indefinite amount of time.