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 send some data from f28377s to f28377s by using Can bus?

Part Number: TMS320F28377S
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: TI C/C++ Compiler

How to send some data from f28377s to f28377s by using Can bus?

if anyone has some suggestions for me, I am really appreciated.

Thank you,

Kanthanet 

  • You can find CAN message examples in ControlSUITE and use them as starting point. (e.g C:\ti\controlSUITE\device_support\F2837xS\v210\F2837xS_examples_Cpu1)

    You either need to have a CAN bus between two F28377S or to connect the CAN_TX/RX signals of two devices together:

    1. CAN bus transmission: 

    If you're using LAUNCHXL-F28377S, there is a CAN transceiver (SN65HVD234D) populated on the board:

    So MCU publishes CAN_TX and CAN_RX over GPIO71 and GPIO70 then you have CAN_H and CAN_L over the CAN bus. simply connect both LUNCHXLs to CAN bus and start communicating.  Note that there is only one CAN transceiver on the board so make sure you're using eCANA in your software.

    2. Non-CAN bus transmission:

    In this case, you need to connect CAN_TX and CAN_RX of first MCU to CAN_RX and CAN_TX of the second MCU respectively. Don't forget to add 120 ohm resistor between TX and RX at both end to terminate your CAN bus. In this architecture, you don't need to have CAN transceiver so don't use CAN_H and CAN_L outputs of the SN65HVD234D. 

    Good luck!

    --Kash

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

  • Thank you for answering.

    So, I use 2 of LAUNCHXL-F28377S and I have to connect CAN_L to CAN_L on another broad and CAN_H to CAN_H on another broad, right?
    Can you suggest me what source code in ControlSUITE that I have to use?

    Kanthanet
  • Kanthanet,

    Correct, if you're using two LAUNCHXL-F28377S, you need to create a CAN bus by connecting the CAN_H together and CAN_L together. don't forget to terminate the bus properly (120 ohm at each end).

    I usually use Simulink for coding but there are lots of examples in controlSUITE that you can use, for example "can_external_transmit" which shows how to send different values over CAN bus may be a good start for you. You can find it under: "C:\ti\controlSUITE\device_support\F2837xS\v210\F2837xS_examples_Cpu1\can_external_transmit" .

    Good luck!

    --Kash

    If my post answers your questions, please hit "Verified Answers" button.

  • Hello Kash,

    How to control 2 of LAUNCHXL-F28377S together because I tried to do it but when I run the code, it run only one LAUNCHXL-F28377S?

    Best regards,
    kanthanet
  • Kanthanet,

    What do you mean "when I run the code, it run only one LAUNCHXL-F28377S" ? 

    Do you mean you can't flash two MCUs with one host computer? if you're using CCS, check these links out:

    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/321615/1119328#1119328 

    http://e2e.ti.com/support/wireless_connectivity/proprietary_sub_1_ghz_simpliciti/f/156/p/282659/985627#985627     

    http://e2e.ti.com/support/microcontrollers/c2000/f/171/p/373610/1315272#1315272   

     I would boot both MCU from flash and connect the host computer as third node to the CAN bus to monitor the CAN communication between two MCUs.

     --Kash

    If my post answered your question, please click on "Verified answer" button. 

     

  • re. 2: You can communicate between two/more devices without a transceiver, but not in the way you describe. www.mikrocontroller.net/.../siemens_AP2921.pdf is how it should be done.
  • Kanthanet is using CAN transceiver and would like to set up a CAN bus.
    Without CAN transceivers you can communicate between two MCUs by using CAN TX/RX on MCU side but you're not able to communicate with CAN based devices which needs CAN_H and CAN_L.