2023-02-14 08:38 AM
Hello,
I am attempting to add CAN communication to one of my co-worker's boards, who is using the STM32F303RE MCU with an external 30 MHz crystal oscillator. The CAN communication uses the APB1 Peripheral Clock, which is currently using 30 MHz as well.
When I attempt to make a specific baud rate (250 kBit/s), I used http://www.bittiming.can-wiki.info/ to get the parameters to achieve that. When I put the values in, it shows the baud rate in a greyed out section that says it's 249.999 kBit/s.
What I want to know is if that will cause issues when actually applied? Since it's not "exactly" 250 kBit/s. Has anyone else had this occur and can say whether it works or not?
Solved! Go to Solution.
2023-02-14 08:44 AM
I see that sometimes myself, thats a cubeMX float precission error (java?)
If the time for one bit is 4000ns you should be good
You could also try this (you get a rounded time quantum)
2023-02-14 08:44 AM
I see that sometimes myself, thats a cubeMX float precission error (java?)
If the time for one bit is 4000ns you should be good
You could also try this (you get a rounded time quantum)
2023-02-14 08:51 AM
Hello Javier,
Thank you for this reply! Yes, this option should work as well. I will be testing this in a lab environment with the Vector CANalyzer that we have, but having a configuration that does explicitly state 250 kBit/s is more reassuring for the development phase.
I'm surprised the website didn't give that configuration...
2023-02-14 08:56 AM
>>I'm surprised the website didn't give that configuration...
That means youre just getting started here.