Commit 0c4abcd
drivers: can: mcux: flexcan: support Enhanced CAN Bit Timing registers
Some FlexCAN devices have enhanced bit timing registers (EPRS ENCBT EDCBT)
with extended timing configuration ranges and different behavior compared
to standard bit timing registers.
This change adds proper support for these enhanced registers, utilize full
bit timing capabilities.
Key differences for enhanced bit timing registers:
- Extended timing ranges with larger maximum values for sjw, phase_seg1,
phase_seg2, and prescaler fields
- No propagation segment configuration support, so prop_seg must be 0
- prop_seg value is used directly without the typical 'minus 1' adjustment
The implementation adds conditional compilation based on the
`FSL_FEATURE_FLEXCAN_HAS_ENHANCED_BIT_TIMING_REG` feature flag.
For Enhanced registers, use extended timing limits and prop_seg directly.
Test this commit on mimxrt1180_evk/mimxrt1189/cm33 drivers.can.timing
test case, and enable `TEST_ALL_BITRATES` Kconfig symbol.
Signed-off-by: William Tang <william.tang@nxp.com>1 parent c55d2ea commit 0c4abcd
1 file changed
+46
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
312 | 317 | | |
| 318 | + | |
313 | 319 | | |
314 | 320 | | |
315 | 321 | | |
| |||
1256 | 1262 | | |
1257 | 1263 | | |
1258 | 1264 | | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
1259 | 1270 | | |
| 1271 | + | |
1260 | 1272 | | |
1261 | 1273 | | |
1262 | 1274 | | |
| |||
1358 | 1370 | | |
1359 | 1371 | | |
1360 | 1372 | | |
| 1373 | + | |
| 1374 | + | |
1361 | 1375 | | |
1362 | 1376 | | |
1363 | 1377 | | |
1364 | 1378 | | |
1365 | 1379 | | |
1366 | 1380 | | |
1367 | 1381 | | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
1368 | 1413 | | |
1369 | 1414 | | |
1370 | 1415 | | |
| |||
1393 | 1438 | | |
1394 | 1439 | | |
1395 | 1440 | | |
| 1441 | + | |
1396 | 1442 | | |
1397 | 1443 | | |
1398 | 1444 | | |
| |||
0 commit comments