ST72521
CONTROLLER AREA NETWORK (Cont’d)
The figures below show the abort behaviour in the
four possible cases.
Figure 75. Abort and successful transmission
TX RQST
ABORT RQST
CAN TX
CAN RX
LOCK
READY
BUSY
NRTX
In this case the abort request performed during the
transmission has no effect, as the first transmis-
sion is successful.
Figure 76. Abort and transmission delayed by
busy CAN bus
TX RQST
ABORT RQST
CAN TX
CAN RX
LOCK
READY
BUSY
NRTX
In this case the NRTX bit is set to abort the trans-
mission after the first attempt. As the first attempt
is successful the READY and BUSY bits are reset
by pCAN and the transmit buffer becomes empty.
An abort is no longer required.
Figure 77. Abort and error during transmission
TX RQST
Error
ABORT RQST
CAN TX
CAN RX
LOCK
READY
BUSY
NRTX
In this case NRTX (abort request) is set before the
error, thus pCAN resets READY and BUSY after
the error (the first attempt). The abort has been
successful and the transmit buffer is empty.
Figure 78. Abort and arbitration lost
TX RQST
ABORT RQST
CAN TX
CAN RX
LOCK
READY
BUSY
NRTX
In this case the the NRTX bit is set but has no ef-
fect, as the previous transmission attempt failed
due to an arbitration lost. The application waits for
the falling edge of BUSY bit and checks that
READY is still set. This is the case, this means
pCAN has lost the arbitration and LOCK bit can be
safely reset. Abort is immediate and pCAN resets
the READY and BUSY bits.
Timing Considerations
As no interrupt signals that an abort has been suc-
cessful, the application has to wait until the trans-
mit buffer is empty (transmission has been aborted
or transmitted successfully). This time can vary
depending on the case in which the abort is per-
formed (arbitration lost, error or successful trans-
mission). To show the impact of the software work-
around on this timing behaviour Figure 79 and Fig-
ure 80 compare the reference behaviour (worst
case when abort is done by LOCK only) with the
behaviour when NRTX, BUSY and LOCK bits are
used.
Figure 79. Abort by LOCK only - Reference
behaviour
TX RQST
ABORT RQST
CAN TX
CAN RX
LOCK
READY
BUSY
NRTX
149/211