
Controller Area Network (FlexCAN)
PXN20 Microcontroller Reference Manual, Rev. 1
29-32
Freescale Semiconductor
29.4.5.1
Transmission Abort Mechanism
The abort mechanism provides a safe way to request the abortion of a pending transmission. A feedback
mechanism is provided to inform the CPU if the transmission was aborted or if the frame could not be
aborted and was transmitted instead. To maintain backwards compatibility, the abort mechanism must be
explicitly enabled by asserting the AEN bit in the CAN
x
_MCR.
In order to abort a transmission, the CPU must write a specific abort code (1001) to the code field of the
control and status word. When the abort mechanism is enabled, the active MBs configured as transmission
must be aborted first and then they may be updated. If the abort code is written to an MB that is currently
being transmitted, or to an MB that was already loaded into the SMB for transmission, the write operation
is blocked and the MB is not deactivated, but the abort request is captured and kept pending until one of
the following conditions are satisfied:
•
The module loses the bus arbitration
•
There is an error during the transmission
•
The module is put into freeze mode
If none of conditions above are reached, the MB is transmitted correctly, the interrupt flag is set in the
CAN
x
_IFLAG register and an interrupt to the CPU is generated (if enabled). The abort request is
automatically cleared when the interrupt flag is set. In the other hand, if one of the above conditions is
reached, the frame is not transmitted, therefore the abort code is written into the code field, the interrupt
flag is set in the CAN
x
_IFLAG and an interrupt is (optionally) generated to the CPU.
If the CPU writes the abort code before the transmission begins internally, then the write operation is not
blocked, therefore the MB is updated and no interrupt flag is set. In this way the CPU needs to read the
abort code to make sure the active MB was deactivated. Although the AEN bit is asserted and the CPU
wrote the abort code, in this case the MB is deactivated and not aborted, because the transmission did not
start yet. One MB is only aborted when the abort request is captured and kept pending until one of the
previous conditions are satisfied.
The abort procedure can be summarized as follows:
•
CPU writes 1001 into the code field of the C/S word
•
CPU reads the CODE field and compares it to the value that was written
•
If the CODE field that was read is different from the value that was written, the CPU must read the
corresponding CAN
x
_IFLAG to check if the frame was transmitted or it is being currently
transmitted. If the corresponding CAN
x
_IFLAG is set, the frame was transmitted. If the
corresponding CAN
x
_IFLAG is reset, the CPU must wait for it to be set, and then the CPU must
read the CODE field to check if the MB was aborted (CODE = 1001) or it was transmitted
(CODE = 1000).
29.4.5.2
Message Buffer Deactivation
Deactivation is mechanism provided to maintain data coherence when the CPU writes to the control and
status word of active MBs out of freeze mode. Any CPU write access to the control and status word of an
MB causes that MB to be excluded from the transmit or receive processes during the current matching or
arbitration round. The deactivation is temporary, affecting only for the current match/arbitration round.
Summary of Contents for PXN2020
Page 1: ...PXN20 Microcontroller Reference Manual Devices Supported PXN2020 PXN2120 PXN20RM Rev 1 06 2011...
Page 42: ...PXN20 Microcontroller Reference Manual Rev 1 lxiv Freescale Semiconductor...
Page 64: ...Introduction PXN20 Microcontroller Reference Manual Rev 1 1 22 Freescale Semiconductor...
Page 112: ...Signal Description PXN20 Microcontroller Reference Manual Rev 1 3 44 Freescale Semiconductor...
Page 118: ...Resets PXN20 Microcontroller Reference Manual Rev 1 4 6 Freescale Semiconductor...
Page 372: ...e200z6 Core Z6 PXN20 Microcontroller Reference Manual Rev 1 13 8 Freescale Semiconductor...
Page 412: ...e200z0 Core Z0 PXN20 Microcontroller Reference Manual Rev 1 14 14 Freescale Semiconductor...
Page 821: ...Media Local Bus MLB PXN20 Microcontroller Reference Manual Rev 1 Freescale Semiconductor 27 49...
Page 822: ...Media Local Bus MLB PXN20 Microcontroller Reference Manual Rev 1 27 50 Freescale Semiconductor...
Page 1376: ...Memory Map PXN20 Microcontroller Reference Manual Rev 1 A 118 Freescale Semiconductor...