cancel
Showing results for 
Search instead for 
Did you mean: 

FDCAN2 4 times slower than FDCAN1 on STM32G491

char_array
Associate III

I was finally able to find the correct settings to configure my CAN peripherals with correct bitrate after tweaking for a while in STM32CubeMX. The settings that work do not make sense. FDCAN2 is 4 times slower so I had to make clock divider for FDCAN1 4 times higher.

Here are my settings:

  • Board: Nucleo-G491RE
  • HSE 24MHz, PLLM=6, PLLN=32 -> All clocks set to 64MHz
  • FDCAN1 clkdiv: 4
  • FDCAN2 clkdiv: 1
  • FDCANx prescaler: 8
  • FDCANx SJW: 1
  • FDCANx seg1: 4
  • FDCANx seg2: 3

The generated code is identical for both peripherals with exception of the clock divider.

I checked the manual, datasheet, errata and FDCAN application note and I didn't find anything about different clocks for FDCAN1 and FDCAN2. Maybe I overlooked something? STM32CubeMX didn't help with the clock calculation, but for another processor I found an example where does STMCubeMX helps with the calculation: https://www.youtube.com/watch?v=JfWlIY0zAIc

Why do FDCAN1 and FDCAN2 have different bitrates for the same settings and vice versa?

0 REPLIES 0