cancel
Showing results for 
Search instead for 
Did you mean: 

CAN filter in CubeMx 6.9.1

Kamil Duljas
Senior III

Hi, I don't see can filters in CubeMx. Someone point me where set it?

Dudo
1 ACCEPTED SOLUTION

Accepted Solutions
Ghofrane GSOURI
ST Employee

Hello @Kamil Duljas 

First let me thank you for posting.

I assume this is the exact same request CubeMX feature request: Is it possible to add HAL_... - STMicroelectronics Community  already raised to the development team and tracked by the Tickets 148949 and 149021 and that will be added to CubeMX  as soon as possible.

Thx

Ghofrane

View solution in original post

5 REPLIES 5
Foued_KH
ST Employee

Hello @Kamil Duljas , 
which filters do you want to use ?
Could you please share more information ?

Foued

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Kamil Duljas
Senior III

I just communicate 2 stm32F7 boards through CAN and I see in examples need to configure 

CAN_FilterTypeDef CAN_FilterInitStructure

but I don't see any settings in CubeMX

Dudo

Hello @Kamil Duljas , 

You need too add can filters into the code, for example : 

  /*##-2- Configure the CAN Filter ###########################################*/
  sFilterConfig.FilterBank = 0;
  sFilterConfig.FilterMode = CAN_FILTERMODE_IDMASK;
  sFilterConfig.FilterScale = CAN_FILTERSCALE_32BIT;
  sFilterConfig.FilterIdHigh = 0x0000;
  sFilterConfig.FilterIdLow = 0x0000;
  sFilterConfig.FilterMaskIdHigh = 0x0000;
  sFilterConfig.FilterMaskIdLow = 0x0000;
  sFilterConfig.FilterFIFOAssignment = CAN_RX_FIFO0;
  sFilterConfig.FilterActivation = ENABLE;
  sFilterConfig.SlaveStartFilterBank = 14;

I suggest you check the available example in the stm32f7 cubefw : STM32Cube_FW_F7_V1.17.0\Projects\STM32756G_EVAL\Examples\CAN

Foued

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Kamil Duljas
Senior III

Ok, but why i can't set this settings via CubeMx?

Dudo
Ghofrane GSOURI
ST Employee

Hello @Kamil Duljas 

First let me thank you for posting.

I assume this is the exact same request CubeMX feature request: Is it possible to add HAL_... - STMicroelectronics Community  already raised to the development team and tracked by the Tickets 148949 and 149021 and that will be added to CubeMX  as soon as possible.

Thx

Ghofrane