cancel
Showing results for 
Search instead for 
Did you mean: 

What is relation between Bit-Rate and Nominal & Data parameters setting for FDCAN/CAN interface on STM32 H7xx Family?

JJ1
Associate II

I'm working on FDCAN & CAN interface provided on H745XI-DISCO board. I was new to these interface when I started, but now I can say I have good understanding on CAN & FDCAN Bus protocol. Using provided examples with STM32CubeIDE FW for H7 series, I was able to achieve communication over CAN & FDCAN interface; on board between two CAN/FDCAN interface and also across the board using two different DISCO boards.

But now coming to the question, I was able to understand all the init parameter required for FDCAN handle except following 8...

This is configuration I have used from FW example, and I'm able communicate over CAN/FDCAN interface, but I'd like to understand these settings thoroughly, how it impacts CAN/FDCAN Bus.

 hfdcan1.Init.NominalPrescaler = 0x1;

 hfdcan1.Init.NominalSyncJumpWidth = 0x8;

 hfdcan1.Init.NominalTimeSeg1 = 0x1F;

 hfdcan1.Init.NominalTimeSeg2 = 0x8;

 hfdcan1.Init.DataPrescaler = 0x1;

 hfdcan1.Init.DataSyncJumpWidth = 0x4;

 hfdcan1.Init.DataTimeSeg1 = 0x5;

 hfdcan1.Init.DataTimeSeg2 = 0x4;

While searching for explaination/understanding I got to know that these are required for bit-rate settings of your CAN/FDCAN bus. But it is still unclear to me how Bit-rate & these parameters are related? How bit-rate is changed using fine-tuning of these params.

Any help is appreciated. Thank you!

1 REPLY 1
TZARDI
Associate III

Hello,

I hope this can help:

NominalPrescaler; < Specifies the value by which the oscillator frequency is divided for generating the nominal bit time quanta.

NominalSyncJumpWidth; < Specifies the maximum number of time quanta the FDCAN hardware is allowed to lengthen or shorten a bit to perform resynchronization.

NominalTimeSeg1; < Specifies the number of time quanta in Bit Segment 1.

NominalTimeSeg2; <Specifies the number of time quanta in Bit Segment 2.

DataPrescaler; < Specifies the value by which the oscillator frequency is divided for generating the data bit time quanta.

DataSyncJumpWidth; < Specifies the maximum number of time quanta the FDCAN hardware is allowed to lengthen or shorten a data bit to perform resynchronization.

DataTimeSeg1; < Specifies the number of time quanta in Data Bit Segment 1.

DataTimeSeg2; < Specifies the number of time quanta in Data Bit Segment 2.

For more informations you can check the RM0399 and the stm32h7xx_hal_fdcan.h file that you can find in the FDCAN exemple in the STM32Cube_FW_H7.

Br,