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.

TMS320F280049: Question about bus-off

Part Number: TMS320F280049


Hi Champ,

Suppose one frame message is 8 bytes, if CAN module  just send 2 bytes data, does it possible the CAN enter bus-off state?

 if possible , when the auto bus on happened , CAN module will continue send out the next  6 bytes data or not? or CAN will  resend 8 bytes data again? or no data will be send out?

 

  • What you describe cannot happen. CAN module will transmit as many bytes as the DLC value is. For example, if DLC=2, 2 bytes will be transmitted. If DLC=7, 7 bytes will be transmitted. Once you configure the DLC value, from that point on, you don't have control over how many bytes are transmitted. It will be exactly equal to the DLC value. Even if you don’t explicitly write the bytes to be transmitted in the message RAM, the module will transmit whatever is contained in the Message RAM, even if it is some garbage value.

  • That means the CAN module impossible to enter bus off if one frame message data didn't finish transmit?

    I have another question, if one frame message be request to transmit but  didn't start transmission, if  the CAN module enter bus off state,  when AUTO bus on , the previous message frame will be transmit  automatic or will be abort?

  • That means the CAN module impossible to enter bus off if one frame message data didn't finish transmit?

    This is a very complex question. It depends on why the frame didn’t finish transmit. If the source of error is some other node, the transmitting node will not enter BO. If the source of error is the transmitting node itself, then the Transmit error counter will increment and eventually force the node to bus-off.  A node enters bus-off based on the value of error counters. It does not go bus-off based on a single event.

    I have another question, if one frame message be request to transmit but  didn't start transmission, if  the CAN module enter bus off state,  when AUTO bus on , the previous message frame will be transmit  automatic or will be abort?

    It will be transmitted automatically, since the transmit request will not be cleared upon BO. Note that BO is a serious error condition and customer should investigate the root-cause of the errors during communication. In a properly designed/configured network, communication errors should be rare. It could happen due to external noise, but the bus should recover on its own once the disturbances vanish. That is how the protocol is designed.

     

  • HI Haressh,

    Maybe i didn't describe my question clearly.

    Suppose before transmit the message frame , the CAN  in bus on state,  during CAN transmit this message frame(didn't finish entire message  frame  transmission) , does it is possible the CAN enter the  bus -off state?  or CAN module just can enter bus off  when finished transmit the entire message frame?

  • As explained before, a node does not go bus-off based on a single error event. A node goes bus-off when the Transmit Error Counter (TEC) reaches 256. There is a complex set of rules that determine how TEC and REC are incremented/decremented. You need to refer to the CAN protocol spec for that. To simplify, one could say TEC is incremented by 8 every time the transmitter is the source of the error.

    during CAN transmit this message frame(didn't finish entire message  frame  transmission)

    Why didn't it finish the frame transmission? Who is the cause of the error? That would determine how TEC would increment and by how much. If the TEC increments all the way to 256, node would enter BO. Without knowing who is causing the error and whether the error is a one-off error or is a repeated error, I cannot say whether the node would enter BO.

    or CAN module just can enter bus off  when finished transmit the entire message frame?

    When any kind of error occurs on the bus, the current transmission is immediately aborted. That frame will be re-transmitted by the transmitter. 

    If you could provide me some background on why you are asking this question, I can help you better. Error handling and fault confinement are hard to understand because of the complex set of rules that govern how TEC/REC are incremented.