From 890dcc4735c50e8314a55674b6d66de2829591cd Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Tue, 23 Mar 2021 00:19:56 +0100 Subject: [PATCH] Added comment to clarify that the mcp251x uses half of the external OSC clock as the base clock --- can-calc-bit-timing.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/can-calc-bit-timing.c b/can-calc-bit-timing.c index 5885543..4a79c3c 100644 --- a/can-calc-bit-timing.c +++ b/can-calc-bit-timing.c @@ -362,8 +362,9 @@ static struct calc_bittiming_const can_calc_consts[] = { .brp_inc = 1, }, .ref_clk = { - { .clk = 8000000, }, - { .clk = 10000000, }, + /* The mcp251x uses half of the external OSC clock as the base clock */ + { .clk = 16000000 / 2, }, + { .clk = 20000000 / 2, }, }, .printf_btr = printf_btr_mcp251x, }, {