Erik Calissendorff wrote: > Hi Wolfgang, thanks for your great debug tips. > > Here is the output of the various commands: > > r...@overo:~# ip link set can0 up type can bitrate 250000 > r...@overo:~# ------------[ cut here ]------------ > WARNING: at > /home/plejd/overo-oe/tmp/work/overo-angstrom-linux-gnueabi/socketcan-modules-0.0+svnr1064-r46/trunk/kernel/2.6/drivers/net/can/mcp251x.c:796 > mcp251x_irq_work_handler+0x244/0x5c0 [mcp251x]() > Modules linked in: mcp251x can_dev > [<c00f45d4>] (unwind_backtrace+0x0/0xdc) from [<c0116278>] > (warn_slowpath_common+0x4c/0x80) > [<c0116278>] (warn_slowpath_common+0x4c/0x80) from [<bf008ef8>] > (mcp251x_irq_work_handler+0x244/0x5c0 [mcp251x]) > [<bf008ef8>] (mcp251x_irq_work_handler+0x244/0x5c0 [mcp251x]) from > [<c0126d1c>] (worker_thread+0x19c/0x218) > [<c0126d1c>] (worker_thread+0x19c/0x218) from [<c012a6b0>] (kthread+0x78/0x80) > [<c012a6b0>] (kthread+0x78/0x80) from [<c00f0800>] > (kernel_thread_exit+0x0/0x8) > ---[ end trace 28b396a9ed8a4478 ]--- > NOHZ: local_softirq_pending 08 > > r...@overo:~# candump any,0:0,#ffffffff & > r...@overo:~# can: controller area network core (rev 20090105 abi 8) > NET: Registered protocol family 29 > can: raw protocol (rev 20090105) > > r...@overo:~# cansend can0 000# > can0 20000004 [8] 00 20 00 00 00 00 00 00 ERRORFRAME > caNOHZ: local_softirq_pending 08 > n0 20000040 [8] 00 00 00 00 00 00 00 00 ERRORFRAME > r...@ovenohz: local_softirq_pending 08 > ro:~# can0 20000040 [8] 00 00 00 00 00 00 00 00 ERRORFRAME > can0 20000040 [8] 00 00 00 00 00 00 00 00 ERRORFRAME > can0 20000040 [8] 00 00 00 00 00 00 00 00 ERRORFRAME > can0 20000004 [8] 00 20 00 00 00 00 00 00 ERRORFRAME > can0 20000040 [8] 00 00 00 00 00 00 00 00 ERRORFRAME > can0 20000040 [8] 00 00 00 00 00 00 00 00 ERRORFRAME > can0 20000040 [8] 00 00 00 00 00 00 00 00 ERRORFRAME > can0 20000040 [8] 00 00 00 00 00 00 00 00 ERRORFRAME > can0 20000040 [8] 00 00 00 00 00 00 00 00 ERRORFRAME > can0 20000004 [8] 00 20 00 00 00 00 00 00 ERRORFRAME > can0 20000040 [8] 00 00 00 00 00 00 00 00 ERRORFRAME > can0 20000004 [8] 00 20 00 00 00 00 00 00 ERRORFRAME
This smells like electrical problems on the bus. Things like missing termination but also improper bit-timing. > r...@overo:~# ip -d -s link show can0 > 2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP qlen 10 > link/can > can state ERROR-ACTIVE restart-ms 0 > bitrate 250000 sample-point 0.850 > tq 200 prop-seg 8 phase-seg1 8 phase-seg2 3 sjw 1 > : tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1 > clock 10000000 > re-started bus-errors arbit-lost error-warn error-pass bus-off > 0 0 0 5 5 11 > RX: bytes packets errors dropped overrun mcast > 0 0 0 0 0 0 > TX: bytes packets errors dropped carrier collsns > 0 0 0 0 0 0 > r...@overo:~# > --- > > Even if I don't understand why the problem is I'm very delighted to be > able to see it in the software, have used an oscillosope to check the > signal previously and from what I could see there it appears to be > running at 1Mbit instead of 250kbit as requested. Where my fault > finding has ended now is that the chip doesn't seams to enter > configuration mode and therefore isn't setting the bittimiing > correctly either. If this is because of the reset instruction not > being correct or something else is still unknown to me however. Did you specify the proper CAN clock frequency? Does the communication work if you configure the remote nodes at 1 MB/s? It's also useful to enable CONFIG_CAN_DEBUG_DEVICES by specifying CONFIG_CAN_DEBUG_DEVICES=y on the make command line. Wolfgang. Wolfgang. _______________________________________________ Socketcan-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-users
