This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] DRA821U:我们发现了 CAN 接口进入总线关闭状态的问题、从而阻止了任何 CAN 数据发送或接收。

Guru**** 2534400 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1566382/dra821u-we-re-seeing-an-issue-where-the-can-interface-enters-a-bus-off-state-preventing-any-can-data-transmission-or-reception

器件型号:DRA821U


工具/软件:

你(们)好

我们看到 CAN 接口进入总线关闭状态时出现的问题、导致无法发送或接收任何 CAN 数据。

症状:上电后立即~100 总线关闭/分钟;以无确认为主导;TX 下降增加。

影响:通信停止;自动重启会暂时反复恢复。

SDK:9.1

测试板:定制板(非 EVM)

初始化 CAN 接口(比特率:500kbps)

ip link set dev can1 txqueuelen 1000
ip link set dev can1 type can bitrate 500000 sample-point 0.80 restart-ms 300
ip link set dev can1 up

Tx 压降和总线关闭

root@tgu:~# ip -d -s link show can1
23: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/can  promiscuity 0 minmtu 0 maxmtu 0
    can state ERROR-PASSIVE (berr-counter tx 0 rx 127) restart-ms 300
          bitrate 500000 sample-point 0.800
          tq 12 prop-seg 63 phase-seg1 64 phase-seg2 32 sjw 1 brp 1
          m_can: tseg1 2..256 tseg2 2..128 sjw 1..128 brp 1..512 brp_inc 1
          m_can: dtseg1 1..32 dtseg2 1..16 dsjw 1..16 dbrp 1..32 dbrp_inc 1
          clock 80000000
          re-started bus-errors arbit-lost error-warn error-pass bus-off
          7          0          0          15         15         7         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 parentbus platform parentdev 2701000.can
    RX:  bytes packets errors dropped  missed   mcast
             0       0      0       0       0       0
    TX:  bytes packets errors dropped carrier collsns
            50       8      0       7       0       0
root@tgu:~#

调试点

1、CAN 控制器:回送测试

root@tgu:~# ip link set dev can1 down
root@tgu:~# ip link set dev can1 type can bitrate 500000 sample-point 0.800 restart-ms 300 loopback on
root@tgu:~# ip link set dev can1 up
root@tgu:~# candump can1 &
[1] 17039
root@tgu:~# cansend can1 123#12345678
  can1  123   [4]  12 34 56 78
  can1  123   [4]  12 34 56 78
root@tgu:~#
root@tgu:~# ip -d -s link show can1
23: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/can  promiscuity 0 minmtu 0 maxmtu 0
    can <LOOPBACK> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 300
          bitrate 500000 sample-point 0.800
          tq 12 prop-seg 63 phase-seg1 64 phase-seg2 32 sjw 1 brp 1
          m_can: tseg1 2..256 tseg2 2..128 sjw 1..128 brp 1..512 brp_inc 1
          m_can: dtseg1 1..32 dtseg2 1..16 dsjw 1..16 dbrp 1..32 dbrp_inc 1
          clock 80000000
          re-started bus-errors arbit-lost error-warn error-pass bus-off
          7          0          0          15         15         7         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 parentbus platform parentdev 2701000.can
    RX:  bytes packets errors dropped  missed   mcast
             4       1      0       0       0       0
    TX:  bytes packets errors dropped carrier collsns
            58      10      0       7       0       0
root@tgu:~#

2. CAN 控制器<-> CAN 收发器(通过逻辑分析仪)

-正常状态: “时钟“和“数据“正确同步。

-总线关闭状态: “时钟“和“数据“之间的同步不正确。

3、CAN 收发器<-> CAN 总线

在 CAN 收发器中检查 TX 数据时、ACK 部分压碎。

由于无 ACK 处理而使 TEC 增加->发生总线关闭。

如果知道根本原因、请告知我并分享用于识别问题的诊断步骤(关键调试点)。

谢谢你。


此致、
金度贤