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.

TMS320F28067: CAN bus-off indication disappears

Part Number: TMS320F28067

Hello,

I am able to reproduce the following situation:

I intentionally short circuit the CAN_HI and CAN_LO lines in order to generate a bus-off condition. Furthermore I run the following function every 62.5[us] out of a timer IRQ.

It can be seen that I detected 88 times a bus-off condition, so for a time duration of 88 x 62.5us = 5.5ms.

The CCR bit inside the CANMC register indicates this situation (note that the ABO bit is set to 0).

 

But the BO bit is cleared after 5.5[ms] and I don't know why this is happening since I did not yet called a function that exits the bus-off condition via clearing the CCR bit.

The CAN controller is not operating and the time stamp counter register CANTSC is not incrementing until I clear the CCR bit. So the bus-off condition seems to be pending.

Is this a normal situation, especially the fact that the BO bit gets automatically 0 after a short time?

  • Andreas,
    The (set) CCR bit is a more reliable indicator of the bus-off condition than the BO bit. According to the spec, only the first flagged error is stored in the CANES register. For other bits to be set, the first flag needs to be cleared. I am wondering if a previously set bit is preventing BO from being set. That does beg the question why that doesn’t happen the previous 87 times.

    It does appear your node is in BO, based on the fact that CCR bit is set.

    Do you see this behavior consistently after 88 iterations?
  • Hello Hareesh,

    I see. I thought the bus-off flag BO is being cleared automatically in case that the bus-off condition is exited but obviously each error flag must be individually cleared and actions have to be taken to get out of the error situation.

    Maybe some other code of the 3rd party CAN stack clears the bus-off indication via a write access to the CANES register after a while and therefore I run into the above situation. I will investigate further in that direction.

    Thanks for the clarification.

    Andreas

  • OK. I will close the thread for now.