drivers: can: stm32_bxcan: fix filter config
Setting the filter registers in master CAN requires initializing master
CAN first. CONFIG_CAN_MAX_EXT_ID_FILTER banks are reserved for IDE
frames. Previously we set FS1R(CAN filter scale register) at init time,
but it is possible that the master CAN is not initialized at that time.
That is when the filter banks are not set correctly, causing that we get
wrong filter_id from slave CAN. This patch fixes the issue by setting
FS1R at the time of initializing master CAN.
Tested on:
STM32F407IGH6 with 2 std_id and 2 ext_id on each of CAN1 and CAN2.
Signed-off-by: Wenxi Xu <xuwenxi0517@gmail.com>
1 file changed