rtdm can on mpc5121e - no rtcan devices detected
Von: Tom Evans
Gesendet: Sonntag, 8. Dezember 2013 23:07
Quoted 55 lines · Andreas Gareis
Quoted 9 lines
Hi Wolfgang,
Thanks for your answer.
...Quoted 2 lines
RTCAN devices are not visible in /dev. It's not a character device. You can find more informations in
/proc/rtnet.The files "devices" and "sockets" which are located in
/proc/rtcandon't have any entries. (/proc/rtnetdoesn't exist on my system)Did the CAN devices work before you installed Xenomai? Get them working there first.
On the device I'm using (Freescale i.MX53), the CAN drivers are connected via NETWORKING. So they don't show up in /dev, just as Ethernet doesn't show there either (/dev is so 1980's :-).
root@triton1:~# ls /proc/net/can rcvlist_all rcvlist_err rcvlist_inv reset_stats version rcvlist_eff rcvlist_fil rcvlist_sff stats root@triton1:~# ifconfig can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 UP RUNNING 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:256 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:82can1 Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:2527 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:256
RX bytes:19583 (19.1 KiB) TX bytes:0 (0.0 B) Interrupt:83eth0 Link encap:Ethernet HWaddr 00:0C:C6:79:6C:6E
... And so on.Check for interrupts:
root@triton1:~# cat /proc/interrupts CPU0 6: 0 tzic sdma ... 64: 0 tzic imx-i2c.2 82: 0 tzic can0 83: 5832 tzic can1 87: 124900 tzic imx25-fec.0
Quoted 2 lines
Tom
Yes, the CAN devices worked before Xenomai installation. They were shown in ifconfig and communication with other CAN-devices was possible.
When I select normal (non rt) CAN-support and xenomai kernel (without RT-CAN) in the kernelconfig, working CAN devices are also available.
Now I want to use RT-CAN with xenomai. So, I activated "RT-Socket-CAN" and "MSCAN driver for MPC52xx and MPC512x" in the kernelconfig. When "normal" CAN support (Networking support => CAN bus subsystem support => CAN Device Drivers Freescale MPC5xxx onboard CAN controller) is disabled, the xenomai module "xeno_can_mscan.ko" isn't able to start. When "normal" CAN support is enabled, the xenomai module "xeno_can_mscan.ko" can be loaded without errors in dmesg, but there are no rtcan devices.
Andreas
On Mon, 9 Dec 2013 19:17:47 +0100, "Andreas Gareis"
Quoted 114 lines · <[email protected]> wrote:
Von: Tom Evans
Gesendet: Sonntag, 8. Dezember 2013 23:07
Quoted 109 lines · Andreas Gareis
Quoted 11 lines
Hi Wolfgang,
Thanks for your answer.
...
Quoted 1 line
RTCAN devices are not visible in /dev. It's not a character device.
Quoted 7 lines
Quoted 1 line
You can find more informations in
/proc/rtnet.The files "devices" and "sockets" which are located in
/proc/rtcandon't have any entries. (
/proc/rtnetdoesn't exist on my system)Did the CAN devices work before you installed Xenomai? Get them
working there first.
On the device I'm using (Freescale i.MX53), the CAN drivers are
connected via NETWORKING. So they don't show up in /dev, just as
Ethernet doesn't show there either (/dev is so 1980's :-).
root@triton1:~# ls /proc/net/can
rcvlist_allrcvlist_errrcvlist_invreset_statsversion
rcvlist_effrcvlist_filrcvlist_sffstats root@triton1:~# ifconfigcan0 Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING 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:256
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:82
can1 Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:2527 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:256
RX bytes:19583 (19.1 KiB) TX bytes:0 (0.0 B)
Interrupt:83
eth0 Link encap:Ethernet HWaddr 00:0C:C6:79:6C:6E
... And so on.
Check for interrupts:
root@triton1:~# cat /proc/interruptsCPU0
6: 0 tzic sdma
...
64: 0 tzic imx-i2c.2
82: 0 tzic can0
83: 5832 tzic can1
87: 124900 tzic imx25-fec.0
Quoted 7 lines
Quoted 3 lines
Tom
Yes, the CAN devices worked before Xenomai installation. They were shown
in
Quoted 11 lines
ifconfig and communication with other CAN-devices was possible.
When I select normal (non rt) CAN-support and xenomai kernel (without
RT-CAN) in the kernelconfig, working CAN devices are also available.
Now I want to use RT-CAN with xenomai. So, I activated "RT-Socket-CAN"
and
Quoted 1 line
"MSCAN driver for MPC52xx and MPC512x" in the kernelconfig. When
"normal"
Quoted 1 line
CAN support (Networking support => CAN bus subsystem support => CAN
Device
Quoted 1 line
Drivers Freescale MPC5xxx onboard CAN controller) is disabled, the
xenomai
Quoted 1 line
module "xeno_can_mscan.ko" isn't able to start. When "normal" CAN
support
That's the real problem. What happen's if you want to start the CAN
device?
Quoted 7 lines
is
enabled, the xenomai module "xeno_can_mscan.ko" can be loaded without
errors
in dmesg, but there are no rtcan devices.
But the device are not probed because they are already bound to a the
Linux
CAN driver. You can unbind them before loading the RTCAN driver but then
you
will run into the same problem then reported above.
Wolfgang.