Other Parts Discussed in Thread: HALCOGEN, TMS570LC4357
Tool/software:
Hello everyone,
I have successfully tested the CAN loopback example on a single LAUNCHXL2-570LC43 board, and it works perfectly. The loopback code transmits and receives CAN messages internally without any issues.
Now, I am trying to establish CAN communication between two separate LAUNCHXL2-570LC43 boards using the same code and HALCoGen configurations. However, the communication does not work as expected — no messages are being received on either side.
What I have done so far:
-
Verified that both boards have the same CAN bit timing and baud rate configuration.
-
Confirmed that the CAN transceivers are properly connected to the CAN_H and CAN_L lines. I am using TD5(3)21DCANH Transceiver.
-
Checked power and ground connections between the two boards.
-
I am using CAN1 MessageBox1 for Transmission and Reception on both side.
-
All the connections are perfect from my side and I haven't changed anything else on HALCoGen.
What I observe:
-
CAN RX controller remains stuck in initialization mode (INIT bit stays set).
-
No CAN messages are received on the receiving board.
-
Loopback mode on a single board works fine, indicating the basic CAN module setup is correct
Questions:
-
Are there any additional steps required to enable CAN communication between two LAUNCHXL2-570LC43 boards?
-
Could this issue be related to hardware wiring, CAN transceiver setup, or HALCoGen configuration?
-
Any suggestions or known issues to check?
With Regards /* This is my Transmitter side code */
#include "HL_sys_common.h"
#include "HL_can.h"
#define D_SIZE 9
uint8 tx_data[D_SIZE] = {'R','A','D','H','A','\0'};
uint8 rx_data[D_SIZE] = {0};
void delay_2s(void)
{
volatile unsigned long i;
for (i = 0; i < 600000000; i++);
}
int main(void)
{
canInit();
while (1)
{
canTransmit(canREG1, canMESSAGE_BOX1, tx_data);
delay_2s();
}
return 0;
}
/* This is my Receiver Side Code */
#include "HL_sys_common.h"
#include "HL_can.h"
#define D_SIZE 9
uint8 rx_data[D_SIZE] = {0};
void delay_2s(void)
{
volatile unsigned long i;
for (i = 0; i < 600000000; i++);
}
int main(void)
{
canInit();
while (1)
{
if (canIsRxMessageArrived(canREG2, canMESSAGE_BOX1))
{
canGetData(canREG1, canMESSAGE_BOX1, rx_data);
}
delay_2s();
}
return 0;
}
Radha Kishan Sharma