Can't open can0 device at MX6Q board

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

Can't open can0 device at MX6Q board

Jump to solution
3,548 Views
andreyperminov
Contributor I

I try to use CAN with my MX6Q board.

When I try to initialise the device, I got error "cannot find device can0"

root@variscite ~$ uname -a

Linux variscite 3.0.35-IMX6.VAR_R11 #4 SMP PREEMPT Tue Jul 9 13:54:41 IDT 2013 armv7l GNU/Linux

root@variscite ~$ dmesg | grep can

vcan: Virtual CAN interface driver

flexcan netdevice driver

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

can: raw protocol (rev 20090105)

can: broadcast manager protocol (rev 20090105 t)

root@variscite ~$ ifconfig can0 up

ifconfig: SIOCGIFFLAGS: No such device

root@variscite ~$

root@variscite ~$ ifconfig can0

ifconfig: can0: error fetching interface information: Device not found

root@variscite ~$ ls

canconfig    candump      canecho      cansend      cansequence

root@variscite ~$ ./canconfig can0 baudrate 120000rate 120000rate 120000rate 120000irate 120000trate 120000rate 120000

Cannot find device "can0"

failed to set bitrate of can0 to 120000

root@variscite ~$

How can I enable CAN support at my MX6Q board?

Labels (2)
1 Solution
1,993 Views
andreyperminov
Contributor I

Rick,

Thank you for your answer. You have pointed me out the right direction. I use MX6-based board from Variscite. By default, imx6q_add_flexcan1(&mx6q_flexcan1_pdata); was ommited in in mx6_var_som_board_init() function. I added it in initialization code and now all work well.

View solution in original post

0 Kudos
2 Replies
1,993 Views
rickchu
Contributor IV

1. make sure imx6q_add_flexcan0(&mx6q_sabresd_flexcan0_pdata); have add in mx6_sabresd_board_init()

2. used below command to enable CAN0 device

    # ip link set can0 up type can bitrate 500000

PS. I verified on our device not EVB.

Good Luck,

Rick

1,994 Views
andreyperminov
Contributor I

Rick,

Thank you for your answer. You have pointed me out the right direction. I use MX6-based board from Variscite. By default, imx6q_add_flexcan1(&mx6q_flexcan1_pdata); was ommited in in mx6_var_som_board_init() function. I added it in initialization code and now all work well.

0 Kudos