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.

Compiler/TMS320F28377S: How to test CAN Bus

Part Number: TMS320F28377S
Other Parts Discussed in Thread: SN65HVD233, CONTROLSUITE, TMS320F28379D, SN65HVD257EVM, C2000WARE

Tool/software: TI C/C++ Compiler

I want to test can bus by using TMS320F28377S  I know it has some example,

but I still don't know how to test it.

Do you have some advice for me?

  • Hi Kanthanet,

    Yes, the CAN example codes in ControlSuite is definitely where you want to start. First you would need to connect the CAN_TX and CAN_RX pins to a transceiver (example: SN65HVD233, or other P/Ns). The transceiver would allow the TMS320F28377S to connect to the CAN bus (CANL and CANH). You can then connect a CAN network analyzer or another 28377S to the CAN bus and start receiving or transmitting data once it is connected to the CAN bus. There are examples for the 28377S on how to transmit and receive data in the CAN bus, like loopback and transmit tests that you can run.

    Let me know if you need further assistance.

    Regards,
    Joseph
  • Also internal loopback examples would work without a transceiver. Additionally F2837x Launchpads have CAN transceivers on the board.

    sal
  • If you want to connect your device to a CAN bus, you need to have a CAN transceiver. The CAN transceiver convert the CAN_TX and CAN_RX signals to CAN_H and CAN_L to be able to get transmitted over CAN bus. I've recently purchased a CAN evaluation module (SN65HVD257EVM) and tested it with my TMS320F28379D. The only thing you need then is to have a CAN network analyzer like CANoe, CANalyzer or CANking to see the actual CAN messages on the CAN bus. Just don't forget to have proper terminations! I know that there is a CAN transceiver installed on the LUANCHXL-28379D so you don't need to buy an extra daughter board if you'd like to use it.

    If you don't want to connect your device to a CAN bus, you can easily connect CAN_TX and CAN_RX pins to the oscop and see the messages coming out of the MCU.

    I'm going to upload a video in youtube to show how to get some results from CAN evaluation modules.

    --Kash

    ***If my post answers your question, please click on "Verify Answer" button***

     

  • Could you please sent me the link of your video youtube?

    Thank you,
    kanthanet
  • Hello Joseph,

    after I connect Rx and Tx by using MCP2551 and then how to test CANL and CANH because I want to know that Tx and Rx send some messages.

    Thank you,
    kanthanet
  • Kanthanet,

    Please see our CAN examples in C2000Ware. www.ti.com/.../c2000ware


    Regards,
    sal
  • Hi Kanthanet,
    back Now that you have interfaced the 28377S to the CAN bus, you can now start transmitting and receiving data. The examples in ControlSuite or C2000Ware (can_external_transmit or can_loopback) would be a good tests to run. One node of the CAN can be a National Instrument CAN interface NI 8473 (or any available CAN interface) or the other CAN module from the 28377S.

    The function CANMessageSet in either the examples would send data frames to the CAN bus. The function CANMessageGet would receive data from the CAN bus if you decide to use the can_loopback example and used the other CAN module in the 28377S to receive messages. Using the NI 8473 with LabView is a very convenient way of looking at the data in the CAN bus if you use LabView.

    Regards,
    Joseph
  • thank you for replying and
    I will try it.

    Sincerely,
    kanthanet
  • Hello Joseph,

    In my laboratory, it doesn't have the NI 8473 so, I use MTP2551 for being a transceiver and using oscilloscope to see the signal.
    I use "can_loopback_cpu01" code example for running but it doesn't work.

    Thank you.
    kanthanet
  • Hi Kanthanet,

    For what you are trying to accomplish which is scoping the CAN bus, I think it is best that you use the example can_external_transmit.  CANA would be transmitting and CANB will be receiving data.  You would have to configure and connect CANB to the CAN bus as well using another transceiver.  Connect all CANL lines together and CANH lines together and take note that there should be a 120ohm termination resistor between CANL and CANH lines.  You can then scope CANL/CANH lines.

    Regards,

    Joseph

     

  • Bonjour Joseph,

    I can test it!!

    Thank you so much.
    kanthanet