I am trying to verify CAN communication by putting a scope on the TX and RX lines. I do not see any activity when messages are sent. Here is the configuration code for the CAN.
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
GPIOPinConfigure(GPIO_PA0_CAN0RX);
GPIOPinConfigure(GPIO_PA1_CAN0TX);
GPIOPinTypeCAN(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
// The GPIO port and pins have been set up for CAN. The CAN peripheral
// must be enabled.
SysCtlPeripheralEnable(SYSCTL_PERIPH_CAN0);
// Reset the state of all the message objects and the state of the CAN
// module to a known state.
CANInit(CAN0_BASE);
// Configure the controller for 1 Mbit operation.
CANBitRateSet(CAN0_BASE, g_ui32SysClock, 1000000);
CANIntEnable(CAN0_BASE, CAN_INT_MASTER | CAN_INT_ERROR | CAN_INT_STATUS);
IntEnable(INT_CAN0);
// Take the CAN0 device out of INIT state.
CANEnable(CAN0_BASE);
Here's how messages are being sent:
sCANMessage.ui32MsgID = ui16MsgID;
sCANMessage.ui32MsgIDMask = 0;
sCANMessage.ui32Flags = MSG_OBJ_TX_INT_ENABLE;
sCANMessage.ui32MsgLen = sizeof(msgData);
sCANMessage.pui8MsgData = msgData;
CANMessageSet(CAN0_BASE, 2, &sCANMessage, MSG_OBJ_TYPE_TX);
Is there some other configuration I am missing? Does the method used to send the message correct? Any help would be greatly appreciated.