Chapter 25 FlexCAN
MPC5606BK Microcontroller Reference Manual, Rev. 2
Freescale Semiconductor
577
Before proceeding with the functional description, an important concept must be explained. A Message
Buffer is said to be active at a given time if it can participate in the matching and arbitration algorithms
that are happening at that time. An Rx MB with a 0000 code is inactive (refer to
). Similarly, a
Tx MB with a 1000 or 1001 code is also inactive (refer to
). An MB programmed with 0000,
1000, (inactive), or 1001 (abort) will be temporarily deactivated (will not participate in the current
arbitration or matching run) when the CPU writes to the C/S field of that MB (see
).
25.5.2
Local priority transmission
The term local priority refers to the priority of transmit messages of the host node. This allows increased
control over the priority mechanism for transmitting messages.
shows the placement of PRIO
in the ID part of the message buffer.
An additional 3-bit field (PRIO) in the long-word ID part of the message buffer structure has been added
for local priority determination. They are prefixed to the regular ID to define the transmission priority.
These bits are not transmitted and are intended only for Tx buffers.
Perform the following to use the local priority feature:
1. Set the LPRIO_EN bit in the CANx_MCR.
2. Write the additional PRIO bits in the ID long-word of Tx message buffers when configuring the
Tx buffers.
With this extended ID concept, the arbitration process is based on the full 32-bit word. However, the actual
transmitted ID continues to have 11 bits for standard frames and 29 bits for extended frames.
25.5.3
Transmit process
In order to transmit a CAN frame, the CPU must prepare a Message Buffer for transmission by executing
the following procedure:
1. If the MB is active (transmission pending), write an ABORT code (1001) to the Code field of the
Control and Status word to request an abortion of the transmission, then read back the Code field
and the IFLAG register to check if the transmission was aborted (see
). If backwards compatibility is desired (AEN in MCR negated),
write 1000 to the Code field to inactivate the MB but then the pending frame may be transmitted
without notification (see
Section 25.5.7.2, Message buffer deactivation
2. Write the ID word.
3. Write the data bytes.
4. Write the Length, Control, and Code fields of the Control and Status word to activate the MB.
Once the MB is activated in the fourth step, it will participate into the arbitration process and eventually
be transmitted according to its priority. At the end of the successful transmission, the value of the Free
Running Timer is written into the Time Stamp field, the Code field in the Control and Status word is
updated, a status flag is set in the Interrupt Flag register and an interrupt is generated if allowed by the
corresponding Interrupt Mask register bit. The new Code field after transmission depends on the code that
was used to activate the MB in step four (see
and
in
Содержание MPC5605BK
Страница 2: ...This page is intentionally left blank...
Страница 20: ...MPC5606BK Microcontroller Reference Manual Rev 2 20 Freescale Semiconductor...
Страница 103: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 103 Clocks and power...
Страница 104: ...MPC5606BK Microcontroller Reference Manual Rev 2 104 Freescale Semiconductor This page is intentionally left blank...
Страница 243: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 243 Core platform modules...
Страница 244: ...MPC5606BK Microcontroller Reference Manual Rev 2 244 Freescale Semiconductor This page is intentionally left blank...
Страница 395: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 395 Communication modules...
Страница 396: ...MPC5606BK Microcontroller Reference Manual Rev 2 396 Freescale Semiconductor This page is intentionally left blank...
Страница 548: ...Chapter 24 LIN Controller LINFlexD MPC5606BK Microcontroller Reference Manual Rev 2 548 Freescale Semiconductor...
Страница 645: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 643 Timers...
Страница 646: ...MPC5606BK Microcontroller Reference Manual Rev 2 644 Freescale Semiconductor This page is intentionally left blank...
Страница 715: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 713 ADC system...
Страница 716: ...MPC5606BK Microcontroller Reference Manual Rev 2 714 Freescale Semiconductor This page is intentionally left blank...
Страница 787: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 787 Memory...
Страница 788: ...MPC5606BK Microcontroller Reference Manual Rev 2 788 Freescale Semiconductor This page is intentionally left blank...
Страница 893: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 893 Integrity...
Страница 894: ...MPC5606BK Microcontroller Reference Manual Rev 2 894 Freescale Semiconductor This page is intentionally left blank...
Страница 943: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 943 Debug...
Страница 944: ...MPC5606BK Microcontroller Reference Manual Rev 2 944 Freescale Semiconductor This page is intentionally left blank...