This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Algorithm for monitoring the CAN bus

Hi Team,

Our customer is looking for the algorithm for monitoring the CAN bus similar to the way Vector Tool works. Please see the details of his inquiry below

CAN bus load detection is to be done using algorithm when ever Bus Off or Bus Heavy present. Controller should be able to detect it

I need a Bus Load Detection in a network, the way Vector Tool if connected in any network of CAN , and if it is fully loaded, Then Vector tool will indicate as Bus Heavy or will indicate in % Bus Load also, that algorithm i want

I should be able to detect Bus Off , Bus Heavy or All kind of CAN related notifications

Is the ISO 11898:1993 CAN communication protocol mentioned in the application note below the one he is looking for? 

https://www.ti.com/lit/an/slla067c/slla067c.pdf#page=11

https://www.ti.com/lit/an/sloa101b/sloa101b.pdf

Regards,

Danilo

  • Danilo,

    The total load of a CAN bus is generally calculated as the actual used capacity of the bus as a percent of the total theoretical maximum capacity of the bus. You can accomplish this by counting the total bits in a given timeframe and then dividing the number by the maximum theoretical number of bits that could be transferred in that period.

    Regarding your ISO standard question, the first application note you linked (SLLA067) was originally written before ISO 11898:1993 was superseded. The current CAN standards are ISO 11898-1 and ISO 11898-2, which respectively cover the protocol and the physical layer. These were released in 2015 and 2016.

    Best,

    Danny

  • Hi Danny,

    Thank you for your reponse. Please see the followup inquiry of our customer below.

    How do u calculate, 
    Buss off, 
    Buss heavy, 
    Passive error, 
    Frame error, 
    Bit stuffing, 
    I want to add it's algorithm in my firmware. 

    Regards,

    Danilo

  • Danilo,

    I would recommend checking out Section 12.1.4 "Rules of Fault Confinement" in ISO 11898-1:2015, along with sections 6.12 through 6.15.

    You could also look into products like the Bosch M_CAN.

    Best,

    Danny