cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 FDCAN filter config HAL / CubeMX bug (?)

LCE
Principal

Hello,

I've started using the FDCANs on a STM32H735G-DK, trying to communicate FDCAN1 with FDCAN2, as a start using HAL and Cube MX and the repository examples.

All com with extended IDs was working, standard IDs when FDCAN1 as transmitter worked, but the other way did not work.

So I checked the filter settings and found that all of FDCAN1's filters with sFilterConfig.IdType = FDCAN_STANDARD_ID;

and

sFilterConfig.FilterConfig = FDCAN_FILTER_TO_RXBUFFER;

had some crappy numbers, so FilterID1 was not what it was set to.

Strangely, this only happened to FDCAN1.

I checked the registers for some memory overlap, all okay, then I reset the sFilterConfig at the start of the init function, and all of a sudden filter IDs were okay.

void MX_FDCAN1_Init(void)

{

FDCAN_FilterTypeDef sFilterConfig = { 0 };

...

I still don't get why that happened only to FDCAN1.

0 REPLIES 0