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?
解決済! 解決策の投稿を見る。
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.
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
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.