BAT32G1x9 user manual | Chapter 22 CAN control
965 / 1149
Rev.1.02
Figure22-68. Send through interrupts (using the CnLOPT register).
Note The 1.TRQ
bit is set after the RDY setting
2. The RDY bit and the
TRQ
bit cannot be set at the same time
Note: Check the MBON flag at the beginning and end of the interrupt in order to check access to the
message buffer and the TX history list register to prevent the execution of a pending sleep mode. If
MBON is detected to be cleared, the result must be discarded and the operation processed again
after MBON is set up again.
It is recommended to remove some sleep mode requests before handling TX interrupts.
Read the C0LOPT register
Clear the RDY bit
Data frame or remote frame?
Set the RDY
bit
Begin
Send completes
interrupt processing
RDY= 0?
no
t
yes
Data frames
Remote frames
Set upC0MDATAxmregister
Set the C0MDLCm
register
Clear theC0MWithFm register
RTR
bit
Set upC0MeDlm
和
C0MeDHm
register
Set the C0MDLCm register
Set the C0MCONFm register RTR bit
Set upC0MeDlm and C0MeDHm
register
Set the TRQ
bit
end