I want to filter with canbus. I found certain things for the filter, but what I want is not working. I created a filter like the one below. Some messages cannot pass through this filter.
What kind of change should I make in the filter to be included in the following messages? Thank you for your answers.
Passing messages
Messages that do not pass
My Filtre Code
void Can_Filter_Config(CAN_HandleTypeDef *h_can , CAN_FilterTypeDef *filterConfig , uint64_t Ex_Adress , uint8_t filterNum)
{
filterConfig->FilterBank = filterNum;
filterConfig->FilterMode = CAN_FILTERMODE_IDMASK; //CAN_FILTERMODE_IDLIST , CAN_FILTERMODE_IDMASK
filterConfig->FilterScale = CAN_FILTERSCALE_32BIT;
//Working
filterConfig->FilterIdHigh = (( Ex_Adress&0xFFFF0000 ) >>13) & 0xFFFF;
filterConfig->FilterIdLow = (((Ex_Adress&0xFFFF)<<16) >>13) & 0xFFFF;
filterConfig->FilterMaskIdHigh = 0x1fff0000>>13;
filterConfig->FilterMaskIdLow = 0xfff8;
filterConfig->FilterFIFOAssignment = CAN_RX_FIFO0;
filterConfig->FilterActivation = ENABLE;
filterConfig->SlaveStartFilterBank = filterNum;
if(HAL_CAN_ConfigFilter(h_can, filterConfig) != HAL_OK){}
}
Thank you for answer.