EasyManua.ls Logo

Freescale Semiconductor MPC5604B - Local Priority Transmission

Default Icon
934 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
MPC5604B/C Microcontroller Reference Manual, Rev. 8
452 Freescale Semiconductor
the prioritization of MBs to be transmitted based on the message ID (optionally augmented by 3 local
priority bits) or the MB ordering.
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 Table 22-5). Similarly,
a Tx MB with a ‘1000’ or ‘1001’ code is also inactive (refer to Table 22-6). An MB not programmed with
‘0000’, ‘1000’ or ‘1001’ 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 Section 22.4.7.2, “Message buffer
deactivation).
22.4.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. Table 22-2 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.
22.4.3 Transmit process
In order to transmit a CAN frame, the CPU must prepare a Message Buffer for transmission by executing
the following procedure:
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 Section 22.4.7.1,
“Transmission abort mechanism). If backwards compatibility is desired (AEN in MCR negated),
just write ‘1000’ to the Code field to inactivate the MB but then the pending frame may be
transmitted without notification (see Section 22.4.7.2, “Message buffer deactivation).
Write the ID word.
Write the data bytes.
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

Table of Contents

Other manuals for Freescale Semiconductor MPC5604B

Related product manuals