2020-12-15 01:00 PM
When trying to initialise any of the two CAN interfaces of my STM32F446RE in CubeMX, using the CubeIDE-integrated version, presumably a rounding error occurs.
These are my settings:
When setting this up, it always says that Nominal Bit Time is too short (999ns), although the baud rate is correctly set to exactly 1Mbaud.
When using CubeMX version 6.0.1 without CubeIDE, everything works fine.
2020-12-25 02:17 PM
The same problem with STM32F405RG. Previously configured 42MHz APB1
The same error while these settings works correct
This problem in STM32CubeIDE 1.5.0 and 1.5.1
2021-01-06 02:32 AM
Hi @RaJa
I confirm your CAN configuration is correct
Bouraoui
2021-01-06 02:55 AM
Hi @LSiew.1
Can you precise the bxCAN frequency provided via APB1?
Bouraoui
2021-01-07 08:39 AM
Hi @RaJa
Can you please provide us more details about the problem your are facing in STM32CubeIDE 1.5.0 and 1.5.1?
Bouraoui
2021-01-07 07:11 PM
I have a same problem.
I'm using STM32F446RE and set bxCAN to 1Mbps with settings:
With this setting, I have been using it for over a year without any problems.
But after migrate my cubemx project to 6.1.0(current version) parameter error occur.
2021-02-01 03:20 AM
same problem here. It is wrong rouding.
111.1111111111111111*(7+1+1) = 999.9999999999999999 which should be rounded to 1000 ns.
In my case APB1 clock frequency 42 MHz. Time qauntum
47.61904761904762*(16+4+1) = 1000.00000000000002
Mcu.Name=STM32F437I(G-I)Tx
CAN1.ABOM=ENABLE
CAN1.BS1=CAN_BS1_16TQ
CAN1.BS2=CAN_BS2_4TQ
CAN1.CalculateTimeQuantum=47.61904761904762
CAN1.IPParameters=CalculateTimeQuantum,Prescaler,BS2,BS1,ABOM,NART
CAN1.NART=ENABLE
CAN1.Prescaler=2
And I am getting the same error with 999 ns.
This happened after stm32cubeide update to 1.5.1 as well. Before no error.
2021-03-18 06:19 AM