RPI, CANopen and CAN hat

janber
2022-03-16
2024-10-23
  • janber - 2022-03-16

    Hi All,
    I'm using this CAN hat (see link below pls.) with RPI, and I have strange issues - starting with overruns (solved via lowering the CAN speed) and ending with codesys instability, the communication freeze in some time (usually hours, sometimes minutes). Checked via candump, the line is without any communication after this error, rpi is not sending anything.

    Kernel:
    Linux raspberrypi4 5.15.26-rt34-v7l+ #3 SMP PREEMPT_RT Tue Mar 15 20:20:25 CET 2022 armv7l GNU/Linux

    This is the hat:
    https://www.waveshare.com/wiki/RS485_CAN_HAT

    the codesyscontrol log looks like xml in the attachment, cut from /tmp/codesyscontrol.log looks like:

    2022-03-16T06:46:15Z, 0x00000018, 1, 0, 5, Network interface <interface>ether 1</interface> unregistered
    2022-03-16T06:46:15Z, 0x00000007, 1, 0, 6, Network interface: <ipaddress>192.168.88.223</ipaddress>, subnetmask <subnetmask>255.255.255.0</subnetmask>
    2022-03-16T06:46:15Z, 0x00000018, 1, 0, 4, Network interface <interface>ether 1</interface> at router <instance>2</instance> registered
    2022-03-16T06:46:15Z, 0x00000018, 1, 0, 1, Setting router <instance>2</instance> address to <address>(00df)</address>
    2022-03-16T06:46:46Z, 0x00000001, 1, 0, 0, runtime licensed
    2022-03-16T06:49:16Z, 0x00001021, 1, 16, 8, <p0>0</p0><p1>0</p1><p2>129</p2>
    2022-03-16T06:49:16Z, 0x00001021, 1, 16, 20, <p0>0</p0>
    2022-03-16T06:49:17Z, 0x00000002, 1, 0, 2, Application [<app>Application</app>] loaded via [Download]
    2022-03-16T06:49:17Z, 0x00001021, 1, 18, 8, <p0>0</p0><p1>1</p1><p2>129</p2>
    2022-03-16T06:49:17Z, 0x00001021, 1, 18, 9, <p0>0</p0><p1>1</p1>
    2022-03-16T06:49:17Z, 0x00001021, 1, 16, 22, <p0>0</p0>
    2022-03-16T06:49:17Z, 0x00001021, 1, 18, 15, <p0>0</p0><p1>1</p1><p2>0</p2>
    2022-03-16T06:49:17Z, 0x00001021, 1, 18, 10, <p0>0</p0><p1>1</p1>
    2022-03-16T06:49:17Z, 0x00001021, 1, 18, 11, <p0>0</p0><p1>1</p1><p2>60</p2>
    2022-03-16T06:49:18Z, 0x00001021, 4, 18, 36, **** ERROR: <p0>0</p0><p1>1</p1><p2>5634</p2><p3>1</p3><p4>84148224</p4><p5>4</p5><p6>10082020</p6>
    2022-03-16T06:49:18Z, 0x00001021, 1, 18, 12, <p0>0</p0><p1>1</p1>
    2022-03-16T06:49:18Z, 0x00001021, 1, 18, 8, <p0>0</p0><p1>1</p1><p2>1</p2>
    2022-03-16T06:49:18Z, 0x00001021, 2, 18, 6, !!!! Warning: <p0>0</p0><p1>1</p1>
    2022-03-16T06:49:18Z, 0x00001021, 1, 16, 21, <p0>0</p0>
    2022-03-16T06:49:19Z, 0x00001021, 4, 18, 34, **** ERROR: <p0>0</p0><p1>1</p1><p2>30811100242F0000</p2>
    2022-03-16T06:50:22Z, 0x00001021, 1, 16, 8, <p0>0</p0><p1>0</p1><p2>129</p2>
    2022-03-16T06:50:22Z, 0x00001021, 1, 16, 20, <p0>0</p0>
    2022-03-16T06:50:23Z, 0x00000002, 1, 0, 2, Application [<app>Application</app>] loaded via [Download]
    2022-03-16T06:50:23Z, 0x00001021, 1, 18, 8, <p0>0</p0><p1>1</p1><p2>129</p2>
    2022-03-16T06:50:23Z, 0x00001021, 1, 18, 9, <p0>0</p0><p1>1</p1>
    2022-03-16T06:50:23Z, 0x00001021, 1, 16, 22, <p0>0</p0>
    2022-03-16T06:50:23Z, 0x00001021, 1, 18, 15, <p0>0</p0><p1>1</p1><p2>0</p2>
    2022-03-16T06:50:23Z, 0x00001021, 1, 18, 10, <p0>0</p0><p1>1</p1>
    2022-03-16T06:50:23Z, 0x00001021, 1, 18, 11, <p0>0</p0><p1>1</p1><p2>60</p2>
    2022-03-16T06:50:24Z, 0x00001021, 4, 18, 36, **** ERROR: <p0>0</p0><p1>1</p1><p2>5633</p2><p3>2</p3><p4>84148224</p4><p5>4</p5><p6>10052020</p6>
    2022-03-16T06:50:24Z, 0x00001021, 1, 18, 12, <p0>0</p0><p1>1</p1>
    2022-03-16T06:50:24Z, 0x00001021, 1, 18, 8, <p0>0</p0><p1>1</p1><p2>1</p2>
    2022-03-16T06:50:25Z, 0x00001021, 1, 18, 15, <p0>0</p0><p1>1</p1><p2>5</p2>
    2022-03-16T06:50:25Z, 0x00001021, 1, 16, 21, <p0>0</p0>
    2022-03-16T06:50:53Z, 0x00001021, 4, 18, 34, **** ERROR: <p0>0</p0><p1>1</p1><p2>30811100242F0000</p2>
    2022-03-16T06:51:13Z, 0x00001021, 1, 16, 8, <p0>0</p0><p1>0</p1><p2>129</p2>
    2022-03-16T06:51:13Z, 0x00001021, 1, 16, 20, <p0>0</p0>
    2022-03-16T06:51:13Z, 0x00000002, 1, 0, 2, Application [<app>Application</app>] loaded via [Download]
    2022-03-16T06:51:13Z, 0x00001021, 1, 18, 8, <p0>0</p0><p1>1</p1><p2>129</p2>
    2022-03-16T06:51:13Z, 0x00001021, 1, 18, 9, <p0>0</p0><p1>1</p1>
    2022-03-16T06:51:13Z, 0x00001021, 1, 16, 22, <p0>0</p0>
    2022-03-16T06:51:13Z, 0x00001021, 1, 18, 15, <p0>0</p0><p1>1</p1><p2>0</p2>
    2022-03-16T06:51:13Z, 0x00001021, 1, 18, 10, <p0>0</p0><p1>1</p1>
    2022-03-16T06:51:13Z, 0x00001021, 1, 18, 11, <p0>0</p0><p1>1</p1><p2>60</p2>
    2022-03-16T06:51:14Z, 0x00001021, 1, 18, 12, <p0>0</p0><p1>1</p1>
    2022-03-16T06:51:14Z, 0x00001021, 1, 18, 8, <p0>0</p0><p1>1</p1><p2>1</p2>
    2022-03-16T06:51:14Z, 0x00001021, 1, 18, 15, <p0>0</p0><p1>1</p1><p2>5</p2>
    2022-03-16T06:51:14Z, 0x00001021, 1, 16, 21, <p0>0</p0>
    2022-03-16T06:51:15Z, 0x00001021, 4, 18, 34, **** ERROR: <p0>0</p0><p1>1</p1><p2>30811100242F0000</p2>
    2022-03-16T06:53:42Z, 0x0000101f, 4, 15, 7, **** ERROR: <p0>0</p0><p1>3</p1>
    2022-03-16T06:53:42Z, 0x00001021, 1, 18, 8, <p0>0</p0><p1>1</p1><p2>129</p2>
    2022-03-16T06:53:42Z, 0x00001021, 1, 18, 9, <p0>0</p0><p1>1</p1>
    2022-03-16T06:53:44Z, 0x00001021, 1, 18, 16, <p0>0</p0><p1>1</p1>
    2022-03-16T06:53:44Z, 0x00001021, 1, 18, 10, <p0>0</p0><p1>1</p1>
    2022-03-16T06:53:44Z, 0x00001021, 2, 16, 2, !!!! Warning: <p0>0</p0>
    2022-03-16T06:53:45Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:45Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:46Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:46Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:47Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:47Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:48Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:48Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:49Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:49Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:50Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:50Z, 0x00001021, 4, 18, 34, **** ERROR: <p0>0</p0><p1>1</p1><p2>30811100242F0000</p2>
    2022-03-16T06:53:50Z, 0x0000101f, 1, 15, 12, <p0>0</p0>
    2022-03-16T06:53:50Z, 0x00001021, 1, 16, 3, <p0>0</p0>
    2022-03-16T06:53:50Z, 0x0000101f, 4, 15, 7, **** ERROR: <p0>0</p0><p1>3</p1>
    2022-03-16T06:53:51Z, 0x00001021, 2, 16, 2, !!!! Warning: <p0>0</p0>
    2022-03-16T06:53:51Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:52Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:53Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:53Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:54Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:54Z, 0x00001021, 1, 16, 3, <p0>0</p0>
    2022-03-16T06:53:54Z, 0x00001021, 1, 18, 15, <p0>0</p0><p1>1</p1><p2>0</p2>
    2022-03-16T06:53:54Z, 0x0000101f, 1, 15, 12, <p0>0</p0>
    2022-03-16T06:53:54Z, 0x00001021, 4, 18, 34, **** ERROR: <p0>0</p0><p1>1</p1><p2>0031050000000000</p2>
    2022-03-16T06:53:54Z, 0x00001021, 1, 18, 35, <p0>0</p0><p1>1</p1>
    2022-03-16T06:53:55Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:55Z, 0x00001021, 2, 16, 2, !!!! Warning: <p0>0</p0>
    2022-03-16T06:53:56Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:57Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:58Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:58Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:59Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:53:59Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:00Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:00Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:01Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:01Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:02Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:02Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:03Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:03Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:04Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:04Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:05Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:05Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:06Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:06Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:07Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:07Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:08Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:08Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:09Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:09Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:10Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:10Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:11Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:11Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:12Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:12Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:13Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:13Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:14Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:14Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    2022-03-16T06:54:15Z, 0x00001021, 4, 18, 14, **** ERROR: <p0>0</p0><p1>1</p1><p2>4096</p2><p3>0</p3><p4>84148224</p4><p5>4</p5>
    

    Any ideas?
    Thanks,
    Jan.

     
  • DavidBo - 2023-06-01

    Do you also use the I2C_master at the same time?

     
  • janber - 2023-06-02

    Hello,
    this topic is quite old, no help needed anymore. If this was meant as help.

    Have a nice day,
    Jan.

     

Log in to post a comment.