105带有2路CAN,在MDK 4.10B的环境下可以模拟调试,但是只能用FIFO0,FIFO1不能使用,使用FIFO1时不能正常首发数据,是不是和MDK的版本有关,MDK4.12 不能模拟调试,不论是官方的例程或是自己建立的工程,难道105的CAN只能使用FIFO0吗?
以下是初始化程序
CAN_FilterInitStructure.CAN_FilterNumber = 0;
CAN_FilterInitStructure.CAN_FilterMode = CAN_FilterMode_IdMask;
CAN_FilterInitStructure.CAN_FilterScale = CAN_FilterScale_32bit;
CAN_FilterInitStructure.CAN_FilterIdHigh = 0x0000;
CAN_FilterInitStructure.CAN_FilterIdLow = 0x0000;
CAN_FilterInitStructure.CAN_FilterMaskIdHigh = 0x0000;
CAN_FilterInitStructure.CAN_FilterMaskIdLow = 0x0000;
CAN_FilterInitStructure.CAN_FilterFIFOAssignment = 0; //FIFO0
CAN_FilterInitStructure.CAN_FilterActivation = ENABLE;
CAN_FilterInit(&CAN_FilterInitStructure);
CAN_FilterInitStructure.CAN_FilterNumber = 14;
CAN_FilterInitStructure.CAN_FilterFIFOAssignment = 1; //FIFO1
CAN_FilterInit(&CAN_FilterInitStructure);
CAN2不能正常接收,改为 FIFO0则可以 |