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.

TMS320F2800157: MCAN not going into bus off state

Part Number: TMS320F2800157

I am trying to force MCAN into bus-off state by transmitting frames and shorting CANH and CANL. It goes into error passive mode quickly, but then transmit error counter (TEC) stops incrementing after getting to 128. 

As i have been reading, with automatic frame retransmittion, MCAN should continue trying to transmit the frame, and TEC should continue incrementing up to 255 and then going into bus - off state. But in Design tips for CAN (pdf from TI - https://www.ti.com/lit/an/spracu9/spracu9.pdf?ts=1701944094163, section 4.1) saying that TEC indeed increments up to 128 and then stops, while MCAN is still retransmitting, waiting to get and ACK and NOT going into bus off. 

My questions are why does TEC not increment up to 255 and go into bus off? Do i have to introduce some other kind of error to go into bus off? 

I would also like to know why there is no mention of bus-off recovery in reference manual of my TMS320 under MCAN section?

With best regards, M

  • Hi Matic,

    Did you monitor MCAN_PSR.BO bit to see if the bus actually went off?  Unlike DCAN, there is no automatic bus-off recovery on MCAN.  Recovery has to be managed by the user.  The indirect way to perform a bus-off recovery in MCAN is mentioned in MCAN_PSR.LEC description below.  User has to poll MCAN_PSR.BO or enter an ISR to service a bus-off condition by enabling MCAN_IE.BOE (bus-off enable) and assigning the interrupt lines for bus-off with registers MCAN_ILS and MCAN_ILE then clear CCCR.INIT to 0 in that ISR routine to allow for bus-off recovery.  Here is the snippet on the MCAN_PSR.LEC for the recovery description:

    Regards,

    Joseph

  • Thank you for the help, i got it working. And i managed to put it into bus off condition by shorting MCU can tx and rx pins together (as opposed to shorting the lines after the transciever).

    Best regards, M