Hello,
First what version of SDK did you use and what processor ?
Second provide the configuration of the can driver ?
And 3 you forget to config the Fifo filters by calling FLEXCAN_DRV_ConfigRxFifo before call the reception FLEXCAN_DRV_RxFifo;
And 4 wait the transfer to finish before rearm again the transfer.
/* Config Fifo Filters */
flexcan_id_table_t flTable[10];
for(i=0;i<10;i++)
{
flTable[i].id=i;
flTable[i].isExtendedFrame=false;
flTable[i].isRemoteFrame=false;
}
FLEXCAN_DRV_ConfigRxFifo(INST_CANCOM1,FLEXCAN_RX_FIFO_ID_FORMAT_A,&flTable[0]);
/* End Config Fifo Filters */
for(;;)
{
/* Rx FIFO */
/* Wait to finish received fifo data, allways the Fifo Data will be pulled from MB0 */
while(FLEXCAN_DRV_GetTransferStatus(INST_CANCOM1, 0) == STATUS_BUSY);
FLEXCAN_DRV_RxFifo(INST_CANCOM1, &rx_msgbuf);
/* Send a message */
tx_info.msg_id_type = 0;
tx_info.data_length = 8;
FLEXCAN_DRV_Send(INST_CANCOM1, 15, &tx_info, 0x100, &data);
/* Wait to finish send data */
while(FLEXCAN_DRV_GetTransferStatus(INST_CANCOM1, 15) == STATUS_BUSY);
}
BR,
Alexandru Nan