Skip to content

Commit 687f539

Browse files
str4t0mjgl-meta
authored andcommitted
drivers: can: stm32: correct timing_max parameters
The timing_max parameters defined in the stm32 bxcan driver don't match the register description in the reference manuals. - sjw does have only 2 bits representing 1 to 4 tq. - phase_seg1 and phase_seg2 max is one tq higher. I have checked the following reference manuals and all match: - RM0090: STM32F405, F415, F407, F417, F427, F437 AND F429 - RM0008: STM32F101, F102, F103, F105, F107 advanced arm-based mcus - RM0351, RM0394: all STM32L4 - RM0091: all STM32F0 with CAN support Signed-off-by: Thomas Stranger <[email protected]> (cherry picked from commit cec279b)
1 parent 7f4c587 commit 687f539

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/can/can_stm32.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,10 +1069,10 @@ static const struct can_driver_api can_api_funcs = {
10691069
.prescaler = 0x01
10701070
},
10711071
.timing_max = {
1072-
.sjw = 0x07,
1072+
.sjw = 0x04,
10731073
.prop_seg = 0x00,
1074-
.phase_seg1 = 0x0F,
1075-
.phase_seg2 = 0x07,
1074+
.phase_seg1 = 0x10,
1075+
.phase_seg2 = 0x08,
10761076
.prescaler = 0x400
10771077
}
10781078
};

0 commit comments

Comments
 (0)