
CPU tries to workaround this behavior by writing to the C/S word to force an EMPTY
code after reading the Mailbox without a prior safe inactivation, a newly received frame
matching the filter of that Mailbox may be lost.
CAUTION
In summary: never do polling by reading directly the C/S word
of the Mailboxes. Instead, read the IFLAG registers.
Note that the received frame's Identifier field is always stored in the matching Mailbox,
thus the contents of the ID field in an Mailbox may change if the match was due to
masking. When CAN_MCR[SRXDIS] bit is asserted, FlexCAN will not store frames
transmitted by itself in any MB, even if it contains a matching Rx Mailbox, and no
interrupt flag or interrupt signal will be generated. Otherwise, when
CAN_MCR[SRXDIS] bit is deasserted, FlexCAN can receive frames transmitted by
itself if there exists a matching Rx Mailbox.
To be able to receive CAN frames through the Rx FIFO, the CPU must enable and
configure the Rx FIFO during Freeze mode (see
Available in Rx FIFO interrupt (see the description of the BUF5I bit "Frames available in
Rx FIFO" bit in the CAN_IFLAG1 register), the CPU should service the received frame
using the following procedure:
1. Read the Control and Status word (optional: needed only if a mask was used for IDE
and RTR bits)
2. Read the ID field (optional: needed only if a mask was used)
3. Read the Data field
4. Read the CAN_RXFIR register (optional)
5. Clear the Frames Available in Rx FIFO interrupt by writing 1 to
CAN_IFLAG1[BUF5I] bit (mandatory: releases the MB and allows the CPU to read
the next Rx FIFO entry)
When CAN_MCR[DMA] is asserted, upon receiving a frame in FIFO,
CAN_IFLAG1[BUF5I] generates a DMA request and does not generate a CPU interrupt
(see
). The CAN_IMASK1 bits in Rx FIFO region are
not used.
The DMA controller must service the received frame using the following procedure:
1. Read the Control and Status word (read 0x80 address, optional)
2. Read the ID field (read 0x84 address, optional)
Functional description
KV4x Reference Manual, Rev. 2, 02/2015
1136
Preliminary
Freescale Semiconductor, Inc.
Summary of Contents for freescale KV4 Series
Page 2: ...KV4x Reference Manual Rev 2 02 2015 2 Preliminary Freescale Semiconductor Inc...
Page 60: ...KV4x Reference Manual Rev 2 02 2015 60 Preliminary Freescale Semiconductor Inc...
Page 128: ...Debug Security KV4x Reference Manual Rev 2 02 2015 128 Preliminary Freescale Semiconductor Inc...
Page 138: ...Boot KV4x Reference Manual Rev 2 02 2015 138 Preliminary Freescale Semiconductor Inc...
Page 1358: ...KV4x Reference Manual Rev 2 02 2015 1358 Preliminary Freescale Semiconductor Inc...