
FlexCAN
Freescale Semiconductor
23-21
NOTE
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
). 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.
NOTE
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
Section 23.3.15.1, “Serial Message Buffers (SMBs),”
for more
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)
MCF5329 Reference Manual, Rev 3
Summary of Contents for MCF5329
Page 106: ...ColdFire Core 3 32 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 148: ...Cache 5 22 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 154: ...Static RAM SRAM 6 6 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 184: ...Power Management 8 18 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 204: ...Reset Controller Module 10 8 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 220: ...System Control Module SCM 11 16 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 228: ...Crossbar Switch XBS 12 8 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 268: ...General Purpose I O Module 13 40 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 392: ...SDRAM Controller SDRAMC 18 30 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 436: ...Fast Ethernet Controller FEC 19 44 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 594: ...FlexCAN 23 30 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 678: ...Pulse Width Modulation PWM Module 26 22 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 684: ...Watchdog Timer Module 27 6 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 704: ...DMA Timers DTIM0 DTIM3 29 12 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 754: ...UART Modules 31 34 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 770: ...I2 C Interface 32 16 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 866: ...Debug Module 36 50 Freescale Semiconductor MCF5329 Reference Manual Rev 3...