From c128a8969082e8db21a54b46b7a16eb47caf1f66 Mon Sep 17 00:00:00 2001 From: Thomas Stranger Date: Wed, 30 Mar 2022 16:00:50 +0200 Subject: [PATCH] can: stm32fd: correct timing min/max for prop_seg and sjw This commit changes the timing_min_data prop_seg initialization of st,stm32-fdcan drier to zero. Additionally the nominal sync jump width limits are also adopted to new values 1 and 128. This was not tested until recently and therefore caused the can timing test to fail on stm32g4 after PR #44197 got merged. Signed-off-by: Thomas Stranger --- drivers/can/can_stm32fd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/can/can_stm32fd.c b/drivers/can/can_stm32fd.c index f4a2b9542b5..0047a6bdffd 100644 --- a/drivers/can/can_stm32fd.c +++ b/drivers/can/can_stm32fd.c @@ -191,14 +191,14 @@ static const struct can_driver_api can_api_funcs = { .get_max_filters = can_mcan_get_max_filters, .set_state_change_callback = can_stm32fd_set_state_change_callback, .timing_min = { - .sjw = 0x7f, + .sjw = 0x01, .prop_seg = 0x00, .phase_seg1 = 0x01, .phase_seg2 = 0x01, .prescaler = 0x01 }, .timing_max = { - .sjw = 0x7f, + .sjw = 0x80, .prop_seg = 0x00, .phase_seg1 = 0x100, .phase_seg2 = 0x80, @@ -207,7 +207,7 @@ static const struct can_driver_api can_api_funcs = { #ifdef CONFIG_CAN_FD_MODE .timing_min_data = { .sjw = 0x01, - .prop_seg = 0x01, + .prop_seg = 0x00, .phase_seg1 = 0x01, .phase_seg2 = 0x01, .prescaler = 0x01