GD32F10x User Manual
630
Step 3: Set the RFD bit in CAN_RFIFOx register.
21.3.5.
Filtering function
The CAN receives frames 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 GD32F10x
XD/HD/MD , the filter consists of 14 banks: bank0 to bank13. In GD32F10x CL,
the filter consists of 28 banks: bank0 to bank27. Each bank has two 32-bit registers:
CAN_FxDATA0 and CAN_FxDATA1.
Each filter bank can be configured to 32-bit or 16-bit.
32-bit: SFID[10:0], EFID[17:0], FF and FT bits. As shown in
Figure 21-5. 32-bit filter
FDATA[31:21]
FDATA[20:3]
FDATA[2:0]
SFID[10:0]
EFID[17:0]
FF
FT 0
16-bit: SFID [10:0], FT, FF and EFID[17:15] bits. As shown in
Figure 21-6. 16-bit filter
FDATA[31:21]
FDATA[20:16]
SFID[10:0]
FT FF EFID[17:15]
FDATA[15:5]
FDATA[4:0]
SFID[10:0]
FT
EFID[17:15]
FF
Mask mode
For the Identifier of a data frame to be filtered, the mask mode is used to specify which bits
must be the same as the preset Identifier and which bits need not be judged. 32-bit mask
Figure 21-7. 32-bit mask mode filter
Figure 21-7. 32-bit mask mode filter
FDATA1[31:21]
FDATA1[20:3]
FDATA1[2:0]
SFID[10:0]
EFID[17:0]
FF
FT
0
FDATA0[31:21]
FDATA0[20:3]
FDATA0[2:0]
ID
Mask
Figure 21-8. 16-bit mask mode filter
FDATA0[15:5]
FDATA0[4:0]
SFID[10:0]
FT
FF EFID[17:15]
FDATA1[15:5]
FDATA1[4:0]
SFID[10:0]
FT
FF EFID[17:15]
FDATA0[31:21]
FDATA0[20:16]
FDATA1[31:21]
FDATA1[20:16]
ID
Mask
Содержание GD32F10 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F10x Arm Cortex M3 32 bit MCU User Manual Revision 2 6 Jun 2022 ...
Страница 63: ...GD32F10x User Manual 63 programmed during the chip production ...
Страница 117: ...GD32F10x User Manual 117 010 1 0 011 0 9 ...
Страница 416: ...GD32F10x User Manual 416 shadow register updates every update event ...
Страница 427: ...GD32F10x User Manual 427 value ...
Страница 518: ...GD32F10x User Manual 518 These bits are not used in SPI mode ...