Skip to content

Commit b881f06

Browse files
committed
fix for arduino#297
1 parent 0bbe533 commit b881f06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/Arduino_CAN/src/CanUtil.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ std::tuple<bool, uint32_t, uint32_t, uint32_t>
5353
/* If the fractional part is sufficiently close to zero, we have
5454
* found a valid prescaler configuration.
5555
*/
56-
if (brp_fract < 0.01)
56+
if (brp_fract < 0.01 || brp_fract > 0.99)
5757
{
5858
uint32_t const baud_rate_prescaler = static_cast<uint32_t>(brp_ipart);
5959
/* Assign TSEG1 and TSEG2 to set the sample point at 75%. */

0 commit comments

Comments
 (0)