Let me think about your issue.
There are 3 Tx buffers. There is a possibility to abort any message while it is not in physical Tx buffer.
So, the easiest way is to
- 1) Design system to be able to finish ongoing transition till voltage drops down to the lowest acceptable level. (suitable capacitor design, interrupt priority usage, proper finalizing procedure,….)
- 2) Abort all messages which are in remaining Tx buffers.
Abort Request — The CPU sets the ABTRQx bit to request that a scheduled message buffer (TXEx = 0) be
- aborted. The MSCAN grants the request if the message has not already started transmission, or if the
transmission is not successful (lost arbitration or error). When a message is aborted, the associated TXE (see
Section 16.3.2.7, “MSCAN Transmitter Flag Register (CANTFLG)”) and abort acknowledge flags (ABTAK, see
Section 16.3.2.10, “MSCAN Transmitter Message Abort Acknowledge Register (CANTAAK)”) are set and a
transmit interrupt occurs if enabled. The CPU cannot reset ABTRQx. ABTRQx is reset whenever the associated
TXE flag is set.
Initialization Mode Request — When this bit is set by the CPU, the MSCAN skips to initialization mode (see
Section 16.4.4.5, “MSCAN Initialization Mode”). Any ongoing transmission or reception is aborted and
synchronization to the CAN bus is lost. The module indicates entry to initialization mode by setting INITAK = 1
(Section 16.3.2.2, “MSCAN Control Register 1 (CANCTL1)”).
Best regards,
Ladislav