当前位置:网站首页>STM32 can communication filter setting problem

STM32 can communication filter setting problem

2022-07-27 15:09:00 Desert fall

It uses 32 Bit identifier mask bit mode

CAN_FilterIdHigh and CAN_FilterIdLow Combine into one 32 Bit register , Used to store what will be filtered ID

CAN_FilterMaskIdHigh and CAN_FilterMaskIdLow Combine into one 32 Bit register , Used to express this ID Which bits of

Must conform to ( Set up 1), Which bits are not care( Set up 0).

Using the identifier mask mode, you can receive a frame containing a specific location , A series of frames .

 

CAN In the receive mailbox identifier register of ,31~3 Bit storage 29 Bit extension identifier .

 


Therefore, it is necessary to receive through the filter ID by 0x0A Frame of ,

CAN_FilterIdLow = 0x000A << 3; CAN_FilterIdHigh = 0;

CAN_FilterMaskIdLow = 0x00FF << 3; CAN_FilterMaskIdHigh = 0;

原网站

版权声明
本文为[Desert fall]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/208/202207271412457506.html