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.
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."
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.
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/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.
If my post answered your question, please click on "Verified answer" button.