Hello Robin,
my setup is like NXP board is connected with r-pi with CAN Bus and for sending the data i am using the r-pi terminal with the following command.
cansend can0 74E#11111111
NXP Board Side :
My Config is as mentioned below for the Rx and Tx
#if defined(MASTER)
#define TX_MAILBOX (1UL)
#define TX_MSG_ID 0x74F
#define RX_MAILBOX (2UL)
#define RX_MSG_ID 0x74E
===============================================================
flexcan_data_info_t dataInfo =
{
.data_length = 8,
.msg_id_type = FLEXCAN_MSG_ID_STD,
.enable_brs = true,
.fd_enable = true,
.fd_padding = 0U
};
/* Configure RX message buffer with index RX_MSG_ID and RX_MAILBOX */
FLEXCAN_DRV_ConfigRxMb(INST_CANCOM1, RX_MAILBOX, &dataInfo, RX_MSG_ID);
======================================================================
flexcan_msgbuff_t recvBuff;
/* Start receiving data in RX_MAILBOX. */
FLEXCAN_DRV_Receive(INST_CANCOM1, RX_MAILBOX, &recvBuff);
/* Wait until the previous FlexCAN receive is completed */
while(FLEXCAN_DRV_GetTransferStatus(INST_CANCOM1, RX_MAILBOX) == STATUS_BUSY);