English
Language : 

PIC18F6585 Datasheet, PDF (334/496 Pages) Microchip Technology – 64/68/80-Pin High-Performance, 64-Kbyte Enhanced Flash Microcontrollers with ECAN Module
PIC18F6585/8585/6680/8680
23.6.2 ABORTING TRANSMISSION
The MCU can request to abort a message by clearing
the TXREQ bit associated with the corresponding mes-
sage buffer (TXBnCON<3> or BnCON<3>). Setting the
ABAT bit (CANCON<4>) will request an abort of all
pending messages. If the message has not yet started
transmission or if the message started but is inter-
rupted by loss of arbitration or an error, the abort will be
processed. The abort is indicated when the module
sets the TXABT bit for the corresponding buffer
(TXBnCON<6> or BnCON<6>). If the message has
started to transmit, it will attempt to transmit the current
message fully. If the current message is transmitted
fully and is not lost to arbitration or an error, the TXABT
bit will not be set because the message was transmit-
ted successfully. Likewise, if a message is being
transmitted during an abort request and the message is
lost to arbitration or an error, the message will not be
retransmitted and the TXABT bit will be set, indicating
that the message was successfully aborted.
FIGURE 23-2:
TRANSMIT BUFFERS
TXB0
TXB1
Once an abort is requested by setting ABAT or TXABT
bits, it cannot be cleared to cancel the abort request.
Only CAN module hardware or a POR condition can
clear it.
23.6.3 TRANSMIT PRIORITY
Transmit priority is a prioritization within the
PIC18F6585/8585/6680/8680 devices of the pending
transmittable messages. This is independent from and
not related to any prioritization implicit in the message
arbitration scheme built into the CAN protocol. Prior to
sending the SOF, the priority of all buffers that are
queued for transmission is compared. The transmit
buffer with the highest priority will be sent first. If more
than one buffer has the same priority setting, the mes-
sage is transmitted in the order of TXB2, TXB1, TXB0,
B5, B4, B3, B2, B1, B0. There are four levels of transmit
priority. If TXP bits for a particular message buffer are
set to ‘11’, that buffer has the highest possible priority.
If TXP bits for a particular message buffer are ‘00’, that
buffer has the lowest possible priority.
TXB2
TXB3-TXB8
Message
Queue
Control
Transmit Byte Sequencer
DS30491C-page 332
 2004 Microchip Technology Inc.