MSCAN Controller
68HC(9)12DG128 Rev 1.0
292
MSCAN Controller
MOTOROLA
When the msCAN12 module is transmitting, the msCAN12 receives its
own messages into the background receive buffer, RxBG, but does NOT
overwrite RxFG, generate a receive interrupt or acknowledge its own
messages on the CAN bus. The exception to this rule is in loop-back
mode (see
msCAN12 Module Control Register 0 (CMCR0)
) where the
msCAN12 treats its own messages exactly like all other incoming
messages. The msCAN12 receives its own transmitted messages in the
event that it loses arbitration. If arbitration is lost, the msCAN12 must be
prepared to become receiver.
An overrun condition occurs when both the foreground and the
background receive message buffers are filled with correctly received
messages with accepted identifiers and another message is correctly
received from the bus with an accepted identifier. The latter message is
discarded and an error interrupt with overrun indication is generated if
enabled. The msCAN12 is still able to transmit messages with both
receive message buffers filled, but all incoming messages are
discarded.
NOTE:
The msCAN12 will receive its own messages into the background
receive buffer RxBG but will not overwrite RxFG and will not emit a
receive interrupt nor will it acknowledge (ACK) its own messages on the
CAN bus. The exception to this rule is that when in loop-back mode
msCAN12 will treat its own messages exactly like all other incoming
messages.
Transmit Structures
The msCAN12 has a triple transmit buffer scheme in order to allow
multiple messages to be set up in advance and to achieve an optimized
real-time performance. The three buffers are arranged as shown in
Figure 44
.
All three buffers have a 13 byte data structure similar to the outline of the
receive buffers (see
Programmer’s Model of Message Storage
). An
additional transmit buffer priority register (TBPR) contains an 8-bit so
called local priority field (PRIO) (see
Transmit Buffer Priority Registers
(TBPR)
).
In order to transmit a message, the CPU12 has to identify an available
transmit buffer which is indicated by a set transmit buffer empty (TXE)
6-mscan12