p1010rdb-pb FlexCAN unable to recieve message from usbcan device

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

p1010rdb-pb FlexCAN unable to recieve message from usbcan device

Jump to solution
681 Views
tcguchengjie
Contributor II

Hi,I have a p1010rdb-pb board and a usbcan device.I configure the kernel according to the FlexCAN User's Manual,then want to use cantest to verify CAN functionality.CAN1 interface send the can frames successfully,and the usb device also receive the can frames successfully.

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:~# cantest can1 12345678#123412341234

flexcan ffe1d000.can can1: XMIT done

root@p1010rdb-pb:~# cat /proc/interrupts

           CPU0     

16:          0   OpenPIC    16 Level     [PCI] PME, [PCI] PME, fsl-ifc

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:        575   OpenPIC    28 Level     ehci_hcd:usb1

41:          0   OpenPIC    41 Level     fsl-sata

42:        313   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:       1370   OpenPIC    59 Level     fsl_espi

61:          1   OpenPIC    61 Level     can1

68:          0   OpenPIC    68 Level     gianfar_ptp

74:          0   OpenPIC    74 Level     fsl-sata

LOC:       3378   Local timer interrupts

SPU:          0   Spurious interrupts

PMI:          0   Performance monitoring interrupts

MCE:          0   Machine check exceptions

root@p1010rdb-pb:~# cantest can1 12345678#123412341234

flexcan ffe1d000.can can1: XMIT done

root@p1010rdb-pb:~# cat /proc/interrupts            

           CPU0     

16:          0   OpenPIC    16 Level     [PCI] PME, [PCI] PME, fsl-ifc

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:        575   OpenPIC    28 Level     ehci_hcd:usb1

41:          0   OpenPIC    41 Level     fsl-sata

42:        620   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:       1370   OpenPIC    59 Level     fsl_espi

61:          2   OpenPIC    61 Level     can1

68:          0   OpenPIC    68 Level     gianfar_ptp

74:          0   OpenPIC    74 Level     fsl-sata

LOC:       3434   Local timer interrupts

SPU:          0   Spurious interrupts

PMI:          0   Performance monitoring interrupts

MCE:          0   Machine check exceptions

root@p1010rdb-pb:~# ifconfig

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:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:10

          RX bytes:0 (0.0 B)  TX bytes:12 (12.0 B)

          Interrupt:61

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)

When I send the can frames via the usbcan device.The device shows that the message is sent successfully,but the CAN1 interface gets nothing. There is no increment in irq count registered for CAN1

root@p1010rdb-pb:~# cantest can1

^C

root@p1010rdb-pb:~# cat /proc/interrupts

           CPU0     

16:          0   OpenPIC    16 Level     [PCI] PME, [PCI] PME, fsl-ifc

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:        575   OpenPIC    28 Level     ehci_hcd:usb1

41:          0   OpenPIC    41 Level     fsl-sata

42:        817   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:       1370   OpenPIC    59 Level     fsl_espi

61:          2   OpenPIC    61 Level     can1

68:          0   OpenPIC    68 Level     gianfar_ptp

74:          0   OpenPIC    74 Level     fsl-sata

LOC:       3662   Local timer interrupts

SPU:          0   Spurious interrupts

PMI:          0   Performance monitoring interrupts

MCE:          0   Machine check exceptions

Thanks,

GU

0 Kudos
1 Solution
574 Views
tcguchengjie
Contributor II

I solve the problem myself.Just enable the RX label in menuconfig——Networking support——CAN bus subsystem support——CAN Device Drivers

View solution in original post

0 Kudos
1 Reply
575 Views
tcguchengjie
Contributor II

I solve the problem myself.Just enable the RX label in menuconfig——Networking support——CAN bus subsystem support——CAN Device Drivers

0 Kudos