Chapter 16 Freescale’s Scalable Controller Area Network (S12MSCANV3)
MC9S12XE-Family Reference Manual , Rev. 1.21
642
Freescale Semiconductor
Because of an order from the United States International Trade Commission, BGA-packaged product lines and partnumbers
indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010
handler must read the received message from the RxFG and then reset the RXF ag to acknowledge the
interrupt and to release the foreground buffer. A new message, which can follow immediately after the IFS
eld of the CAN frame, is received into the next available RxBG. If the MSCAN receives an invalid
message in its RxBG (wrong identier, transmission errors, etc.) the actual contents of the buffer will be
over-written by the next message. The buffer will then not be shifted into the FIFO.
When the MSCAN module is transmitting, the MSCAN receives its own transmitted messages into the
background receive buffer, RxBG, but does not shift it into the receiver FIFO, generate a receive interrupt,
or acknowledge its own messages on the CAN bus. The exception to this rule is in loopback mode (see
exactly like all other incoming messages. The MSCAN receives its own transmitted messages in the event
that it loses arbitration. If arbitration is lost, the MSCAN must be prepared to become a receiver.
An overrun condition occurs when all receive message buffers in the FIFO are lled with correctly
received messages with accepted identiers and another message is correctly received from the CAN bus
with an accepted identier. The latter message is discarded and an error interrupt with overrun indication
messages while the receiver FIFO is being lled, but all incoming messages are discarded. As soon as a
receive buffer in the FIFO is available again, new valid messages will be accepted.
16.4.3
Identier Acceptance Filter
(ID[10:0] or ID[28:0]). Any of these bits can be marked ‘don’t care’ in the MSCAN identier mask
A lter hit is indicated to the application software by a set receive buffer full ag (RXF = 1) and three bits
(CANIDAC)”). These identier hit ags (IDHIT[2:0]) clearly identify the lter section that caused the
acceptance. They simplify the application software’s task to identify the cause of the receiver interrupt. If
more than one hit occurs (two or more lters match), the lower hit has priority.
A very exible programmable generic identier acceptance lter has been introduced to reduce the CPU
interrupt loading. The lter is programmable to operate in four different modes:
Two identier acceptance lters, each to be applied to:
— The full 29 bits of the extended identier and to the following bits of the CAN 2.0B frame:
– Remote transmission request (RTR)
– Identier extension (IDE)
– Substitute remote request (SRR)
— The 11 bits of the standard identier plus the RTR and IDE bits of the CAN 2.0A/B messages.
This mode implements two lters for a full length CAN 2.0B compliant extended identier.
Although this mode can be used for standard identiers, it is recommended to use the four or
eight identier acceptance lters.
1. The receive interrupt occurs only if not masked. A polling scheme can be applied on RXF also.