AnsweredAssumed Answered

CAN FILTERS

Question asked by jagadeesh.puneeth on Nov 11, 2015
Latest reply on Mar 22, 2017 by Clive One
Hi every one, especially Mr.Clive, today i have problem with CAN FILTERS i want to allow all IDS from 100 to 1FF in other words block all messages after 0x0200
here is my code, Please help me, Thanks in advance
void CAN_FilterConfiguration(void) {
        CAN_FilterInitTypeDef CAN_FilterInitStructure;
  
        /* CAN filter configuration */
    //    CAN_FilterInitStructure.CAN_FilterNumber = 0; // CAN 1
        CAN_FilterInitStructure.CAN_FilterNumber = 14; // CAN 2
        CAN_FilterInitStructure.CAN_FilterFIFOAssignment = CAN_FIFO0; // FIFO = 0
        CAN_FilterInitStructure.CAN_FilterMode = CAN_FilterMode_IdMask; // Filter mode = identifier mask based filtering
        CAN_FilterInitStructure.CAN_FilterScale = CAN_FilterScale_16bit;
        CAN_FilterInitStructure.CAN_FilterIdHigh = 0x0100 << 5;
        CAN_FilterInitStructure.CAN_FilterIdLow = 0;
        CAN_FilterInitStructure.CAN_FilterMaskIdHigh = 0x01ff << 5;
        CAN_FilterInitStructure.CAN_FilterMaskIdLow = 0;
        CAN_FilterInitStructure.CAN_FilterActivation = ENABLE;
  
        //Interrrupts
            CAN_ITConfig(CAN2,CAN_IT_FMP0,ENABLE);
  
  
  
        CAN_FilterInit(&CAN_FilterInitStructure);
    }

Outcomes