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.

TMS570LS1227: DCAN Buss Off recovery

Expert 1965 points
Part Number: TMS570LS1227
Other Parts Discussed in Thread: HALCOGEN

I 'm trying to understand & use Bus recovery feature.  I have enabled the CAN1's Auto Bus On configuration, and as thumb-suck number set it to 100 ns.

Then, I plug one CAN cable off.  I do get 3 interrupts, from warning to bus-off error notification bit.  After this, I would expect that Auto Bus recovery of the DCAN to kick-in.

But, after I plug CAN cable back. nothing happens. Bus is not recovered, and my TMS is stuck failing to send anything. Also, no further notifications come, plug or un-plug cable.

How does the recovery work in general? The manual says:

I'm not entirely sure if it's stuck waiting for this condition, or auto-bus off recovery not working or something else.

Any help?

  • Follow UP: 

    I just verified that the Init bit in Ctrl does NOT get cleared for me even though I have enabled Auto bus On in HalCogen.

    What Am I doing wrong with it..

  • Hi,

    A CAN node enters the "BUS_OFF" state only when the TEC value goes above 255. 

    If you unplug the CAN cable, the CAN node is the only node on the CAN bus and it will remain in Error Passive state, and will never enter the Bus Off state. 

    Please take a look at the CAN specification:

  • Follow Up 2:

    Turns out, I had another place where I was changing controller init settings, which didn't restore the Auto Bus recovery feature. 

    After fixing it, it works as I expect - recovers the connection / bus.

  • Mm, I don't think your interpretation is correct. At least in so far as the TI's DCAN module Auto recovery, from what I observe.

    Loosing connection - losing wire in this case - triggers 3 DCAN errors , of which 2 are reported through ISR. 

    First is the Warning,  then is the Passive mode - which is set but not triggering interrupt - and after this, when errors rich the max threshold, the Bus Off error  generated and triggers the ISR.

    After this, if Auto-Bus on is set in DCAN, after the pre-set timeout , it tries to 'recover' it (as defined).  Else, unless Sw re-sets Init bit, your module is silent forever after, until full soc reset.

    Yesterday I confirmed that such an 'easy' (for me ...) error as plug / unplug cable is in fact, nicely caught by DCAN and recovered correctly per my settings.