dsPIC30F Family Reference Manual
DS70070B-page 23-54 © 2004 Microchip Technology Inc.
Figure 23-17: Transmit Flowchart
START
Is
CAN bus available
to start transmission
No
Examine TXPRI<1:0> to
Are any
TXREQ
?
bits = 1
The message transmission sequence begins when
the device determines that the TXREQ for any of the
Transmit registers has been set.
Clear: TXABT, TXLARB
and TXERR
Yes
?
Does
TXREQ = 0
ABAT = 1
Clearing the TXREQ bit while it is set, or setting
the ABAT bit before the message has started
transmission will abort the message.
No
Begin transmission (SOF)
Abort Transmission:
Was
message transmitted
successfully?
No
Yes
Set TXREQ = 0
Is
TXnIE = 1?
Generate
Interrupt
Yes
Yes
Set TXABT = 1
Set
Set
TXERR = 1
Yes
No
Determine Highest Priority Message
No
?
Does
TXLARB = 1?
The TXnIE bit determines if an
interrupt should be generated when a
message is successfully transmitted.
END
Does
TXREQ = 0
or TXABT =1
?
Yes
No
TXBUFE = 1
Yes
A message can also be
aborted if a message error or
lost arbitration condition
occurred during transmission.
Arbitration lost during
transmission