cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F412 - CAN bus disable filter configuration.

kd_1zac
Associate

I got the CAN bus on the STM32F412 with STM32Cube_FW_F4_V1.25.2 - up and running but I have noticed that the Initialization configuration requires the filter to be enabled and configured properly. If the filter is not configured and enabled, the CAN module does start but it does not send and receive messages.

Is there a way to disable the filter and use the CAN bus.

	CAN_FilterTypeDef sFilterConfigCAN1;
 
	sFilterConfigCAN1.FilterBank = 0;
	sFilterConfigCAN1.FilterMode = CAN_FILTERMODE_IDMASK;
	sFilterConfigCAN1.FilterScale = CAN_FILTERSCALE_32BIT;
	sFilterConfigCAN1.FilterIdHigh = 0x0000;
	sFilterConfigCAN1.FilterIdLow = 0x0000;
	sFilterConfigCAN1.FilterMaskIdHigh = 0x0000;
	sFilterConfigCAN1.FilterMaskIdLow = 0x0000;
	sFilterConfigCAN1.FilterFIFOAssignment = CAN_RX_FIFO0;
	sFilterConfigCAN1.FilterActivation = DISABLE;
	sFilterConfigCAN1.SlaveStartFilterBank = 14;

I have tried setting line 11 to DISABLE but that does not seem to work.

Please let me know if any of guys have faced the same issue

Thanks,

KD

0 REPLIES 0