Skip to content

Commit

Permalink
Fix bus-off error handling. (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
bakerstu authored Dec 1, 2022
1 parent 39a07d7 commit 35c3423
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/freertos_drivers/ti/TivaCan.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -210,17 +210,15 @@ void TivaCan::interrupt_handler()
txBuf->flush();
txPending = false;
txBuf->signal_condition_from_isr();

/* attempt recovery */
MAP_CANEnable(base);
}
if (status & CAN_STATUS_EWARN)
{
/* One of the error counters has exceded a value of 96 */
++softErrorCount;
canState = CAN_STATE_BUS_PASSIVE;

/* flush data in the tx pipeline */
txBuf->flush();
txPending = false;
txBuf->signal_condition_from_isr();
}
if (status & CAN_STATUS_EPASS)
{
Expand Down

0 comments on commit 35c3423

Please sign in to comment.