Tool/software: Code Composer Studio
Dear All,
We have custom developed board with TM4C1294NCPDT MCU and SN65HV CAN Bus Transiever. It seems the CAN Message is continuously sending CAN messages when starts the CAN Bus communication for the first time, sometimes every 500us/ 1.5ms. What could be the reason for this? Here the Node is acknowledging the data, Hence not a bad node issue.
Could See the TXOK bit of CTL_STS is always high and the message is Acknowledged by the second Node(PFA images). Even being able to get the correct data in the second node.
PF Below CAN Init Code :
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); // enable CAN1 GPIO peripheral SysCtlPeripheralEnable(SYSCTL_PERIPH_CAN1); GPIOPinConfigure(GPIO_PB0_CAN1RX); GPIOPinConfigure(GPIO_PB1_CAN1TX); GPIOPinTypeCAN(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1); CANInit(CAN1_BASE); CANBitRateSet(CAN1_BASE, sysClock, 100000); // CANIntRegister(CAN1_BASE, CANIntHandler); // use dynamic vector table allocation CANIntEnable(CAN1_BASE, CAN_INT_MASTER | CAN_INT_ERROR | CAN_INT_STATUS); IntEnable(INT_CAN1); CANEnable(CAN1_BASE); TxMessage.ui32MsgID = 1; TxMessage.ui32MsgIDMask = 0; TxMessage.ui32Flags = MSG_OBJ_TX_INT_ENABLE; TxMessage.ui32MsgLen = 8; TxMessage.pui8MsgData = TData_Ptr;
Can Send Data :
for (j=(4*seq);j<(4*(seq+1));j++) { TData_Ptr[j]=can_node_data.D[node][j]; } IntMasterDisable(); CANMessageSet(CAN1_BASE, 1, &TxMessage, MSG_OBJ_TYPE_TX); // send as msg object 1 delay_ms(10); IntMasterEnable();