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.

Tiva CAN bus: number of received bytes

inline void ConfigCAN(uint32_t sysClk)
{
	// Config CAN bus
	SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);

	GPIOPinConfigure(GPIO_PB4_CAN0RX);
	GPIOPinConfigure(GPIO_PB5_CAN0TX);
	GPIOPinTypeCAN(GPIO_PORTB_BASE, GPIO_PIN_4 | GPIO_PIN_5);
	SysCtlPeripheralEnable(SYSCTL_PERIPH_CAN0);

	CANInit(CAN0_BASE); // Reset the state of all the message objects and the state of the CAN
						// module to a known state
	CANBitRateSet(CAN0_BASE, sysClk, 1000000); // Configure the controller for 1 Mbit operation.

	CANIntRegister(CAN0_BASE, &CANIntHandler);
	CANIntEnable(CAN0_BASE, CAN_INT_MASTER | CAN_INT_ERROR | CAN_INT_STATUS);
	IntEnable(INT_CAN0); // Enable the CAN interrupt on the processor (NVIC).

	CANEnable(CAN0_BASE); // Enable the CAN for operation.

	// Initialize message object to send CAN messages.
	msgObjectTx.ui32MsgID = 0;
	msgObjectTx.ui32MsgIDMask = 0;
	msgObjectTx.ui32Flags = MSG_OBJ_TX_INT_ENABLE; //| MSG_OBJ_USE_ID_FILTER
	msgObjectTx.ui32MsgLen = 8;
	msgObjectTx.pui8MsgData = CANTXBuffer;

	// Initialize message object to receive CAN messages.
	msgObjectRx.ui32MsgID = 0; // In order to receive any CAN ID, the ID and mask must both
							   // be set to 0, and the ID filter enabled.
	msgObjectRx.ui32MsgIDMask = 0;
	msgObjectRx.ui32Flags = MSG_OBJ_RX_INT_ENABLE | MSG_OBJ_USE_ID_FILTER;
	msgObjectRx.ui32MsgLen = 8;
	CANMessageSet(CAN0_BASE, 1, &msgObjectRx, MSG_OBJ_TYPE_RX); // Now load the message object into
																// the CAN peripheral message object 1.
}

I am trying to set up a communication between network which contents 4 nodes or more. The protocol is Controller Area Network. Above is my code for configuring CAN peripheral on tiva. I have a question that is there any way to know the number of bytes received or check if there are bytes available in received buffer like UARTCharsAvail function which is used in UART?