FlexCANMPC5606S Microcontroller Reference Manual, Rev. 7Freescale Semiconductor 699if LBUF is negated and LPRIO_EN is asserted, then the PRIO bits augment the ID used during thearbitration process. With this extended ID concept, arbitration is done based on the full 32-bit ID, and thePRIO bits define which MB should be transmitted first—therefore MBs with PRIO = 000 have higherpriority. If two or more MBs have the same priority, the regular ID will determine the priority oftransmission. If two or more MBs have the same priority (three extra bits) and the same regular ID, thelowest MB will be transmitted first.Once the highest priority MB is selected, it is transferred to a temporary storage space called SerialMessage Buffer (SMB), which has the same structure as a normal MB but is not user accessible. Thisoperation is called move-out, and after it is done write access to the corresponding MB is blocked (if theAEN bit in MCR is asserted). The write access is released in the following events:• After the MB is transmitted• FlexCAN enters in Halt or Bus Off• FlexCAN loses the bus arbitration or there is an error during the transmissionAt the first opportunity window on the CAN bus, the message on the SMB is transmitted according to theCAN protocol rules. FlexCAN transmits up to eight data bytes, even if the DLC (Data Length Code) valueis bigger.18.4.4 Receive processTo be able to receive CAN frames in the mailbox MBs, the CPU must prepare one or more MessageBuffers for reception by executing the following steps:1. If the MB has a pending transmission, write an ABORT code (1001) to the Code field of theControl and Status word to request an abortion of the transmission, then read back the Code fieldand the IFRL/IFRH registers to check if the transmission was aborted (see Section 18.4.6.1,Transmission abort mechanism). If backwards compatibility is desired (AEN in MCR negated),just write 1000 to the Code field to inactivate the MB, but be aware that in this case the pendingframe may be transmitted without notification (see Section 18.4.6.2, Message Buffer deactivation).If the MB is already programmed as a receiver, just write 0000 to the Code field of the Control andStatus word to keep the MB inactive.2. Write the ID word.3. Write 0100 to the Code field of the Control and Status word to activate the MB.Once the MB is activated in the third step, it will be able to receive frames that match the programmed ID.At the end of a successful reception, the MB is updated by the MBM as follows:1. The value of the Free Running Timer is written into the Time Stamp field.2. The received ID, Data (8 bytes at most), and Length fields are stored.3. The Code field in the Control and Status word is updated (see Table 18-5 and Table 18-6 inSection 18.3.2, Message Buffer structure).4. A status flag is set in the Interrupt Flag Register and an interrupt is generated if allowed by thecorresponding Interrupt Mask Register bit.