AnsweredAssumed Answered

How could i use the can1 of iMX6DL Sabreauto

Question asked by Leo Yang on Apr 8, 2014
Latest reply on Mar 6, 2015 by Arun Swarnam

Hello,everyone: my platform is iMX6DL Sabreauto,and i want to use the CAN to communicate with a USB-CAN adptor .

As you kown,the Ethernet interface and CAN0 using the same io (CAN0_TXD = ENET_MDC),so i want to enable the can1, however , i could't,. 

LTIB : L3.0.35_4.1.0_130816_source i have add the can supports in the configure of LTIB.

 

(1) At first,the target load image from host via TFTP server.  

MX6DL SABREAUTO U-Boot > tftpboot uImage

FEC: Link is Up 796d

Using FEC0 device TFTP from server 192.168.1.2; our IP address is 192.168.1.3

Filename 'uImage'.

Load address: 0x10800000 Loading: ##.................

done

Bytes transferred = 3866624 (3b0000 hex)

 

(2) boot ,load rootfs by NFS server

MX6DL SABREAUTO U-Boot > boot .............................

Verifying Checksum ... OK

Loading Kernel Image ... OK

OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

......................

 

(3) then,i can see the imx6q-flexcan.1: device had been registered

vcan: Virtual CAN interface driver

CAN device driver interface

flexcan netdevice driver

flexcan imx6q-flexcan.1: device registered (reg_base=ea9a8000, irq=143)

.....................

NET: Registered protocol family 17

can: controller area network core (rev 20090105 abi 8)

NET: Registered protocol family 29

can: raw protocol (rev 20090105)

can: broadcast manager protocol (rev 20090105 t)

 

(4) Linux boot correctly, when i want to check the can0 and can1 ,i could find the can0 ,not can1

root@freescale ~$ ifconfig -a

can0        Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-0

               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:143

eth0 Link encap:Ethernet ...........

lo Link encap:Local Loopback .................


root@freescale ~$ root@freescale ~$ ip link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

2: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN qlen 10   link/can

3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP q0 link/ether 00:04:9f:20:b4:ca brd ff:ff:ff:ff:ff:ff 


(5) so i try to set up the bitrate of can0, the flexcan.1 was set. I have no ideal how to fix it. Other hand ,linux tell me that it "cannot find device can1"

root@freescale ~$ ip link set can0 up type can bitrate 125000

flexcan imx6q-flexcan.1: writing ctrl=0x0e312005 

root@freescale ~$ ip link set can1 up type can bitrate 125000

Cannot find device "can1"


Did I forgot something ?

Could anyone please guide me.  

Outcomes