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.

CAN communication Stuff Error

Other Parts Discussed in Thread: TMS320F28035

Hi all,

Currently i am working on implementation of CAN communication protocol on TMS320F28035 board.For now i am only checking transmission of data frames.

CAN is in Standard mode.I am testing my CAN communication on PEAK systems CAN BUS Analyzer-PCAN. At 1 Mbps,every data transmitted by TMS is received correctly on PCAN.

But when i go for lower bit rates like 500 Kbps or 250 Kbps.I am not able to receive my data correctly.

After some workaround i have found that it is related to stuff error.

For eg: when i transmitData High = 0xAAAAAAAA and Data Low = 0x55555555 

there is no problem because there is no stuffing required(No consecutive bits).

For eg: Data High = 0x00000000 and Data Low = 0x00000001 - i am observing problem due to lot of stuff required.

So problem is as stuffing required to be done in data bits is increasing ,error  is also receiving.

Can anyone please tell me solution for this problem? I do not wanted to restricted in terms of data.

  • Siddharth,

                This is very intriguing. Typically, if one doesn’t pay careful attention to bit timing parameters (such as SJW & Sampling-Point), communication will be OK at lower bit-rates but become increasingly error-prone as the bit-rate increases. But, what you are saying is exactly the opposite. I do not believe your problem is due to bit-stuffing. It should not matter whether the transitions (from 0-->1 or 1-->0) are part of the data stream or inserted by the CAN protocol. Exactly, what error do you get? Are you seeing the SE bit set in CANES register? Do you see the same issue when the 28035 receives such messages?

  • Siddharth,
    Could you also clarify if this is seen in multiple devices or just seen in a single device? Also, have you tried this in self-test mode?
  • Hi Hareesh sir,

    Basically i have already verified my bit timing settings with TI ECAN user manual.So it is surely not a timing Issue.So after getting this type of error following are the things i have done to find out where the problem is

    1) Firstly i increased consecutive bits with same bit level and tried to see whether error is increasing or not. So what i found on PCAN trace is in following picture and error is also continuously increasing with increase in bits with same level.

       But the same data at 1Mbps is transmitted without any error.On observing waveform of CAN LOW of both baud rates(1 Mbps and 500 Kbps) on DSO,there was no difference except acknowledgement bit(getting on 1 Mbps and not on 500 Kbps)

    2) After spending too much time on this issue , i decided to change my receiving node.So i changed it to Arduino Uno with CAN shield.But in that also i am facing the same problem.

    3) Lastly,i checked with TMS320f28035.So every thing started to work fine.Every bit is transmitted and received correctly on both sides.

    So what i found the conclusion that the error was due to difference in voltage levels. As TMS is working at 3.3V and PCAN/Arduino is working at 5.0V.

    But still this conclusion is not enough to conclude because if this is so,then why every thing is working at 1 Mbps?

    I am still thinking for reason.If you think of any reason please tell me?

    Thanking You. 

  • Siddharth,

    The difference in voltage levels should not matter. Please read the following thread carefully (specifically, the PDF attachment it points to)

    http://e2e.ti.com/support/interface/industrial_interface/f/142/p/230101/809870?keyMatch=5v%20can%20transceiver&tisearch=Search-EN-Everything

  • Siddharth,

    I am curious if you figured out the root-cause of the issue. Another customer is facing the identical issue: https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/492272