CAN initialisation error in Cube IDE using CubeMX 6.1.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-12-15 1: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:
- Prescaler: 5
- Time Quanta in Bit Segment 1: 6 Times
- Time Quanta in Bit Segment 2: 2 Time
- ReSynchronization Jump Width: 1 Time
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.
- Labels:
-
Bug-report
-
CAN
-
STM32CubeIDE
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-12-25 2:17 PM
The same problem with STM32F405RG. Previously configured 42MHz APB1
- Prescaler: 3
- Time Quanta in Bit Segment 1: 10 Times
- Time Quanta in Bit Segment 2: 3 Time
- ReSynchronization Jump Width: 1 Time
The same error while these settings works correct
This problem in STM32CubeIDE 1.5.0 and 1.5.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-01-06 2:32 AM
Hi @RaJa
I confirm your CAN configuration is correct
Bouraoui
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-01-06 2:55 AM
Hi @LSiew.1
Can you precise the bxCAN frequency provided via APB1?
Bouraoui
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-01-07 8: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-01-07 7:11 PM
I have a same problem.
I'm using STM32F446RE and set bxCAN to 1Mbps with settings:
- ABP1 Colck : 45MHz
- prescaler : 5
- Time Quanta in Bit Segment 1: 7 Times
- Time Quanta in Bit Segment 2: 1 Time
- ReSynchronization Jump Width: 1 Time
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-02-01 3: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-03-18 6:19 AM
