Hi,
While trying to verify CAN functionality using two P1010RDB targets following error is encountered.
irq 16: nobody cared (try booting with the "irqpoll" option)
Updated hwconfig in uboot is
=> print hwconfig
hwconfig=fsl_p1010mux:tdm_can=can;usb1:dr_mode=host,phy_type=utmi
And to configure dtb and kernel to support CAN, following FSL link has been followed:
Freescale Technical Information Center
From output of /proc/interrupts before and after sending CAN frames, there is no increment in irq count registered for can0 (irq number 48) instead irq count for irq number 16 increases to 100000 and irq 16: nobody cared (try booting with the "irqpoll" option) error message is observed.
Observed same behavior on both P1010RDB and P1010RDB-PB
Kindly see the log below:
.
.
.
Poky (Yocto Project Reference Distro) 1.6 p1010rdb-pb /dev/ttyS0
p1010rdb-pb login: root
root@p1010rdb-pb:~#
root@p1010rdb-pb:~# ifconfig -a
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:48
can1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:61
dummy0 Link encap:Ethernet HWaddr 7e:56:88:93:14:37
BROADCAST NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eth0 Link encap:Ethernet HWaddr 00:04:9f:03:44:6e
inet addr:137.202.157.11 Bcast:137.202.157.255 Mask:255.255.254.0
inet6 addr: fe80::204:9fff:fe03:446e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14698 errors:0 dropped:0 overruns:0 frame:0
TX packets:9602 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11133237 (10.6 MiB) TX bytes:2196416 (2.0 MiB)
Base address:0x2000
eth1 Link encap:Ethernet HWaddr 00:04:9f:03:44:6f
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Base address:0x4000
eth2 Link encap:Ethernet HWaddr 00:04:9f:03:44:70
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Base address:0x6000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
sit0 Link encap:UNSPEC HWaddr 00-00-00-00-00-01-00-00-00-00-00-00-00-00-00-00
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
tunl0 Link encap:IPIP Tunnel HWaddr
NOARP MTU:0 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root@p1010rdb-pb:~#
root@p1010rdb-pb:~#
root@p1010rdb-pb:~# cat /proc/interrupts
CPU0
16: 0 OpenPIC 16 Level [PCI] PME, [PCI] PME, fsl-ifc
17: 2 OpenPIC 0 Level phy_interrupt
19: 19 OpenPIC 19 Level fsl-ifc-nand
20: 0 OpenPIC 20 Level fsldma-chan
21: 0 OpenPIC 21 Level fsldma-chan
22: 0 OpenPIC 22 Level fsldma-chan
23: 0 OpenPIC 23 Level fsldma-chan
28: 383 OpenPIC 28 Level ehci_hcd:usb1
29: 9418 OpenPIC 29 Level eth0_g0_tx
30: 9804 OpenPIC 30 Level eth0_g0_rx
34: 0 OpenPIC 34 Level eth0_g0_er
41: 0 OpenPIC 41 Level fsl-sata
42: 443 OpenPIC 42 Level serial
43: 0 OpenPIC 43 Level i2c-mpc, i2c-mpc
45: 2 OpenPIC 45 Level ffe31000.jr, ffe32000.jr, ffe33000.jr, ffe34000.jr
59: 1442 OpenPIC 59 Level fsl_espi
68: 0 OpenPIC 68 Level gianfar_ptp
74: 0 OpenPIC 74 Level fsl-sata
LOC: 4472 Local timer interrupts
SPU: 0 Spurious interrupts
PMI: 0 Performance monitoring interrupts
MCE: 0 Machine check exceptions
root@p1010rdb-pb:~# ip link set can0 up type can bitrate 125000 ;
flexcan ffe1c000.can can0: bitrate error 0.0%
flexcan ffe1c000.can can0: writing ctrl=0xc7112001
root@p1010rdb-pb:~#
root@p1010rdb-pb:~#
root@p1010rdb-pb:~#
root@p1010rdb-pb:~# cat /proc/interrupts
CPU0
16: 0 OpenPIC 16 Level [PCI] PME, [PCI] PME, fsl-ifc
17: 2 OpenPIC 0 Level phy_interrupt
19: 19 OpenPIC 19 Level fsl-ifc-nand
20: 0 OpenPIC 20 Level fsldma-chan
21: 0 OpenPIC 21 Level fsldma-chan
22: 0 OpenPIC 22 Level fsldma-chan
23: 0 OpenPIC 23 Level fsldma-chan
28: 460 OpenPIC 28 Level ehci_hcd:usb1
29: 9510 OpenPIC 29 Level eth0_g0_tx
30: 10077 OpenPIC 30 Level eth0_g0_rx
34: 0 OpenPIC 34 Level eth0_g0_er
41: 0 OpenPIC 41 Level fsl-sata
42: 574 OpenPIC 42 Level serial
43: 0 OpenPIC 43 Level i2c-mpc, i2c-mpc
45: 2 OpenPIC 45 Level ffe31000.jr, ffe32000.jr, ffe33000.jr, ffe34000.jr
48: 0 OpenPIC 48 Level can0
59: 1442 OpenPIC 59 Level fsl_espi
68: 0 OpenPIC 68 Level gianfar_ptp
74: 0 OpenPIC 74 Level fsl-sata
LOC: 4685 Local timer interrupts
SPU: 0 Spurious interrupts
PMI: 0 Performance monitoring interrupts
MCE: 0 Machine check exceptions
root@p1010rdb-pb:~#
root@p1010rdb-pb:~# ip link set can1 up type can bitrate 125000 ;
flexcan ffe1d000.can can1: bitrate error 0.0%
flexcan ffe1d000.can can1: writing ctrl=0xc7112001
root@p1010rdb-pb:~#
root@p1010rdb-pb:~#
root@p1010rdb-pb:~# cat /proc/interrupts
CPU0
16: 0 OpenPIC 16 Level [PCI] PME, [PCI] PME, fsl-ifc
17: 2 OpenPIC 0 Level phy_interrupt
19: 19 OpenPIC 19 Level fsl-ifc-nand
20: 0 OpenPIC 20 Level fsldma-chan
21: 0 OpenPIC 21 Level fsldma-chan
22: 0 OpenPIC 22 Level fsldma-chan
23: 0 OpenPIC 23 Level fsldma-chan
28: 503 OpenPIC 28 Level ehci_hcd:usb1
29: 9531 OpenPIC 29 Level eth0_g0_tx
30: 10180 OpenPIC 30 Level eth0_g0_rx
34: 0 OpenPIC 34 Level eth0_g0_er
41: 0 OpenPIC 41 Level fsl-sata
42: 758 OpenPIC 42 Level serial
43: 0 OpenPIC 43 Level i2c-mpc, i2c-mpc
45: 2 OpenPIC 45 Level ffe31000.jr, ffe32000.jr, ffe33000.jr, ffe34000.jr
48: 0 OpenPIC 48 Level can0
59: 1442 OpenPIC 59 Level fsl_espi
61: 0 OpenPIC 61 Level can1
68: 0 OpenPIC 68 Level gianfar_ptp
74: 0 OpenPIC 74 Level fsl-sata
LOC: 4806 Local timer interrupts
SPU: 0 Spurious interrupts
PMI: 0 Performance monitoring interrupts
MCE: 0 Machine check exceptions
root@p1010rdb-pb:~# cansend can0 123#1122334455667788
-sh: cansend: command not found
root@p1010rdb-pb:~# ca
cal caller cantest case cat cat.coreutils catv
root@p1010rdb-pb:~# cantest can0 123#1122334455667788
irq 16: nobody cared (try booting with the "irqpoll" option)
CPU: 0 PID: 2470 Comm: cantest Not tainted 3.12.19-rt30-QorIQ-SDK-V1.6+gc29fe1a #1
Call Trace:
[effefef0] [c0006bd4] show_stack+0x44/0x15c (unreliable)
[effeff30] [c0073b9c] __report_bad_irq.isra.6+0x38/0xf4
[effeff50] [c0073e78] note_interrupt+0x1a8/0x268
[effeff80] [c0071e94] handle_irq_event_percpu+0x138/0x1c4
[effeffc0] [c0071f54] handle_irq_event+0x34/0x54
[effeffd0] [c0074cb0] handle_fasteoi_irq+0xa0/0x154
[effeffe0] [c000436c] __do_irq+0x48/0x74
[effefff0] [c000ca88] call_do_irq+0x24/0x3c
[ef693e20] [c00043fc] do_IRQ+0x64/0xb4
[ef693e40] [c000e3fc] ret_from_except+0x0/0x18
--- Exception: 501 at put_pid+0x0/0x48
LR = __fput+0xc8/0x214
[ef693f00] [c00d43d8] __fput+0x9c/0x214 (unreliable)
[ef693f20] [c0058af8] task_work_run+0xac/0xf0
[ef693f40] [c000e9b8] do_user_signal+0x74/0xc4
--- Exception: c00 at 0xff0b9cc
LR = 0x10000644
handlers:
[<c001ac64>] fsl_pci_pme_handle
[<c001ac64>] fsl_pci_pme_handle
[<c001da74>] fsl_ifc_ctrl_irq
Disabling IRQ #16
root@p1010rdb-pb:~# lsmod
Module Size Used by
root@p1010rdb-pb:~# cat /proc/interrupts
CPU0
16: 100000 OpenPIC 16 Level [PCI] PME, [PCI] PME, fsl-ifc
17: 2 OpenPIC 0 Level phy_interrupt
19: 19 OpenPIC 19 Level fsl-ifc-nand
20: 0 OpenPIC 20 Level fsldma-chan
21: 0 OpenPIC 21 Level fsldma-chan
22: 0 OpenPIC 22 Level fsldma-chan
23: 0 OpenPIC 23 Level fsldma-chan
28: 761 OpenPIC 28 Level ehci_hcd:usb1
29: 9612 OpenPIC 29 Level eth0_g0_tx
30: 10960 OpenPIC 30 Level eth0_g0_rx
34: 0 OpenPIC 34 Level eth0_g0_er
41: 0 OpenPIC 41 Level fsl-sata
42: 986 OpenPIC 42 Level serial
43: 0 OpenPIC 43 Level i2c-mpc, i2c-mpc
45: 2 OpenPIC 45 Level ffe31000.jr, ffe32000.jr, ffe33000.jr, ffe34000.jr
48: 1 OpenPIC 48 Level can0
59: 1442 OpenPIC 59 Level fsl_espi
61: 0 OpenPIC 61 Level can1
68: 0 OpenPIC 68 Level gianfar_ptp
74: 0 OpenPIC 74 Level fsl-sata
LOC: 5685 Local timer interrupts
SPU: 0 Spurious interrupts
PMI: 0 Performance monitoring interrupts
MCE: 0 Machine check exceptions
root@p1010rdb-pb:~# uname -a
Linux p1010rdb-pb 3.12.19-rt30-QorIQ-SDK-V1.6+gc29fe1a #1 Thu Dec 18 14:58:52 PKT 2014 ppc GNU/Linux
root@p1010rdb-pb:~#
root@p1010rdb-pb:~#
root@p1010rdb-pb:~# dmesg | grep -i can
[ 0.944863] CAN device driver interface
[ 0.948157] flexcan ffe1c000.can: device registered (reg_base=f10b6000, irq=48)
[ 0.954864] flexcan ffe1d000.can: device registered (reg_base=f10b8000, irq=61)
[ 0.967612] mdio_bus mdio@ffe24000: cannot get PHY at address 3
[ 1.317013] can: controller area network core (rev 20120528 abi 9)
[ 1.325106] can: raw protocol (rev 20120528)
[ 1.328087] can: broadcast manager protocol (rev 20120528 t)
[ 1.332453] can: netlink gateway (rev 20130117) max_hops=1
[ 94.002516] flexcan ffe1c000.can can0: bitrate error 0.0%
[ 94.007087] flexcan ffe1c000.can can0: writing ctrl=0xc7112001
[ 94.011646] flexcan ffe1c000.can can0: flexcan_set_bittiming: mcr=0x5980000f ctrl=0xc7112001
[ 94.011652] flexcan ffe1c000.can can0: flexcan_chip_start: writing mcr=0x79a20208
[ 94.011657] flexcan ffe1c000.can can0: flexcan_chip_start: writing ctrl=0xc711ec51
[ 94.011663] flexcan ffe1c000.can can0: flexcan_chip_start: reading mcr=0x60a20208 ctrl=0xc711ec51
[ 103.766575] flexcan ffe1d000.can can1: bitrate error 0.0%
[ 103.771094] flexcan ffe1d000.can can1: writing ctrl=0xc7112001
[ 103.775650] flexcan ffe1d000.can can1: flexcan_set_bittiming: mcr=0x5980000f ctrl=0xc7112001
[ 103.775656] flexcan ffe1d000.can can1: flexcan_chip_start: writing mcr=0x79a20208
[ 103.775661] flexcan ffe1d000.can can1: flexcan_chip_start: writing ctrl=0xc711ec51
[ 103.775667] flexcan ffe1d000.can can1: flexcan_chip_start: reading mcr=0x60a20208 ctrl=0xc711ec51
[ 138.012392] CPU: 0 PID: 2470 Comm: cantest Not tainted 3.12.19-rt30-QorIQ-SDK-V1.6+gc29fe1a #1
[ 138.099233] flexcan ffe1c000.can can0: Error Warning IRQ
[ 138.099240] flexcan ffe1c000.can can0: Error Passive IRQ
[ 138.099244] flexcan ffe1c000.can can0: bus-off
root@p1010rdb-pb:~#
Thanks,
Fahad
Hello Fahad Arslan,
Please make sure that two CAN controllers have been connected with straight serial cable correctly, otherwise you will encounter the above error. (On p1010RDB CAN_L and CAN_H signals connect to the correspondent signals for the other CAN controller, please refer to the hardware user guide).
For example, on P1010RDB-PA, if the user want to attach CAN1 and CAN0 on the same board, the connection should be like the following.
J17-2 to J15-2
J17-7 to J15-7
In addition, before send the CAN frames with cantest can0 123#1122334455667788, please set up the listen process on the other board( or CAN controller) with “cantest can*”.
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Yiping,
Yes, I'm using straight serial cable and I've confirmed the connections using multimeter but still facing the same issue.
Thanks,
Fahad
Look at documentation for Freescale SDK:
Hi Pavel,
Thanks for looking into this.
As I mentioned above, I've already tried updating hwconfig in uboot :
=> print hwconfig
hwconfig=fsl_p1010mux:tdm_can=can;usb1:dr_mode=host,phy_type=utmi
If you meant to drop specifying usb in hwconfig , I've just tried following but it didn't work either:
=> print hwconfig |
hwconfig=fsl_p1010mux:tdm_can=can
Regards,
Fahad