© 2004 Microchip Technology Inc. DS70070B-page 23-57
Section 23. CAN
CAN Module
23
23.7.8.4 Rules for Modifying the Transmit Error Counter
The Transmit Error Counter is modified according to the following rules:
• When the transmitter sends an error flag the Transmit Error Counter is increased by 8 with
the following exceptions. In these two exceptions, the Transmit Error Counter is not
changed.
- If the transmitter is “error passive” and detects an acknowledgment error because of
not detecting a “dominant” ACK, and does not detect a “dominant” bit while sending a
passive error flag.
- If the transmitter sends an error flag because of a bit-stuffing error occurred during
arbitration whereby the Stuffbit is located before the RTR bit, and should have been
“recessive”, and has been sent as “recessive” but monitored as “dominant”.
• If a transmitter detects a bit error while sending an active error flag the Transmit Error
Counter is increased by 8.
• Any Node tolerates up to 7 consecutive “dominant” bits after sending an active error flag or
passive error flag. After detecting the 14th consecutive “dominant” bit (in case of an active
error flag) or after detecting the 8th consecutive “dominant” following a passive error flag,
and after each sequence of eight additional consecutive “dominant” bits, every transmitter
increases its Transmission Error Counter and every receiver increases its Receive Error
Counter by 8.
• After the successful transmission of a message (getting an acknowledge and no error until
End-Of-Frame is finished) the Transmit Error Counter is decreased by one unless it was
already 0.
23.7.9 Transmission Interrupts
There are several interrupts linked to the message transmission. The transmission interrupts can
be broken up into two groups:
• Transmission interrupts
• Transmission error interrupts
23.7.9.1 Transmit Interrupt
At least one of the three transmit buffers is empty (not scheduled) and can be loaded to schedule
a message for transmission. Reading the TXnIF flags in the CiINTF register will indicate which
transmit buffer is available and caused the interrupt.