cancel
Showing results for 
Search instead for 
Did you mean: 

I need help for setting the STM32H743 FDCAN as Calssic CAN

otcagon
Associate II

Hello

I am trying to use STM32H743ZI (NUCLEO-H743ZI2) for classic CAN but I am totally confuse how to set the configuration. I am using 480HMz with 8MHZ(HSE) for CAN.

Please advice me how to set the FDCAN for classic CAN.

I attach the screenshot of CubeMX.

The PB12 and PB13 are configured for CAN.

Thanks

Joonseok YANG

1 REPLY 1
TOlli
Senior

Hi otcagon,

Here you are actually configuring your bus speed.

You have selected correctly to go forward with classic by selecting the Frame Format and Mode as Classic and Normal. This means that the peripheral is not going to do a bit-rate switch between the nominal section and data section.

You need to set the prescaler to a correct value so that you get a good clock value for the peripheral (and you are able to achieve the bit times you need, these are more important when using CAN FD at 8Mbps).

Have a look at this web site, it will give you good values for the nominal section and since you are not doing the bit rate switch, you can just copy the values for the data section as well:

http://www.bittiming.can-wiki.info/

There is bxCAN from ST on the list of devices, it is a good approximation for you.

Rest of the settings are related to your RAM space, which you have to figure out yourself keeping in mind how fast you can handle the buffers and what is your bus speed.

Best regards,