Chris Verges wrote: > Hi gurus, > > I'm using the at91_can driver on a custom board. The following sequence > seems to cause the driver to hit a flood of error frames:
$ ifconfig can0 down ? See below. > $ ip link set can0 up txqueuelen 1000 \ > type can bitrate 1000000 loopback off > $ candump -L any,0:0,#FFFFFFFF > candump.log & > $ cansend can0 00000D01#01020304 > $ killall candump > $ ip link set can0 down > $ cat candump.log > > The output of this sequence is here: > > Setting can0 interface > RTNETLINK answers: Device or resource busy Hm, the interface was still running and the settings are not done. > Dumping can0 receive data > Sending bogus can0 message > Ending can0 data dump > Disabling can0 interface > can0 data: > ---------- > (1259913144.764113) can0 20000020#0000000000000000 > (1259913144.764230) can0 20000020#0000000000000000 > (1259913144.764308) can0 20000020#0000000000000000 > (1259913144.764425) can0 20000020#0000000000000000 > (1259913144.764548) can0 20000020#0000000000000000 > (1259913144.764643) can0 20000020#0000000000000000 > (1259913144.764775) can0 20000020#0000000000000000 > (1259913144.764970) can0 20000020#0000000000000000 > (1259913144.765068) can0 20000020#0000000000000000 > (1259913144.765144) can0 20000020#0000000000000000 > (1259913144.765209) can0 20000020#0000000000000000 > (1259913144.765323) can0 20000020#0000000000000000 > (1259913144.765521) can0 20000020#0000000000000000 > (1259913144.765464) can0 20000004#0008000000000000 > (1259913144.765638) can0 20000020#0000000000000000 > (1259913144.765705) can0 20000020#0000000000000000 > (1259913144.765768) can0 20000004#0020000000000000 > (1259913144.765895) can0 20000020#0000000000000000 > (1259913144.766016) can0 20000020#0000000000000000 > (1259913144.766140) can0 20000020#0000000000000000 Wired, I would expect error messages here. Looks like a separate issue. > The syslog output is also revealing, indicating a flood of "AERR irq" > errors. OK. > Some debug output: > > $ ip -detail link show can0 > 2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN > qlen 100 > link/can > can state ERROR-ACTIVE restart-ms 0 > bitrate 1003313 sample-point 0.666 The bit-rate error is rather high due to ... > tq 110 prop-seg 2 phase-seg1 3 phase-seg2 3 sjw 1 > : tseg1 4..16 tseg2 2..8 sjw 1..4 brp 2..128 brp-inc 1 > clock 99328000 this exotic clock frequency. Is it really correct? > I've verified that the bus is properly terminated at 120 ohms and > CAN_H/CAN_L are wired properly. Using multiple bitrates (1Mbps vs 40 > kbps) doesn't seem to affect it. > > Any ideas on what might be going on? I suspect CAN bus errors due to improper bit-timing parameters. Wolfgang. _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
