![GigaDevice Semiconductor GD32A50 Series Скачать руководство пользователя страница 620](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32a50-series/gd32a50-series_user-manual_2225782620.webp)
GD32A50x User Manual
620
matching.
The matching process starts when completes the DLC field reception.
Searching process
When the Rx FIFO is enabled, the RFO bit in CAN_CTL2 register gives the searching
order.
-
If RFO bit is set to 1, matching process starts from Rx mailbox to Rx FIFO. The Rx
mailbox is searched from the lowest number mailbox to the higher ones.
Firstly, searching for a free-to-receive matched Rx mailbox. If found, the matched
mailbox is the matching winner.
Secondly, when no free-to-receive matched Rx mailbox is found, but a non-free-to-
receive matched Rx mailbox is found, then check the RPFQEN bit (a queue function
for the Rx mailbox) in CAN_CTL0 register. If the RPFQEN bit is 0, the matching
winner is the first non-free-to-receive matched Rx mailbox (leading to mailbox CODE
OVERRUN). If the the RPFQEN bit is 1, the matching process will search for Rx
FIFO to decide the winner: when the Rx FIFO is matched and is not full, the Rx FIFO
is the matching winner; otherwise, the matching winner is the last non-free-to-
receive matched Rx mailbox(leading to mailbox CODE OVERRUN).
Thirdly, if no matched Rx mailbox is found (means no free-to-receive matched
mailbox, nor non-free-to-receive matched mailbox), then matching is processed on
Rx FIFO. In this case, if the Rx FIFO is matched but it is full, it will leads to Rx FIFO
overflow, while if the Rx FIFO is not matched (no matter it is full or not), the message
will not be received.
-
If RFO bit is set to 0, matching process starts from Rx FIFO to Rx mailbox. If the Rx
FIFO matches the searching conditions, and is not full, then the Rx FIFO is the
matching winner, regardless of searching for mailboxes. If Rx FIFO does not match
or it is full, then matching is processed on Rx mailbox. The searching for Rx mailbox
is similar to the process described above (when RFO bit is 1).
When the Rx FIFO is disabled, the matching process only searches the Rx mailboxes.
The searching for Rx mailbox is similar to the process described above (when Rx FIFO
is enabled and when RFO bit is 1).
A free-to-receive Rx mailbox can be:
For a data frame reception, or a remote frame reception when RRFRMS bit in
CAN_CTL2 register is 1, it can be: A mailbox with CODE field EMPTY; A mailbox with
CODE field FULL or OVERRUN, which has already been serviced (read) and unlocked.
For a remote frame reception when RRFRMS bit in CAN_CTL2 register is 0, it can be a
mailbox with CODE field RANSWER.
Searching conditions for matched Rx mailbox
Searching conditions for matched Rx mailbox, refers to
When the frame in Rx shift buffer is a data frame (RTR field is 0), Rx mailbox with CODE