Datasheet

MCP2510
DS21291F-page 16 © 2007 Microchip Technology Inc.
Only messages that have not already begun to be
transmitted can be aborted. Once a message has
begun transmission, it will not be possible for the user
to reset the TXBnCTRL.TXREQ bit. After transmission
of a message has begun, if an error occurs on the bus
or if the message loses arbitration, the message will be
retransmitted regardless of a request to abort.
FIGURE 3-1: TRANSMIT MESSAGE FLOWCHART
Start
Is
CAN Bus available
to start transmission
No
Examine TXBnCTRL.TXP <1:0> to
Are any
TXBnCTRL.TXREQ
?
bits = 1
The message transmission
sequence begins when the
device determines that the
TXBnCTRL.TXREQ for any of
the transmit registers has been
set.
Clear:
TXBnCTRL.ABTF
TXBnCTRL.MLOA
TXBnCTRL.TXERR
Yes
?
is
TXBnCTRL.TXREQ=0
CANCTRL.ABAT=1
Clearing the TxBnCTRL.TXREQ
bit while it is set, or setting the
CANCTRL.ABAT bit before the
message has started transmission
will abort the message.
No
Transmit Message
Was
Message Transmitted
Successfully?
No
Yes
Set TxBnCTRL.TXREQ=0
CANINTE.TXnIE=1?
Generate
Interrupt
Yes
Yes
Yes
Set
Did
a message error
occur?
Was
Arbitration lost during
transmission?
Set
TxBnCTRL.TXERR=1
Yes
No
No
Determine Highest Priority Message
No
?
TxBnCTRL.MLOA=1
The CANINTE.TXnIE bit
determines if an interrupt
should be generated when
a message is successfully
transmitted.
GOTO START
CANTINF.TXnIF=1
Yes
No