Dear Petr,
Thanks for your reply.Let's start with my needs.
I need use CANFD with payload 64,so there are only seven mailboxes at most,
I need transmit 4 messages with individual mailbox(MB0-MB3),and receive 4 messages saved in MB5-7(so I need CAN mask).
Here's how I use can_pal module API during initialization
1.CAN_Init
2.CAN_InstallEventCallback(CAN2_instance,CAN2_Rx_IRQ,NULL)
3.CAN_CfgRxBuff: MB4/5/6 config as Rx mb
MB CAN-ID
4 0x002
5 0x203
6 0x215
4.CAN_SetFilter:
MB MASK
4 have not call CAN_SetFilter
5 0x7EF( to receive 0x203/0x213)
6 have not call CAN_SetFilter
5.CAN_Receive to wait next CAN Rx interrupt
6.CAN_CfgTxBuff:MB0/1/2/3 config as Tx mb
When CAN_RX interrupt occurs,in function CAN2_Rx_IRQ(refer to above step2 ,install eventcallback) I do this below,
1.print MB index;
2.CAN_CfgRxBuff: according to current index( index_number always to 4/5/6)
MB CAN-ID
4 0x002
5 0x203
6 0x215
3.CAN_SetFilter::according to current index( index_number always to 4/5/6)
MB MASK
4 have not call CAN_SetFilter
5 0x7EF( to receive 0x203/0x213)
6 have not call CAN_SetFilter
4.CAN_Receive to wait next CAN Rx interrupt
I use CANoe transmit 4 CAN messages for verify my software,0x002/0x203/0x213/0x215 in order,
I found the print Log information shows that rx mailbox index is 4-4-4-4,not 4-5-5-6.
Is the way I call these API from can_pal wrong?
Or these API should be called by special sequence?