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.

TMS320F2811: TMS320F2811

Part Number: TMS320F2811

I am working with one project where tms320f2811 is used and we do use CAN peripheral in it. My question was how to detect if ECU is disconnected from CAN bus.

Do  we have any register to tell if ECU is connected with CAN Bus or not. My application wants to know if can bus is connected or disconnected. I searched through the documents of Can Driver and Can Transceiver driver... But I am unable to get any information regarding this Open Bus detection. Transceiver detects short circuit errors but not open circuit.

  • Nikhil,

                I can think of the following method: Transmit a dummy frame. If the node is disconnected from the bus, there will be no ACK. This should set the ACKE bit in CANES and also increment the TEC to 128. See Debug tips in SPRS876 for more information.

  • Hi Hareesh,
    Thank you very much for your reply. I will definitely go through the SPRS876. Only the problem I am not able to get any document on line with this name SPRS876. Could you please provide me the link.

    And Just for clarity, My requirement is on ECU running condition if suppose CAN gets disconnected. That time application need to figure out the CAN is in Open Condition. Sending dummy frame we can do during debugging. But in real scenario when to send dummy frames. Any idea if Controller has any status bit for the same.

    And just to confirm on your previous feedback on TEC counter will increment to 128. will it be TEC or REC As what we observe in CAN Open case it wont go to Bus Off condition. There is a reading too in online "As per the clarification got from NXP, The CAN controller can able to read back its own sent messages even though the bus line is open.Hence, there won't be a chance of transmit error count, only the receive error count will get increased due to no acknowledgement. So, "Bus Off" will not happen when CANH or CANL is disconnected from the network."

     

    Thanks,
    Nikhil

  • I apologize for providing the incorrect literature number. It is SPRA876 (http://www.ti.com/lit/an/spra876b/spra876b.pdf). 

    I think you are looking for a feature where the application automatically gets a notification when the node gets disconnected from the bus, correct? i.e. without the need to periodically send dummy frames. You could use the time-out mechanism to sense this condition. If a mailbox does not transmit or receive within a stipulated timeframe, an interrupt can be generated. Of course, this doesn’t account for long periods of “silence” on the bus. This may not be exactly what you were looking for, but there is no way I can think of where the application can be automatically alerted when a node gets disconnected from the bus. 

    Regarding incrementing of the error counters, I did the experiment several years back and my recollection is that the TEC increments to 128 and stops there. You are correct that the node won’t go into bus-off in this condition.

  • Hi Hareesh,

    Thanks for all you information and support. Document was really help full.

    Just got one doubt if any other condition where TEC stops at 128. and REC remains 0. Because I was thinking if we can directly read the  ACKE bit and then TEC =128 and REC =0 counters for some time and conclude the state as CAN open or HS is down.

    Thanks,

    Nikhil

  • AFAIK, TEC stops at 128 only for the lack of ACK. The key word here is "stops". There could always be a transient situation where TEC = 128 & REC = 0. I am saying this in case you are thinking you will continuously read these registers to determine the error condition you are interested in. Understand you are checking ACKE as well, but what if it was set a long time back and the code did not clear the flag? 

    One more thing to consider: I don’t know about your network config. Specifically whether a node will always be present to provide an ACK. What if there are no nodes to provide an ACK? This is a genuine situation where TEC=128 & ACKE=1, but your F2811 node is very much connected to the bus?

  • To clarify, you don’t want your application to erroneously determine that your node is no more connected to the bus when the real reason may be that there are simply no other nodes on the bus to provide an ACK.

  • Hi Hareesh,

    Sorry for late reply. Was out of office and did not had access to emails.

    Yes the controller is very much connected to Bus where more then two nodes are connected.

    And in my case only I was looking the way where HS CAN is down, my ECU should behave normally as per requirement.

    Even complete CAN driver is given by vendor so I may need to check with them now if Mail box logic (no Tx-Rx for determine time period) possible.

    Any way thanks for you support Its really nice talking to you!

    Please let me know if you see if other possibility. I thought Controller already would have stored some bit information for this scenario. 

    Thanks,

    Nikhil

  • No, there are no bits to help determine if the node is connected to the bus. You have to rely on methods I had outlined earlier (mindful of the possibility that the node in question may still be connected to the bus, but there is no other node on the bus capable of ACKing)