Skip to main content
Senior III
August 10, 2023
Solved

CAN filter in CubeMx 6.9.1

  • August 10, 2023
  • 4 replies
  • 2328 views

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

This topic has been closed for replies.
Best answer by Ghofrane GSOURI

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

4 replies

Foued_KH
ST Employee
August 11, 2023

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.
Senior III
August 14, 2023

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

Foued_KH
ST Employee
August 14, 2023

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.
Senior III
August 14, 2023

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

Ghofrane GSOURI
Ghofrane GSOURIBest answer
Technical Moderator
August 17, 2023

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

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.