CAN baud rate calculation
Would someone kindly explain to me how to determine the CAN controller's baudrate for the STM32f769 ?
Would someone kindly explain to me how to determine the CAN controller's baudrate for the STM32f769 ?
Hello @vamshi_kumar ,
This is how to calculate the CAN bitrate on devices featuring bxCAN such as STM32f769.

You can rely on CubeMx to help you to configure the bitrate:

In that case you need to play with different values to match the wanted bitrate.
Also the choice of BS1 (bit segment 1) and BS2 (bit segment 2) should be selected to have the sampling point position between ~75% and ~80%:
So BS1 = ~(75% to 80%) of (BS1+BS2)
The example I provided above with CubeMx (CAN @1Mb/s):
BS1 = 13, BS2 = 4: So the sampling point position in this case: (13 x 100) /(BS1+BS2) = ~76%.
It's also recommended to increase BS1 and BS2 as much as possible and decrease the CAN clock prescaler to match your CAN bitrate.
Hope it helps.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.