Dear Ana
Thank you for your reply. I configured functions like you said.
flexcan_data_info_t dataInfo =
{
.data_length = 1U,
.msg_id_type = FLEXCAN_MSG_ID_EXT,
.enable_brs = true,
.fd_enable = true,
.fd_padding = 0U
};
FLEXCAN_DRV_SetRxIndividualMask(INTERFACE_CAN2,FLEXCAN_MSG_ID_EXT,0,0x00000000);
FLEXCAN_DRV_ConfigRxMb(INTERFACE_CAN2, 0, &dataInfo, 0x18FF0917);
I use CAN2 ,extended ID,0Mail_box,and binary mask is 0x00000000. 0x18FF0917 is one of the ID which I want to receive. My ISR functin is as the follow
void Flexcan2_ISR(uint8_t instance,
flexcan_event_type_t eventType,
flexcan_state_t *flexcanState)
{
(void)flexcanState;
(void)instance;
switch(eventType)
{
case FLEXCAN_EVENT_RX_COMPLETE:
FLEXCAN_DRV_Receive(INTERFACE_CAN2, 1, &can0_recvBuff);
CAN2_RX_ST = CAN_RX_FINISH;
break;
case FLEXCAN_EVENT_TX_COMPLETE:
break;
default:
break;
}
}
However ,in the modle of debug ,I can not receive any messages.
I look forward to your reply.
Best regards,
YUAN