FlexCAN ModuleMCF5253 Reference Manual, Rev. 125-22 Freescale SemiconductorThe first write to the control/status word is important in case there was pending reception or transmission.The write operation immediately deactivates the MB, removing it from any currently ongoing arbitrationor ID matching processes, giving time for the CPU to program the rest of the MB (see Section 25.6.5.2,“Message Buffer Deactivation”). Once the MB is activated in the fourth step, it will participate in thearbitration process and eventually be transmitted according to its priority. At the end of the successfultransmission, the value of the free running timer (TIMERn) is written into the message buffer’s time stampfield, the code field in the control and status word is updated, a status flag is set in the IFLAGn register,and an interrupt is generated if allowed by the corresponding IMASKn register bit. The new code fieldafter transmission depends on the code that was used to activate the MB in step four (see Table 25-13).25.6.2 Arbitration ProcessThe arbitration process is an algorithm executed by the message buffer management (MBM) that scans theentire MB memory looking for the highest priority message to be transmitted. All MBs programmed astransmit buffers will be scanned to find the lowest ID or the lowest MB number, depending on theCANCTRLn[LBUF] bit.NOTEIf CANCTRLn[LBUF] is cleared, the arbitration considers not only the ID,but also the RTR and IDE bits placed inside the ID at the same positions theyare transmitted in the CAN frame.The arbitration process is triggered in the following events:• During the CRC field of the CAN frame• During the error delimiter field of the CAN frame• During intermission, if the winner MB defined in a previous arbitration was deactivated, or if therewas no MB to transmit, but the CPU wrote to the C/S word of any MB after the previous arbitrationfinished• When MBM is in idle or bus off state and the CPU writes to the C/S word of any MB• Upon leaving freeze modeOnce 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.’ At the first opportunity window on the CAN bus, the message on the SMBis transmitted according to the CAN protocol rules. FlexCAN transmits up to 8 data bytes, even if the datalength code (DLC) value is bigger. Refer to Section 25.6.5.1, “Serial Message Buffers (SMBs),” for moreinformation on serial message buffers.25.6.3 Receive ProcessThe CPU prepares or changes an MB for frame reception by writing the following:1. Control/status word to hold Rx MB inactive (CODE = 0000)2. ID word3. Control/status word to mark the Rx MB as active and empty (CODE = 1000)