drivers: can: common: include sync segment in timing calculation
Always include the SYNC segment of 1 time quanta when calculating ts1 and ts2. Fixes: #55919 Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
577d4b004f
commit
7073da0257
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ static int update_sampling_pnt(uint32_t ts, uint32_t sp, struct can_timing *res,
|
||||||
}
|
}
|
||||||
} else if (ts1 < ts1_min) {
|
} else if (ts1 < ts1_min) {
|
||||||
ts1 = ts1_min;
|
ts1 = ts1_min;
|
||||||
ts2 = ts - ts1;
|
ts2 = ts - CAN_SYNC_SEG - ts1;
|
||||||
if (ts2 < min->phase_seg2) {
|
if (ts2 < min->phase_seg2) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue