Datasheet

Table Of Contents
MSCAN
MC9S12DP256 — Revision 1.1
MSCAN
Message Transmit
Background
Modern application layer software is built upon two fundamental
assumptions:
1. Any CAN node is able to send out a stream of scheduled
messages without releasing the bus between the two messages.
Such nodes arbitrate for the bus immediately after sending the
previous message and only release the bus in case of lost
arbitration.
2. The internal message queue within any CAN node is organized
such that the highest priority message is sent out first, if more than
one message is ready to be sent.
The above behavior cannot be achieved with a single transmit buffer.
That buffer must be reloaded right after the previous message is sent.
This loading process lasts a finite amount of time and has to be
completed within the Inter-Frame Sequence (IFS)
1
to be able to send an
uninterrupted stream of messages. Even if this is feasible for limited
CAN bus speeds, it requires that the CPU react with short latencies to
the transmit interrupt.
A double buffer scheme de-couples the reloading of the transmit buffer
from the actual message sending and, as such, reduces the
reactiveness requirements on the CPU. Problems can arise if the
sending of a message is finished while the CPU re-loads the second
buffer. No buffer would then be ready for transmission and the bus would
be released.
At least three transmit buffers are required to meet the first of the above
requirements under all circumstances. The MSCAN has three transmit
buffers.
The second requirement calls for some sort of internal prioritization
which the MSCAN implements with the ‘local priority’ concept described
in Transmit Structures.
Transmit Structures The MSCAN has a triple transmit buffer scheme which allows multiple
messages to be set up in advance and achieve an optimized real-time
performance. The three buffers are arranged as shown in Figure 95.
1. Reference the Bosch CAN 2.0A/B protocol specification dated September 1991.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...