Solved
How to set FDCAN Masking Filter with stm32H503?
I am using STM32H503.
I want to receive only incoming ids as 0x222 using masking .
If set like the code below, IDs other than 0x222 are also entered into the rx callback function. Is there something wrong with the masking process?
FDCAN_FilterTypeDef sFilterConfig;
sFilterConfig.IdType = FDCAN_STANDARD_ID;
sFilterConfig.FilterIndex = 0;
sFilterConfig.FilterType = FDCAN_FILTER_MASK;
sFilterConfig.FilterConfig = FDCAN_FILTER_TO_RXFIFO0;
sFilterConfig.FilterID1 = 0x222;
sFilterConfig.FilterID2 = 0x7FF;
if(HAL_FDCAN_ConfigFilter(&hfdcan1, &sFilterConfig) != HAL_OK)
{
Error_Handler();
}