CH32V203F6P6中CAN過濾器異常
//官方代碼如下,為了方便ID改成1
????CAN_FilterInitSturcture.CAN_FilterNumber?=?0;
????CAN_FilterInitSturcture.CAN_FilterMode?=?CAN_FilterMode_IdMask;
????CAN_FilterInitSturcture.CAN_FilterScale?=?CAN_FilterScale_32bit;
????CAN_FilterInitSturcture.CAN_FilterIdHigh?=?0x0020;
????CAN_FilterInitSturcture.CAN_FilterIdLow?=?0;
????CAN_FilterInitSturcture.CAN_FilterMaskIdHigh?=?0xFFE0;
????CAN_FilterInitSturcture.CAN_FilterMaskIdLow?=?0x0006;
????CAN_FilterInitSturcture.CAN_FilterFIFOAssignment?=?CAN_Filter_FIFO0;
????CAN_FilterInitSturcture.CAN_FilterActivation?=?ENABLE;
????CAN_FilterInit(&CAN_FilterInitSturcture);
????
//在官方代碼中加另一組過濾器
????CAN_FilterInitSturcture.CAN_FilterNumber?=?1;
????CAN_FilterInitSturcture.CAN_FilterMode?=?CAN_FilterMode_IdMask;
????CAN_FilterInitSturcture.CAN_FilterScale?=?CAN_FilterScale_32bit;
????CAN_FilterInitSturcture.CAN_FilterIdHigh?=?0x0040;
????CAN_FilterInitSturcture.CAN_FilterIdLow?=?0x0000;
????CAN_FilterInitSturcture.CAN_FilterMaskIdHigh?=?0xFFE0;
????CAN_FilterInitSturcture.CAN_FilterMaskIdLow?=?0x0;
????????CAN_FilterInitSturcture.CAN_FilterFIFOAssignment?=?CAN_Filter_FIFO0;
????????CAN_FilterInitSturcture.CAN_FilterActivation?=?ENABLE;
????????CAN_FilterInit(&CAN_FilterInitSturcture);

????????在調試中,只開一組過濾器的時候,功能正常,當開一組以上過濾器時,最后打開的過濾器功能正常,前面打開的過濾器組的標識符寄存器和屏蔽位寄存器會置0(模式,位寬,關聯(lián),激活均正常),導致前一組過濾器在屏蔽模式下,因為屏蔽位置0,任何ID都可通過。前一組過濾器在標識模式下,只能通過ID為0的數據幀。

????? ? 望解決。

您好,你可以下載我們CH32V203最新EVT例程,最新EVT對庫進行了更新,解決了開啟兩個過濾器組無法過濾的問題。后續(xù)若有問題或疑問,可通過郵箱和我溝通。CH32V203EVT下載鏈接如下:

CH32V203 EVT:http://www.findthetime.net/downloads/CH32V20xEVT_ZIP.html

?


謝謝,已解決。


只有登錄才能回復,可以選擇微信賬號登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频