FlexCAN
MCF52277 Reference Manual, Rev. 1
Freescale Semiconductor
23-25
during the CRC field. If a matching ID is found in one of the MBs, the contents of the SMB are transferred
to the matched MB during the sixth bit of the end-of-frame field of the CAN protocol. This operation is
called move-in. If any protocol error (CRC, ACK, etc.) is detected, than the move-in operation does not
happen.
An MB with a matching ID is free to receive a new frame if the MB is not locked (see
“Locking and Releasing Message Buffers”
). The CODE field is EMPTY, FULL, or OVERRUN but the
CPU has already serviced the MB (read the C/S word and then unlocked the MB).
For example, suppose that there are two MBs with the same ID and FlexCAN starts receiving messages
with that ID. These MBs are the second and the fifth in the array. When the first message arrives, the
matching algorithm finds the first match in MB number 2. The code of this MB is EMPTY, so the mes-
sage is stored there. When the second message arrives, the matching algorithm finds MB number 2 again,
However, it is not free to receive, so it keeps looking and find MB number 5 and store the message there.
If yet another message with the same ID arrives, the matching algorithm finds out that there are no match-
ing MBs that are free to receive, so it decides to overwrite the last matched MB, which is number 5. In
doing so, it sets the code field of the MB to indicate OVERRUN.
The ability to match the same ID in more than one MB can be exploited to implement a reception queue
to allow more time to the CPU for servicing the MBs. By programming more than one MB with the same
ID, received messages are queued into the MBs. The CPU can examine the time stamp field of the MBs
to determine the order in which the messages arrived.
The matching algorithm described above can be changed to be the same one used in previous versions of
the FlexCAN module. When the CANMCR[BCC] bit is cleared, the matching algorithm stops at the first
MB with a matching ID that it founds, whether this MB is free or not. As a result, the message queueing
feature does not work if the BCC bit is cleared.
Matching to a range of IDs is possible by using ID acceptance masks. FlexCAN supports individual
masking per MB. Please refer to
Section 23.3.10, “Rx Individual Masking Registers (RXIMR0–15).”
FlexCAN also supports an alternate masking scheme with only three mask registers (RXGMASK,
RX14MASK, and RX15MASK) for backwards compatibility. This alternate masking scheme is enabled
when the CANMCR[BCC] bit is cleared. During the matching algorithm, if a mask bit is asserted, then
the corresponding ID bit is compared. If the mask bit is negated, the corresponding ID bit is don’t care.
23.3.16 Message Buffer Managing
To maintain data coherency and FlexCAN proper operation, the CPU must obey the rules described in
Section 23.3.12, “Transmit Process”
Section 23.3.14, “Receive Process.”
Any form of CPU accessing
a MB structure within FlexCAN other than those specified may cause FlexCAN to behave in an
unpredictable way.
23.3.16.1 Serial Message Buffers (SMBs)
To allow double buffering of messages, the FlexCAN has two shadow buffers called serial message
buffers. These two buffers are used by the FlexCAN for buffering received messages and messages to be
Содержание MCF52277
Страница 1: ...MCF52277 Reference Manual Devices Supported MCF52274 MCF52277 Document Number MCF52277RM Rev 1 04 2008...
Страница 22: ...MCF52277 Reference Manual Rev 1 Freescale Semiconductor xxii...
Страница 32: ...MCF52277 Reference Manual Rev 0 xxxii Freescale Semiconductor...
Страница 60: ...Signal Descriptions MCF52277 Reference Manual Rev 1 2 16 Freescale Semiconductor...
Страница 112: ...Enhanced Multiply Accumulate Unit EMAC MCF52277 Reference Manual Rev 1 4 20 Freescale Semiconductor...
Страница 128: ...Static RAM SRAM MCF52277 Reference Manual Rev 1 6 6 Freescale Semiconductor...
Страница 140: ...Clock Module MCF52277 Reference Manual Rev 1 7 12 Freescale Semiconductor...
Страница 172: ...Chip Configuration Module CCM MCF52277 Reference Manual Rev 1 9 16 Freescale Semiconductor...
Страница 180: ...Serial Boot Facility SBF MCF52277 Reference Manual Rev 1 10 8 Freescale Semiconductor...
Страница 188: ...Reset Controller Module MCF52277 Reference Manual Rev 1 11 8 Freescale Semiconductor...
Страница 210: ...Crossbar Switch XBS MCF52277 Reference Manual Rev 1 13 8 Freescale Semiconductor...
Страница 480: ...Liquid Crystal Display Controller LCDC MCF52277 Reference Manual Rev 1 21 44 Freescale Semiconductor...
Страница 510: ...Touchscreen Controller Analog to Digital Converter MCF52277 Reference Manual Rev 1 22 30 Freescale Semiconductor...
Страница 542: ...FlexCAN MCF52277 Reference Manual Rev 1 23 32 Freescale Semiconductor...
Страница 568: ...Pulse Width Modulation PWM Module MCF52277 Reference Manual Rev 1 24 26 Freescale Semiconductor...
Страница 640: ...Programmable Interrupt Timers PIT0 PIT1 MCF52277 Reference Manual Rev 1 27 8 Freescale Semiconductor...
Страница 690: ...DMA Serial Peripheral Interface DSPI MCF52277 Reference Manual Rev 1 29 40 Freescale Semiconductor...
Страница 724: ...UART Modules MCF52277 Reference Manual Rev 1 30 34 Freescale Semiconductor...
Страница 740: ...I2 C Interface MCF52277 Reference Manual Rev 1 31 16 Freescale Semiconductor...
Страница 790: ...Debug Module MCF52277 Reference Manual Rev 1 32 50 Freescale Semiconductor...