-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: can: flexcan: Fix incorrect timing. Fix for #31014 #31015
drivers: can: flexcan: Fix incorrect timing. Fix for #31014 #31015
Conversation
ping @GrixaYrev |
The timing values need to be subtracted by one. Signed-off-by: Alexander Wachter <[email protected]>
fc90e3f
to
8546275
Compare
@henrikbrixandersen will you please have a look? |
When using a bitrate of 125000 set in DTS, I get the following warning: "[00:00:00.000,000] can_mcux_flexcan: Bitrate error: 200". What is a user expected to do? |
User should set correct values of |
Or just let the algorithm select the timing based on the sample point. The message is telling you that there is in bitrate error of 200 with the given timing. |
This is with the default timing for the twr_ke18 board in Zephyr. |
Maybe we could add a shell command that prints timing values. A user can then write them to the device tree to not calculate them online |
@henrikbrixandersen we should switch to using the algorithm in device tree. Some of the actual timing in the device tree are just wrong, because they are copied along different boards. They may fit, but sometimes the clock rate changes and then the timing gets wrong (that happened on as stm32 board already) |
The timing values need to be subtracted by one.
Fixes #31014