Arbitration Process - Freescale Semiconductor MCF5329 Reference Manual

Devices supported: mcf5327; mcf5328; mcf53281; mcf5329
Table of Contents

Advertisement

The first and last steps are mandatory.
The 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 arbitration
or ID matching processes, giving time for the CPU to program the rest of the MB (see
"Message Buffer
Deactivation"). After the MB is activated in the fourth step, it participates in the
arbitration process and eventually be transmitted according to its priority. At the end of the successful
transmission, the value of the free running timer (TIMER) is written into the message buffer's time stamp
field, the code field in the control and status word is updated, a status flag is set in the IFLAG register, and
an interrupt is generated if allowed by the corresponding IMASK register bit. The new code field after
transmission depends on the code that was used to activate the MB in step four (see

23.3.12 Arbitration Process

The arbitration process is an algorithm executed by the message buffer management (MBM) that scans the
entire MB memory looking for the highest priority message to be transmitted. All MBs programmed as
transmit buffers are scanned to find the lowest ID or the lowest MB number, depending on the
CANCTRL[LBUF] bit.
If CANCTRL[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 they
are 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 there
was no MB to transmit, but the CPU wrote to the C/S word of any MB after the previous arbitration
finished
When MBM is in idle or bus off state and the CPU writes to the C/S word of any MB
Upon leaving freeze mode
After the highest priority MB is selected, it is transferred to a temporary storage space called serial
message buffer (SMB), which has the same structure as a normal MB but is not user accessible. This
operation is called move-out. At the first opportunity window on the CAN bus, the message on the SMB
is transmitted according to the CAN protocol rules. FlexCAN transmits up to 8 data bytes, even if the data
length code (DLC) value is bigger. Refer to
information on serial message buffers.
23.3.13 Receive Process
The CPU prepares or changes an MB for frame reception by writing the following:
1. Control/status word to hold Rx MB inactive (CODE = 0000)
Freescale Semiconductor
NOTE
NOTE
Section 23.3.15.1, "Serial Message Buffers (SMBs),"
MCF5329 Reference Manual, Rev 3
FlexCAN
Section 23.3.15.2,
Table
23-13).
for more
23-21

Advertisement

Table of Contents
loading

Table of Contents