From 44c8150ca652cfe0572a338c66d6fb546be75951 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Fri, 22 Sep 2023 13:24:29 +0200 Subject: [PATCH] drivers: can: mcux: flexcan: fix initial of CAN-FD timing when using TQs Fix the assignment of initial CAN bus timing parameters for the CAN-FD data phase. Fixes: #62979 Signed-off-by: Henrik Brix Andersen (cherry picked from commit c1ad82e5fbce7b8f24091d5e64a2f90d13bc1531) --- drivers/can/can_mcux_flexcan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/can/can_mcux_flexcan.c b/drivers/can/can_mcux_flexcan.c index 74966b1659beca..969e81fdc153eb 100644 --- a/drivers/can/can_mcux_flexcan.c +++ b/drivers/can/can_mcux_flexcan.c @@ -1222,9 +1222,9 @@ static int mcux_flexcan_init(const struct device *dev) data->timing_data.phase_seg2); LOG_DBG("Sample-point err : %d", err); } else { - data->timing_data.prop_seg = config->prop_seg; - data->timing_data.phase_seg1 = config->phase_seg1; - data->timing_data.phase_seg2 = config->phase_seg2; + data->timing_data.prop_seg = config->prop_seg_data; + data->timing_data.phase_seg1 = config->phase_seg1_data; + data->timing_data.phase_seg2 = config->phase_seg2_data; err = can_calc_prescaler(dev, &data->timing_data, config->bitrate_data); if (err) { LOG_WRN("Bitrate error: %d", err);