Skip to content

Commit cbc0ee6

Browse files
authored
Fix Extended Message Filter count in STM CAN API
As per STM32H7-series reference manuals: "Up to 64 filter elements can be configured for 29-bit extended IDs." This commit fixes a bug which prevented receiving CAN-messages with extended IDs.
1 parent 4dd08c4 commit cbc0ee6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_STM/can_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static void _can_init_freq_direct(can_t *obj, const can_pinmap_t *pinmap, int hz
171171
* for STM32H7 platforms
172172
*/
173173
obj->CanHandle.Init.StdFiltersNbr = 128; // to be aligned with the handle parameter in can_filter
174-
obj->CanHandle.Init.ExtFiltersNbr = 128; // to be aligned with the handle parameter in can_filter
174+
obj->CanHandle.Init.ExtFiltersNbr = 64; // to be aligned with the handle parameter in can_filter
175175
#else
176176
/* The number of Standard and Extended ID filters are initialized to the maximum possile extent
177177
* for STM32G0x1, STM32G4 and STM32L5 platforms

0 commit comments

Comments
 (0)