MCP2515
FIGURE 3-1:
TRANSMIT MESSAGE FLOWCHART
Start
The message transmission
sequence begins when the
device determines that the
TXBnCTRL.TXREQ for any of
the transmit registers has been
set.
Are any
TXBnCTRL.TXREQ
No
bits = 1
?
Yes
Clearing the TxBnCTRL.TXREQ bit
Clear:
while it is set, or setting the CAN-
CTRL.ABAT bit before the message
has started transmission, will abort
the message.
TXBnCTRL.ABTF
TXBnCTRL.MLOA
TXBnCTRL.TXERR
Is
is
No
No
CAN bus available
to start transmission?
TXBnCTRL.TXREQ=0
or CANCTRL.ABAT=1
?
Yes
Yes
Examine TXBnCTRL.TXP <1:0> to
Determine Highest Priority Message
Transmit Message
Message
Error
Message error
Was
No
or
Message Transmitted
Successfully?
Lost arbitration
?
Set
TxBnCTRL.TXERR
Yes
Lost
Arbitration
Clear TxBnCTRL.TXREQ
Yes
CANINTE.MEERE?
No
Yes
Set
TxBNCTRL.MLOA
Generate
Interrupt
CANINTE.TXnIE=1?
Generate
Interrupt
No
Set
Set
CANTINF.MERRF
CANTINF.TXnIF
The CANINTE.TXnIE bit
determines if an interrupt
should be generated when
a message is successfully
transmitted.
GOTO START
© 2005 Microchip Technology Inc.
Preliminary
DS21801D-page 17