CAN overrun

Hey,

I try to log the can bus traffic of a car with 2 can buses. The first one has a bitrate of 1000000 and the second one a bit rate of 500000, there for I use those commands to configure the canbuses:

ip link add can0 type can bitrate 1000000
ip link add can1 type can bitrate 500000

After a while of driving the statistics looks like this:

# ip -details -statistics link show can0
6: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
    link/can  promiscuity 0
    can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
          bitrate 1000000 sample-point 0.750
          tq 25 prop-seg 14 phase-seg1 15 phase-seg2 10 sjw 1
          mttcan: tseg1 2..255 tseg2 0..127 sjw 1..127 brp 1..511 brp-inc 1
          mttcan: dtseg1 1..31 dtseg2 0..15 dsjw 1..15 dbrp 1..15 dbrp-inc 1
          clock 40000000
          re-started bus-errors arbit-lost error-warn error-pass bus-off
          0          0          0          0          0          0
    RX: bytes  packets  errors  dropped overrun mcast
    158854904  19856863 12794   0       12794   0
    TX: bytes  packets  errors  dropped carrier collsns
    0          0        0       0       0       0
# ip -details -statistics link show can1
7: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
    link/can  promiscuity 0
    can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
          bitrate 500000 sample-point 0.875
          tq 25 prop-seg 34 phase-seg1 35 phase-seg2 10 sjw 1
          mttcan: tseg1 2..255 tseg2 0..127 sjw 1..127 brp 1..511 brp-inc 1
          mttcan: dtseg1 1..31 dtseg2 0..15 dsjw 1..15 dbrp 1..15 dbrp-inc 1
          clock 40000000
          re-started bus-errors arbit-lost error-warn error-pass bus-off
          0          0          0          0          0          0
    RX: bytes  packets  errors  dropped overrun mcast
    38127798   5253703  12115   0       12115   0
    TX: bytes  packets  errors  dropped carrier collsns
    0          0        0       0       0       0

I’m using the Demarkt SN65HVD230 CAN-Bus-Modul.

So there are some overruns. The CPU usage seems to be under 30% in htop. So What is exactly happening on a “overrun”? And why they appear?

EDIT: Some additional information:
dmesg says

mttcan_poll_ir: some msgs lost on in Q0

very often.

Is it possible that the jetson tx2 can’t log 1.5Mbit traffic per second from the can buses?

bump

Hi,

Can you try to keep bitrates equal for CAN0 and CAN1? Errors are showing up because of bitrate mismatch.
Let me know what are the results after it.

Thanks,
Shubhi

You know the baudrates are different? CAN0 is high speed (1Mbit) and CAN1 is low speed (0.5Mbit).
Woudln’t these settings mess up the transceiver configurations?

Atm. I’m not able to test it, but I will test this as soon as I’m able to do it.

Can you try to keep bitrates equal for CAN0 and CAN1? Errors are showing up because of bitrate mismatch.

Why would having 2 different bit rates cause problems? Are you suggesting you must have the same bitrate across both CAN interfaces just to keep the TX2 “happy”?.