2022-01-20 02:31 AM
H723ZGT6 Nucleo-144
CubeMX 6.3.0
[ data sheet ]
H723: DS13313 Rev2
[NOR Flash]
S25FL256L
[Reference manual]
H723: RM0488 Rev2
S25FL256L: 002-00124 Rev. * H
I'm currently doing a CANFD loopback test.
I want to use a filter so that I can communicate with only 10 types of IDs.
However, I feel that the following four types cannot be achieved.
[stm32h7xx_hal_fdcan.h(1021)]
sFilterConfig.FilterType =
The IDs I wanted to allow in the filter were not consecutive numbers.
for example [0x111, 0x122, 0x069, 0x013, 0x0A0, 0x090, 0x055, 0x0AA, 0x101, 0x003]
So I thought about using multiple FILTER_DUAL, but neither was successful.
/* Configure Rx filter 1 */
sFilterConfig.IdType = FDCAN_STANDARD_ID;
sFilterConfig.FilterIndex = 0;
sFilterConfig.FilterType = FDCAN_FILTER_DUAL;
sFilterConfig.FilterConfig = FDCAN_FILTER_TO_RXFIFO0;
sFilterConfig.FilterID1 = 0x111;
sFilterConfig.FilterID2 = 0x7FF;
HAL_FDCAN_ConfigFilter(&hfdcan, &sFilterConfig);
/* Configure Rx filter 2 */
sFilterConfig.IdType = FDCAN_STANDARD_ID;
sFilterConfig.FilterIndex = 1;
sFilterConfig.FilterType = FDCAN_FILTER_DUAL;
sFilterConfig.FilterConfig = FDCAN_FILTER_TO_RXFIFO0;
sFilterConfig.FilterID1 = 0x122;
sFilterConfig.FilterID2 = 0x7FF;
HAL_FDCAN_ConfigFilter(&hfdcan, &sFilterConfig);
Solved! Go to Solution.
2022-01-20 09:28 PM
solved.
It seems that the number of standard filters was not set correctly at the time of initialization.
hfdcan.Init.StdFiltersNbr = 0; // before
hfdcan.Init.StdFiltersNbr = 10; // afterShould have calmed down
2022-01-20 09:28 PM
solved.
It seems that the number of standard filters was not set correctly at the time of initialization.
hfdcan.Init.StdFiltersNbr = 0; // before
hfdcan.Init.StdFiltersNbr = 10; // afterShould have calmed down