Datasheet

© 2007 Microchip Technology Inc. DS21801E-page 17
MCP2515
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
or CANCTRL.ABAT=1
Clearing the TxBnCTRL.TXREQ bit
while it is set, or setting the CAN-
CTRL.ABAT bit before the message
has started transmission, will abort
the message.
No
Transmit Message
Was
Message Transmitted
Successfully?
No
Yes
Clear TxBnCTRL.TXREQ
CANINTE.TXnIE=1?
Generate
Interrupt
Yes
Message
Yes
Set
Set
TxBnCTRL.TXERR
Lost
Determine Highest Priority Message
No
?
Set
TxB
NCTRL.MLOA
The CANINTE.TXnIE bit
determines if an interrupt
should be generated when
a message is successfully
transmitted.
GOTO START
CANTINF.TXnIF
Yes
No
Message error
or
Lost arbitration
Arbitration
Error
CANINTE.MEERE?
No
Generate
Interrupt
Yes
Set
CANTINF.MERRF
?