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.

TMS320F280039C: MCAN how to resolve ErrPassive

Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE,

Tool/software:

Hello Everyone
I am using MCAN on TMS320 F280039C
When MCAN goes into ErrPassive, driver lib function MCAN_getProtocolStatus returns "errPassive". 

How to I resolve that?
If I re-initialize the MCAN interface, the interface works fine afterwards, but driverlib (c2000ware) MCAN_getProtocolStatus still shows errPassive. 

What is the intended use to resolve a errPassive state or an errBusoff state?

Thank you for helping me. 

Johannes

  • Johannes,

                Have you investigated into why your node is going into Error-passive or Bus-off state?

    In a properly designed/configured network, communication errors should be rare. Common reasons for errors are

    1. Loose oscillator tolerance
    2. Improper sampling-point selection
    3. Mismatched bit-rates between nodes. This can happen, among other things, due to loose oscillator tolerance
    4. Electrical noise. If the noise is transient, the bus should recover on its own once the disturbances vanish. That is how the protocol is designed. 

    Bus-off is a severe error condition. You should investigate the root-cause of the errors (leading to bus-off) during communication.

    If I re-initialize the MCAN interface, the interface works fine afterwards, but driverlib (c2000ware) MCAN_getProtocolStatus still shows errPassive. 

    Will work with the software team to understand this.

  • Hello Hareesh.
    Thank you for helping me. 

    I am aware, that I should not go into error passive or error busoff. 
    I don't do that. My design works fine without errors. 

    I have to check for the failure cases. 

    What IF I go into error passive? The design / the software should recover from that. 

    I can easily provoke a situation like this:
    * I am the only participant on the bus, not termination resistor is connected (open connection)
    * I apply a short circuit between CanH and CanL irregularly 
    * electro static discharge
    * EMI

    This SHOULD not happen, but it COULD happen. 

    My software should be robust enough to recover from this, once the disturbance is removed. 

    My question is: what is the recommended procedure to check for bus off or error passive or any other error and what are the recommended steps to recover from that state.
    It doesn't say in the user manual to TMS320F280039C. 
    I can read the ECR register (error counter register), there is also a driverlib function to read the protocol status. 
    If I detect an error, what should I do to resolve that (assuming the disturbance is gone) 

  • The Transmit and Receive Error counters increment and decrement automatically based on bus activity. The code doesn’t have to do anything for this. Meaning, a node can go into error-passive state and come out of that state with successful (subsequent) receives. However, for bus-off, the procedure is different and as outlined in https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1181014/tms320f280039c-mcan-bus-recovery

  • Johannes,

                I presume your questions have been answered. Hence I am closing the post.