feat: add bus-off error handling in CAN error status register with error blinking loop

This commit is contained in:
2026-04-30 20:27:38 +02:00
parent 2e16163b0e
commit 542ff578bc

View File

@@ -429,6 +429,11 @@ async fn can_task(
} }
} }
// Check CAN error status register for bus-off condition
if hal::pac::CAN1.errsr().read().boff() {
blink_error_loop(info, warn, 3, 3).await; // Bus-off error
}
while let Ok(mut frame) = CAN_TX_CH.try_receive() { while let Ok(mut frame) = CAN_TX_CH.try_receive() {
match can.transmit(&mut frame) { match can.transmit(&mut frame) {
Ok(..) => { Ok(..) => {