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 bus configuration issue - CAN communication with CANoe(from Vector)

Hi All,

Currently I have got some issue of making Hercules(TMS570LS3) CAN port working with CANoe(using Philip SJA1000).

Basically, I wrote a CAN receiving software for TMS570LS3 that try to receive CAN message from the CAN port. I simply connect the CAN port on TMS570LS3 to CANoe. I make CANoe to send a lot of CAN messages. I configure the CAN mask register to receive all CAN messages, and configure the Bit Timing Register of TMS570LS3 to (500kbps, 16cycle 75%sample point SJW=3)

       canREG1->BTR = (0U << 16U) |

                   ((4U - 1U) << 12U) |

                   ((11U - 1U) << 8U) |

                   ((3U - 1U) << 6U) |

                   9U;

CANoe settings are:

It never work. I actually have 2 TMS570LS3, so on One 570LS3 I periodically send  CAN messages and the Other receive. And I attached the CANoe on the bus and try to scan to find the right baudrate for CANoe. Scan range(0-1000 kbps), but failed to find any suitable bauderate. Could you help me to figure out what the problem is please?

Many thanks

Shawn

  • Hi Shawn,

    we don't have CANoe complete equipment here in TI, so i can not help you debugging this.

    can you pls. get in touch with Vector support in your region?

    You can also try to isolate the issue by first making sure that you an communicate between two CAN nodes in the same device to make sure that the low level driver working as expected.  If they work, then, the issue on how to interface to CANoe.

  • Hi Henry,

    Thanks for your reply.

    The two CAN nodes( two TMS570LS3) works fine together. The issue is that we have the real vehicle CAN network here, and the CANoe is used to trace all the CAN communication on this network. Also the CANoe could simulate this CAN network. We want to add the TMS570LS3 as a node to this network, but failed both ways. Couldn't make TMS570LS3 communicate with either CANoe or the vehicle CAN network. I have already contact FAE from vector to discuss how to find the actual problem. Since the two TMS570LS3 could communicate with each other, FAE from vector suggested that I attached the CANoe to the communication CAN bus of TMS570LS3s, and use scan function of CANoe ( scan from baud rate 0kbps-1000kbps) to see whether CANoe could determine a suitable baud rate, but failed. And at least FAE from vector said that the CANoe has a relatively high tolerance to allow slight differently set CAN nodes to communicate with it.

    Since CANoe could connect to the vehicle CAN network without any issues, I would have to say that the problem is from the TMS570LS3 side. (I also try to add the TMS570LS3 to the vehicle CAN network by setting baud rate to 500kbs, high speed can, but it doesn't work either) To my understanding, the CAN bus is really a simple bus system. For our usage, we only need to set the correct Baud rate to be able to let CAN nodes communicate with each other. With TMS570LS3, it is a bit complicated, we need to set the right value to the bit timing register(Sample points, BRP, SJW and etc.). But other then settings, there shouldn't be any issues.

    I am just stuck, and don't know how to proceed then. Any suggestions are very well appreciated!

    Many thanks,

    Shawn

  • Shawn,

    I would suggest starting by collecting some oscilloscope pictures of the bus activity on the CAN bus at the TMS570 maybe even on both sides of the transceiver.

    This would help give a picture of what might be happening and could give some direction to dig further.

    -Anthony

  • Hi Shawn,

    The CAN BRP and other parameters are standard configuration every CAN node on the CAN network has to go through and this needs to be done correctly for each network baudrate & intrisic delay.  

    You can see this info on chapter 24.3. 

    I got the message from Ken that he already solved the problem for you.  

    That is a good news, so we can close this thread.

  • Hi Henry,

        Yes, I have already solved this problem for Shawn. You can close this thread too.

    Ken Wang

  • Hi Anthony and Henry,

    Thank you for your reply, and yes Ken helped me to solve the issue. To make it work, we have to connect the GND on TMS570LS3 to the GND on CANoe, which is a bit odd, since for high speed CAN, I was told that there is no need to connect GND. But anyway I am a happy man now:)

    Many thanks,

    Shawn