Keith Jones

Flexcan EROR-PASSIVE

Discussion created by Keith Jones on Jun 1, 2012

I am using the Sabre Infotainment platform for CAN communications. My problem is that I am unable to send packets successfully or receive packets successfully. I have a device that sends CAN frames onto the bus. The Sabre platform show continuous hardware interrupts but only 2 packets are received.

Additionally, the command "cansend 123#112233445566"  does not return, but hangs indefinitely.

Does anyone have experience in the area?

 

I have ported 2.6.39 flexcan code into the 2.6.35 kernel. I have also compiled the libsocketcan and canutils into by root file system. This is what I am seeing:

 

root@freescale ~$ ip link set can0 up type can bitrate 250000
flexcan flexcan.0: writing ctrl=0x05312005
root@freescale ~$ 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:2 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:16 (16.0 B)  TX bytes:0 (0.0 B)
          Interrupt:82

 

root@freescale ~$ ip -s -d link show can0
2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
    link/can
    can state ERROR-PASSIVE (berr-counter tx 0 rx 128) restart-ms 0
    bitrate 250000 sample-point 0.875
    tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
    flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
    clock 24000000
    re-started bus-errors arbit-lost error-warn error-pass bus-off
    0          0          0          1          1          0
    RX: bytes  packets  errors  dropped overrun mcast
    16         2        0       0       0       0
    TX: bytes  packets  errors  dropped carrier collsns
    0          0        0       0       0       0
root@freescale ~$

root@freescale ~$ cat /proc/interrupts
           CPU0
  1:       1135    MXC_TZIC  mxsdhci
  2:          0    MXC_TZIC  mxsdhci
  6:          1    MXC_TZIC  mxc_sdma
  8:          2    MXC_TZIC  mxc_nd
  9:          0    MXC_TZIC  VPU_CODEC_IRQ
 10:          0    MXC_TZIC  mxc_ipu
 11:          1    MXC_TZIC  mxc_ipu
 12:          0    MXC_TZIC  ydx
 14:          0    MXC_TZIC  usb_wakeup, ehci_hcd:usb2
 16:          0    MXC_TZIC  usb_wakeup, ehci_hcd:usb3
 18:          0    MXC_TZIC  usb_wakeup, fsl-usb2-otg, ehci_hcd:usb1, fsl-usb2-udc
 24:          0    MXC_TZIC  mxc_rtc
 28:          0    MXC_TZIC  ahci
 31:       1377    MXC_TZIC  mxcintuart
 36:          1    MXC_TZIC  CSPI_IRQ
 39:       4965    MXC_TZIC  i.MX Timer Tick
 63:        198    MXC_TZIC  imx-i2c
 64:         60    MXC_TZIC  imx-i2c
 66:          0    MXC_TZIC  asrc
 69:          0    MXC_TZIC  mxc_iim
 73:          0    MXC_TZIC  dvfs
 82:     420454    MXC_TZIC  can0
 84:          0    MXC_TZIC  g12
129:          0           -  mxsdhci
132:          0           -  mxsdhci
191:          0           -  eth0
Err:          0
root@freescale ~$

Outcomes