You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's another small code change to the CAN baud rate calculation to support the allowable error between the theoretical bit rate and the calculated bit rate to be an absolute value.
Current behaviour for a theoretical bus speed of 16,666.666' shows the following states:
CAN.begin(16666) succeeds - the absolute error is 0.003200128
CAN.begin(16667) fails - even though the absolute error is smaller at 0.001599968
Code change is required in CanUtil.cpp ...
/* If the fractional part is sufficiently close to zero, we have
* found a valid prescaler configuration.
*/
if (brp_fract < 0.01)
... it should be checking either side of the desired rate
/* If the fractional part is sufficiently close to zero, we have
* found a valid prescaler configuration.
*/
if (brp_fract < 0.01 || brp_fract > 0.99)
The text was updated successfully, but these errors were encountered:
fastbike
added a commit
to fastbike/ArduinoCore-renesas
that referenced
this issue
Apr 29, 2024
Following on from #295
Here's another small code change to the CAN baud rate calculation to support the allowable error between the theoretical bit rate and the calculated bit rate to be an absolute value.
Current behaviour for a theoretical bus speed of 16,666.666' shows the following states:
Code change is required in CanUtil.cpp ...
... it should be checking either side of the desired rate
The text was updated successfully, but these errors were encountered: