Hi Vlad,
at first, please read Receive process chapter in FlexCAN module (I do not know, which micro you use).
In general, you should do following steps:
1) Write the ID word and write EMPTY code.
2) After you receive the frame, you get interrupt flag.
3) Read the Control and Status word of that MB - this operation lock the MB
4) Now you can read data from MB
5) Acknowledge the proper flag at IFLAG registers.
6) Read the Free Running Timer. It is optional but recommended to unlock Mailbox as
soon as possible and make it available for reception.
But you have to do points 3-6 between message transmission. If you send messages too fast, you do not have to be able to receive all messages.
You can look at the following example, how to implement FlexCAN TX/RX using interrupt:
Example MPC5775K FlexCAN_with_interrupts S32DS
Regards,
Martin