AT32F425
Series Reference Manual
2022.03.30
Page 328
Ver 2.01
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.
19.6.6 Message reception
Register configuration
The CAN_RFIx, CAN_RFCx, CAN_RFDTLx and CAN_RFDTHx registers can be used by user
applications to obtain valid messages.
Message reception
The CAN controller boasts two FIFO with three levels to receive messages. FIFO rule is adopted. When
the message is received correctly and has passed the identifier filtering, it is regarded as a valid message
and is stored in the corresponding FIFO. The number of the received messages RFxMN[1: 0] will be
incremented by one whenever the receive FIFO receives a valid message. If a valid message is received
when RFxMN[1: 0]=3, the controller will select either to overwrite the previous messages or discard the
new incoming message through the MDRSEL bit in the CAN_MCTRL register.
In the meantime, when the user reads a frame of message and the RFxR is set in the CAN_RFx register,
one FIFO mailbox is released, and RFxMN[1: 0] bit is descremented by one in the CAN_RFx register.
Receive FIFO status
RFxMN[1: 0], RFxFF and RFxOF bits in the RFx register are used to indicate receive FIFO status.
RFxMN[1: 0]: indicates the number of valid messages stored in the FIFOx.
RFxFF: indicates that three valid messages are stroed in the FIFOx (i.e. the three
mailboxes are full), as shown in (c) of
RFxOF: indicates that a new valid message has been received while the FIFOx is full, as shown in (d)
of
Figure 19-13
Receive FIFO status
Address
0
Address
1
Read
Addr
Write
Addr
(
a
)
Receive a valid frame
(
b
)
Receive a valid frame
(
c
)
Receive a valid frame
(
d
)
Receive a valid frame
(
e
)
Release a frame
(
f
)
Release a frame
Address
2
Address
0
Address
1
Address
2
Address
0
Address
1
Address
2
Address
0
Address
1
Address
2
Address
0
Address
1
Address
2
Address
0
Address
1
Address
2
Read
Addr
Read
Addr
Read
Addr
Read
Addr
Read
Addr
Write
Addr
Write
Addr
Write
Addr
Write
Addr
Write
Addr