
AT32F413
Series Reference Manual
2022.06.27
Page 300
Rev 2.00
Figure 20-12
Transmit mailbox status
EMPTY
PENDING
Send request(TMSR = 1)
Is it the highest
priority
SCHEDULED
Yes
Is the bus idle
SENDING
Yes
Send success or send failed with
auto retransmission forbidden
Abort sending(TMxCT = 1)
Abort sending(TMxCT = 1)
Send failed with automatic
retransmission
No
No
Transmit priority configuration
When two or more transmit boxes are in PENDING state, their transmit priority must be given.
By identifier: When MMSSR=0 in the CAN_MCTRL register, the transmit order is defined by the identifier
of the message in the mailbox. The message with lower identifier value has the highest priority. If the
identifier values are the same, the message with lower mailbox number will be transmitted first.
By transmit request order: When MMSSR=1 in the CAN_MCTRL register, the transmit priority is given
by the transmit request order of mailboxes.
Transmit status and error status
The TMxTCF, TMxTSF, TMxALF, TMxTEF and TMxEF bits in the CAN_TSTS register are used to
indicate transmit status and error status.
TMxTCF bit: Transmission complete flag, indicating that the data transmission is complete when
TMxTCF=1.
TMxTSF bit: Transmission success flag, indicating that the data has been transmitted successfully when
TMxTSF =1.
TMxALF bit: Transmission arbitration lost flag, indicating that the data transmission arbitration is lost
when TMxALF=1.
TMxTEF bit: Transmission error flag, indicating that the data transmission failed due to bus error, and
an error frame is sent when TMxTEF=1.
TMxEF bit: Mailbox empty flag, indicating that the data transmission is complete and the mailbox
becomes empty when TMxEF=1.
Transmit abort
The TMxCT bit is set in the CAN_TSTS register to abort the transmission of the current mailbox, detailed
as follows:
When the current transmission fails or arbitration is lost, if the automatic retransmission mode is disabled,
the tranmist mailbox become EMPTY; if the automatic retransmission mode is enbled, the tranmist
mailbox becomes SCHEDULED, the mailbox transmission then is aborted and becomes EMPTY.
When the current transmission is complete successfully, the mailbox becomes EMPTY.