Datasheet

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