CAN2 on STM32F1 is slave and its filter banks are configured thru CAN1 FMR
This commit is contained in:
parent
867b57a1d2
commit
9585e59df1
|
@ -192,9 +192,12 @@ void can_filter_init(u32 canport, u32 nr, bool scale_32bit, bool id_list_mode,
|
|||
{
|
||||
u32 filter_select_bit = 0x00000001 << nr;
|
||||
|
||||
/* Request initialization "enter". */
|
||||
/* Request initialization "enter". */
|
||||
CAN_FMR(canport) |= CAN_FMR_FINIT;
|
||||
|
||||
CAN_FMR(canport) &= (~0x3fUL)<<8;
|
||||
CAN_FMR(canport) |= (14UL)<<8;
|
||||
|
||||
/* Deactivate the filter. */
|
||||
CAN_FA1R(canport) &= ~filter_select_bit;
|
||||
|
||||
|
|
Loading…
Reference in New Issue