CAN2 on STM32F1 is slave and its filter banks are configured thru CAN1 FMR

This commit is contained in:
molnarkares 2013-03-03 20:02:43 +01:00 committed by Piotr Esden-Tempski
parent 867b57a1d2
commit 9585e59df1
1 changed files with 4 additions and 1 deletions

View File

@ -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;