Other Parts Discussed in Thread: HALCOGEN
Hi, All. I have 2 TMS570LS1224 Launchpad, I want to send and receive CAN messages between them. I follow the official TI tutorial, "training.ti.com/hercules-how-tutorial-can-communication". However, it does not work.
Firstly, for the hardware part, I use CAN Transceiver MCP2551, data sheet can be found here, "ww1.microchip.com/.../21667f.pdf". I connect Launchpad, J10, pin 38(Rx) and 39(Tx) to the transceiver, Rxd and Txd. The VSS is connected to the ground, VDD is connect to 5v power supply from Microcontroller. CAN_H is connected to another transceiver's CAN_H, so does CAN_L. Both CAN_H and CAN_L connect to a 200 Ohm resistor. I think that I am wiring correctly. All the wires inserts tightly in the breadboard.
Secondly, for the software part. For transmit code, I have no idea how to test whether it sends or not. The code is same as the official Tutorial posted above. For the Receiver code, this statement "while( !canIsRxMessageArrived(canREG1, canMESSAGE_BOX1) ) ;" never ends. The sender is send to canREG1, canMESSAGEBOX_1, and receiver is also receive at canREG1, canMESSAGEBOX_1. The HalCoGen is configured exactly same as the tutorial without any error, same as CCSv7.
Also, the tutorial's receiver code contains a line, "error = checkPacket(&tx_data[0], &rx_data[0], D_SIZE)", at 13:30 of the video. There is no tx_data defined and declared in receiver's project, it would result in a compile error.
Thanks for help.