Where does CAN BUS arbitration occur

Im going through the CAN bus examples and it mentions arbitraion. Going through the CAN class .h and .cpp files i cannot find any function that would perform arbitration.
The attach function has type CAN::AlIrq for arbitration lost. But where is this arbitration happening? Is this happening at a much lower OS level?
If it is happening at OS level. How do i ensure my message is sent again? Or does the board ensure that on its own?

Hello Maaz,

The arbitration is done by the CAN controller (a piece of hardware implemented on the chip). Everything is done automatically. If the CAN bus is busy with higher priority message then the arbitration is lost and the hardware (CAN controller) initiates a new one until the message is sent. For info on error handling have a look at this thread. It is worth to read also CAN-getting started, although written by David Smart for Mbed OS 2.

Best regards, Zoltan

1 Like

Thank you for your help.