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.

TMS570LS1224: canEnableloopback HALCoGen API not waiting for CAN cell test mode transition

Part Number: TMS570LS1224
Other Parts Discussed in Thread: HALCOGEN,

Dear,

I had implemented loopback testing for my CAN interface as suggested by the safety manual. This worked on our HW revision at the time. 

I now have the situation of the loopback test failing sporadically due to the frame not being received. Strangely the frequency of occurence for CAN1 is higher than for CAN3.

I have investigated and I found out that I had to add a delay of 20us after calls to APIs canEnableloopback() and canDisableloopback() for this to work reliably. I assume that the CAN cell takes some time to do its test mode transition as commanded by these APIs, but the APIs immediately return instead of waiting.

While the issue is solved with the introduction of these waiting times, I am concerned about the change in timing behaviour that coicided with our new HW revision. Hence I am wondering:

  • Can you confirm my interpretation of this observation?
  • If so, what waiting time would be recommended by TI?
  • Are there external factors that could impact CAN cell timing behaviour?
  • If so, which one (supply voltage stability, temperature, etc.)?
  • Are APIs or their documentation lacking in this regard?

Thank you for your support.

Julian

  • Hi Julian,

    We never came across this issue before.

    1. The HALCoGen driver APIs (canEnableLoopback() and canDisableLoopback()) do not appear to document any required delay after mode changes

    2. The TMS570LS1224 Technical Reference Manual describes the loopback mode functionality but doesn't specify timing requirements for mode transitions

    And also, there were no other bits affecting with loopback enable, only the corresponding loopback bit is enabling, so there are no other flags to poll for loopback enable.

    So, our suggestion is to keep the 20µs delay as it is in your code.

    --
    Thanks & regards,
    Jagadish.