Chapter 11 Freescale’s Scalable Controller Area Network (S12MSCANV3)
S12ZVHY/S12ZVHL Family Reference Manual Rev. 1.05
458
Freescale Semiconductor
The MSCAN facilitates a sophisticated message storage system which addresses the requirements of a
broad range of network applications.
11.4.2.1
Message Transmit Background
Modern application layer software is built upon two fundamental assumptions:
•
Any CAN node is able to send out a stream of scheduled messages without releasing the CAN bus
between the two messages. Such nodes arbitrate for the CAN bus immediately after sending the
previous message and only release the CAN bus in case of lost arbitration.
•
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 behavior described in the bullets above
cannot be achieved with a single transmit buffer. That buffer
must be reloaded immediately after the previous message is sent. This loading process lasts a finite amount
of time and must be completed within the inter-frame sequence (IFS) 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 reacts
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, therefore, reduces the reactiveness requirements of 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 CAN 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
Section 11.4.2.2, “Transmit Structures
.”
11.4.2.2
Transmit Structures
The MSCAN triple transmit buffer scheme optimizes real-time performance by allowing multiple
messages to be set up in advance. The three buffers are arranged as shown in
All three buffers have a 13-byte data structure similar to the outline of the receive buffers (see
Section 11.3.3, “Programmer’s Model of Message Storage
”). An additional Transmit Buffer Priority
Register (TBPR) contains an 8-bit local priority field (PRIO) (see
Section 11.3.3.4, “Transmit Buffer
”). The remaining two bytes are used for time stamping of a message, if required
Section 11.3.3.5, “Time Stamp Register (TSRH–TSRL)
”).
To transmit a message, the CPU must identify an available transmit buffer, which is indicated by a set
transmitter buffer empty (TXEx) flag (see
Section 11.3.2.7, “MSCAN Transmitter Flag Register
”). If a transmit buffer is available, the CPU must set a pointer to this buffer by writing to the
CANTBSEL register (see
Section 11.3.2.11, “MSCAN Transmit Buffer Selection Register
”). This makes the respective buffer accessible within the CANTXFG address space (see
Section 11.3.3, “Programmer’s Model of Message Storage
”). The algorithmic feature associated with the
CANTBSEL register simplifies the transmit buffer selection. In addition, this scheme makes the handler
Содержание MC9S12ZVHL32
Страница 21: ...S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 Freescale Semiconductor 21 PAGE INTENTIONALLY LEFT BLANK...
Страница 22: ...S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 22 Freescale Semiconductor PAGE INTENTIONALLY LEFT BLANK...
Страница 686: ...Chapter 20 ECC Generation module SRAM_ECCV1 S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 686 Freescale Semiconductor...
Страница 752: ...Chapter 22 Supply Voltage Sensor BATSV2 S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 752 Freescale Semiconductor...
Страница 774: ...Chapter 23 LIN Physical Layer S12LINPHYV2 S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 774 Freescale Semiconductor...
Страница 788: ...Appendix A MCU Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 788 Freescale Semiconductor...
Страница 794: ...Appendix B ADC Electricals S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 794 Freescale Semiconductor...
Страница 798: ...Appendix D IRC Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 798 Freescale Semiconductor...
Страница 802: ...Appendix F MSCAN Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 802 Freescale Semiconductor...
Страница 806: ...Appendix G NVM Electrical Parameters S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 806 Freescale Semiconductor...
Страница 810: ...Appendix H BATS Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 810 Freescale Semiconductor...
Страница 816: ...Appendix K OSC32K Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 816 Freescale Semiconductor...
Страница 822: ...Appendix L SPI Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 822 Freescale Semiconductor...
Страница 826: ...Appendix M LINPHY Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 826 Freescale Semiconductor...
Страница 829: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 830 Freescale Semiconductor O 1 144 LQFP...
Страница 830: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 Freescale Semiconductor 831...
Страница 831: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 832 Freescale Semiconductor...
Страница 832: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 Freescale Semiconductor 833 O 2 100 LQFP...
Страница 833: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 834 Freescale Semiconductor...
Страница 834: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 Freescale Semiconductor 835...
Страница 835: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 836 Freescale Semiconductor...