GD32F403xx User Manual
608
Rx FIFO
Rx FIFO has three mailboxes. The reception f rames are stored in the mailbox according to
the arriving sequence. First arrived frame can be accessed by application firstly.
The number of f rames in the Rx FIFO and the status can be accessed by the register
CAN_RFIFO0 and CAN_RFIFO1.
If at least one f rame has been stored in the Rx FIFO0, the f rame data is stored in the
CAN_RFIFOMI0, CAN_RFIFOMP0, CAN_RFIFOMDATA00 and CAN_RFIFOMDATA10
registers. After reading the current f rame, set RFD bit in CAN_RFIFO0 to release a f rame in
the Rx FIFO and the software can read the next frame.
Rx FIFO status
RFL (Rx FIFO length) bits in CAN_RFIFOx register is 0 when no f rame is stored in the Rx
FIFO and it is 3 when FIFOx is full.
When RFF bit in CAN_RFIFOx register is set, it indicates FIFOx is full, at this time, RFL is 3.
When a new f rame arrives after the FIFO has held three frames, the RFO bit in CAN_RFIFOx
register will be set, and it indicates FIFOx is overrun. If the RFOD bit in CAN_CTL register is
set, the new f rame is discarded. If the RFOD bit in CAN_CTL register is reset, the new frame
is stored into the Rx FIFO and the last frame in the Rx FIFO is discarded.
Steps of receiving a message
Step 1: Check the number of frames in the Rx FIFO.
Step 2:
Read
CAN_RFIFOMIx, CAN_RFIFOMPx, CAN_RFIFOMDATA0x and
CAN_RFIFOMDATA1x.
Step 3: Set the RFD bit in CAN_RFIFOx register.
22.3.5.
Filtering function
The CAN receives f rames from the CAN bus. If the frame passes the filter, it is stored in the
Rx FIFOs. Otherwise, the frame will be discarded without intervention by the software.
The identifier of frame is used for the matching of the filter.
Scale
In GD32F403xx, the f ilter consists of 28 banks: bank0 to bank27. Each bank has two 32-bit
registers: CAN_FxDATA0 and CAN_FxDATA1.
Each f ilter bank can be configured to 32-bit or 16-bit.
32-bit: SFID[10:0], EFID[17:0], FF and FT bits. As is shown in
.
Содержание GD32F403 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F403xx Arm Cortex M4 32 bit MCU User Manual Revision 2 6 Jul 2022 ...
Страница 177: ...GD32F403xx UserManual 177 Peripheral Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 SDIO SDIO ...
Страница 217: ...GD32F403xx UserManual 217 ensures that no conversion is in progress ...