Transmit Process - NXP Semiconductors freescale KV4 Series Reference Manual

Table of Contents

Advertisement

Functional description
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
both the Matching and Arbitration processes. An Rx MB with a 0b0000 code is inactive
(refer to
Table
43-106). Similarly, a Tx MB with a 0b1000 or 0b1001 code is also
inactive (refer to
Table

43.5.1 Transmit process

To transmit a CAN frame, the CPU must prepare a Message Buffer for transmission by
executing the following procedure:
1. Check whether the respective interrupt bit is set and clear it.
2. If the MB is active (transmission pending), write the ABORT code (0b1001) to the
CODE field of the Control and Status word to request an abortion of the
transmission. Wait for the corresponding IFLAG bit to be asserted by polling the
CAN_IFLAG register or by the interrupt request if enabled by the respective IMASK
bit. Then read back the CODE field to check if the transmission was aborted or
transmitted (see
desired (CAN_MCR[AEN] bit is negated), just write the INACTIVE code (0b1000)
to the CODE field to inactivate the MB but then the pending frame may be
transmitted without notification (see
3. Write the ID word.
4. Write the data bytes.
5. Write the DLC, Control, and CODE fields of the Control and Status word to activate
the MB.
When the MB is activated, it participates in the arbitration process and is eventually
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, the
CRC Register 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 (see
43-106
and
Table 43-107
1130
43-107).
Transmission abort
mechanism). If backwards compatibility is
Mailbox
in
Message buffer
KV4x Reference Manual, Rev. 2, 02/2015
Preliminary
inactivation).
structure).
Table
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents