官方给的代码如下:
/* identifier/mask mode, One 32-bit filter, StdId: 0x317 */ CAN_FilterInitSturcture.CAN_FilterMode = CAN_FilterMode_IdMask; CAN_FilterInitSturcture.CAN_FilterScale = CAN_FilterScale_32bit; CAN_FilterInitSturcture.CAN_FilterIdHigh = 0x62E0; CAN_FilterInitSturcture.CAN_FilterIdLow = 0; CAN_FilterInitSturcture.CAN_FilterMaskIdHigh = 0xFFE0; CAN_FilterInitSturcture.CAN_FilterMaskIdLow = 0x0006;
经过实际测试发现这段代码能接受所有id不止0x317;
有人了解或者有官方的指导手册没有希望能够解决这个问题
热门产品 :
CH585: 集成高速USB和NFC的蓝牙MCU