![ip link set can0 type 可以提供帮助 用法: ip link set DEVICE type can [ 比特率 BITRATE [ 采样点 SAMPLE-POINT] ] | [ tq TQ prop-seg PROP_SEG 相位段 1 相位段 1 相位段 2 相位段 2 [ sjw SJW ] ] [ dbitrate BITRATE [ dsample-point SAMPLE-POINT] ] | [ dtq TQ dprop-seg PROP_SEG dphase-seg1 PHASE-SEG1 dphase-seg2 PHASE-SEG2 [ dsjw SJW ] ] [ tdcv TDCV tdco TDCO tdcf TDCF ] [ 环回 { 上 | }关 } ] [ 只听 { 开 |关 } ] [ 三重采样 { 开 |关 } ] [ 一次性 { 开 | 关关闭 } ] [ berr 报告 { 开启 | 关闭关 } ] [ fd { 开 |关 } ] [ fd-non-iso { 开 | 关关 } ] [ 假定确认 { 开 |关 } ] [ cc-len8-dlc { 开 |关闭 } ] [ tdc 模式 { 自动 | 关闭手册| off } ] [ restart-ms TIME-MS ] [ restart ] [ 终止 { 0..65535 } ] 其中: BITRATE := { NUMBER in bps } SAMPLE-POINT := { 0.000..0.999 } TQ := { NUMBER in bps ns } PROP-SEG := { tq 中的数字 } PHASE-SEG1 := { tq 中的数字 } PHASE-SEG2 := { tq 中的数字 } SJW := { tq 中的数字 } TDCV := { tc 中的数字 } TDCO : = { tc 中的数字 } TDCF := { tc 中的数字 } 重新启动 MS := { 0 |数字(以毫秒为单位)}](https://linux22.com/image/225338/ip%20link%20set%20can0%20type%20%E5%8F%AF%E4%BB%A5%E6%8F%90%E4%BE%9B%E5%B8%AE%E5%8A%A9%20%E7%94%A8%E6%B3%95%EF%BC%9A%20ip%20link%20set%20DEVICE%20type%20can%20%5B%20%E6%AF%94%E7%89%B9%E7%8E%87%20BITRATE%20%5B%20%E9%87%87%E6%A0%B7%E7%82%B9%20SAMPLE-POINT%5D%20%5D%20%7C%20%5B%20tq%20TQ%20prop-seg%20PROP_SEG%20%E7%9B%B8%E4%BD%8D%E6%AE%B5%201%20%E7%9B%B8%E4%BD%8D%E6%AE%B5%201%20%E7%9B%B8%E4%BD%8D%E6%AE%B5%202%20%E7%9B%B8%E4%BD%8D%E6%AE%B5%202%20%5B%20sjw%20SJW%20%5D%20%5D%20%5B%20dbitrate%20BITRATE%20%5B%20dsample-point%20SAMPLE-POINT%5D%20%5D%20%7C%20%5B%20dtq%20TQ%20dprop-seg%20PROP_SEG%20dphase-seg1%20PHASE-SEG1%20dphase-seg2%20PHASE-SEG2%20%5B%20dsjw%20SJW%20%5D%20%5D%20%5B%20tdcv%20TDCV%20tdco%20TDCO%20tdcf%20TDCF%20%5D%20%5B%20%E7%8E%AF%E5%9B%9E%20%7B%20%E4%B8%8A%20%7C%20%7D%E5%85%B3%20%7D%20%5D%20%5B%20%E5%8F%AA%E5%90%AC%20%7B%20%E5%BC%80%20%7C%E5%85%B3%20%7D%20%5D%20%5B%20%E4%B8%89%E9%87%8D%E9%87%87%E6%A0%B7%20%7B%20%E5%BC%80%20%7C%E5%85%B3%20%7D%20%5D%20%5B%20%E4%B8%80%E6%AC%A1%E6%80%A7%20%7B%20%E5%BC%80%20%7C%20%E5%85%B3%E5%85%B3%E9%97%AD%20%7D%20%5D%20%5B%20berr%20%E6%8A%A5%E5%91%8A%20%7B%20%E5%BC%80%E5%90%AF%20%7C%20%E5%85%B3%E9%97%AD%E5%85%B3%20%7D%20%5D%20%5B%20fd%20%7B%20%E5%BC%80%20%7C%E5%85%B3%20%7D%20%5D%20%5B%20fd-non-iso%20%7B%20%E5%BC%80%20%7C%20%E5%85%B3%E5%85%B3%20%7D%20%5D%20%5B%20%E5%81%87%E5%AE%9A%E7%A1%AE%E8%AE%A4%20%7B%20%E5%BC%80%20%7C%E5%85%B3%20%7D%20%5D%20%5B%20cc-len8-dlc%20%7B%20%E5%BC%80%20%7C%E5%85%B3%E9%97%AD%20%7D%20%5D%20%5B%20tdc%20%E6%A8%A1%E5%BC%8F%20%7B%20%E8%87%AA%E5%8A%A8%20%7C%20%E5%85%B3%E9%97%AD%E6%89%8B%E5%86%8C%7C%20off%20%7D%20%5D%20%5B%20restart-ms%20TIME-MS%20%5D%20%5B%20restart%20%5D%20%5B%20%E7%BB%88%E6%AD%A2%20%7B%200..65535%20%7D%20%5D%20%E5%85%B6%E4%B8%AD%EF%BC%9A%20BITRATE%20%3A%3D%20%7B%20NUMBER%20in%20bps%20%7D%20SAMPLE-POINT%20%3A%3D%20%7B%200.000..0.999%20%7D%20TQ%20%3A%3D%20%7B%20NUMBER%20in%20bps%20ns%20%7D%20PROP-SEG%20%3A%3D%20%7B%20tq%20%E4%B8%AD%E7%9A%84%E6%95%B0%E5%AD%97%20%7D%20PHASE-SEG1%20%3A%3D%20%7B%20tq%20%E4%B8%AD%E7%9A%84%E6%95%B0%E5%AD%97%20%7D%20PHASE-SEG2%20%3A%3D%20%7B%20tq%20%E4%B8%AD%E7%9A%84%E6%95%B0%E5%AD%97%20%7D%20SJW%20%3A%3D%20%7B%20tq%20%E4%B8%AD%E7%9A%84%E6%95%B0%E5%AD%97%20%7D%20TDCV%20%3A%3D%20%7B%20tc%20%E4%B8%AD%E7%9A%84%E6%95%B0%E5%AD%97%20%7D%20TDCO%20%3A%20%3D%20%7B%20tc%20%E4%B8%AD%E7%9A%84%E6%95%B0%E5%AD%97%20%7D%20TDCF%20%3A%3D%20%7B%20tc%20%E4%B8%AD%E7%9A%84%E6%95%B0%E5%AD%97%20%7D%20%E9%87%8D%E6%96%B0%E5%90%AF%E5%8A%A8%20MS%20%3A%3D%20%7B%200%20%7C%E6%95%B0%E5%AD%97%EF%BC%88%E4%BB%A5%E6%AF%AB%E7%A7%92%E4%B8%BA%E5%8D%95%E4%BD%8D%EF%BC%89%7D.png)
我需要为 CANFD 总线设置采样点。以下帮助命令显示了如何为 can 设置样本点,但我的 can 配置未显示任何样本点参数
ip link set can0 type 可以提供帮助 用法: ip link set DEVICE type can [ 比特率 BITRATE [ 采样点 SAMPLE-POINT] ] | [ tq TQ prop-seg PROP_SEG 相位段 1 相位段 1 相位段 2 相位段 2 [ sjw SJW ] ] [ dbitrate BITRATE [ dsample-point SAMPLE-POINT] ] | [ dtq TQ dprop-seg PROP_SEG dphase-seg1 PHASE-SEG1 dphase-seg2 PHASE-SEG2 [ dsjw SJW ] ] [ tdcv TDCV tdco TDCO tdcf TDCF ] [ 环回 { 上 | }关 } ] [ 只听 { 开 |关 } ] [ 三重采样 { 开 |关 } ] [ 一次性 { 开 | 关关闭 } ] [ berr 报告 { 开启 | 关闭关 } ] [ fd { 开 |关 } ] [ fd-non-iso { 开 | 关关 } ] [ 假定确认 { 开 |关 } ] [ cc-len8-dlc { 开 |关闭 } ] [ tdc 模式 { 自动 | 关闭手册| off } ] [ restart-ms TIME-MS ] [ restart ] [ 终止 { 0..65535 } ] 其中: BITRATE := { NUMBER in bps } SAMPLE-POINT := { 0.000..0.999 } TQ := { NUMBER in bps ns } PROP-SEG := { tq 中的数字 } PHASE-SEG1 := { tq 中的数字 } PHASE-SEG2 := { tq 中的数字 } SJW := { tq 中的数字 } TDCV := { tc 中的数字 } TDCO : = { tc 中的数字 } TDCF := { tc 中的数字 } 重新启动 MS := { 0 |数字(以毫秒为单位)}
。我怀疑默认情况下该值设置为 0。与 can.txt 资源匹配。本文档提到在内核中启用了位定时操作的计算(CONFIG_CAN_CALC_BITTIMING)。但我在内核文件中的哪个位置启用此(CONFIG_CAN_CALC_BITTIMING)时遇到问题。我非常感谢对此的帮助。谢谢。