sexta-feira, 6 de fevereiro de 2015

How to use can bus in IMX6

Step 1) After configuring yocto, go to "edm1-cf-imx6_edm1-fairy_yocto-1.5-qt5_source_20140714/edm_yocto_qt5-20140714/build" folder and issue
bitbake libsocket2
bitbake canutils

Step 2) It will be created 9 rpm package in edm1-cf-imx6_edm1-fairy_yocto-1.5-qt5_source_20140714/edm_yocto_qt5-20140714/build/tmp/deploy/rpm/cortexa9hf_vfp_neon

a) canutils-4.0.6-r0.cortexa9hf_vfp_neon.rpm
b) canutils-dbg-4.0.6-r0.cortexa9hf_vfp_neon.rpm
c) canutils-dev-4.0.6-r0.cortexa9hf_vfp_neon.rpm
d) canutils-doc-4.0.6-r0.cortexa9hf_vfp_neon.rpm
e) libsocketcan2-0.0.9-r0.cortexa9hf_vfp_neon.rpm
f) libsocketcan-dbg-0.0.9-r0.cortexa9hf_vfp_neon.rpm
g) libsocketcan-dev-0.0.9-r0.cortexa9hf_vfp_neon.rpm
h) libsocketcan-doc-0.0.9-r0.cortexa9hf_vfp_neon.rpm
i) libsocketcan-staticdev-0.0.9-r0.cortexa9hf_vfp_neon.rpm

Step 3) Transfer packages a) and e) to IHM

Step 4) Install packages a) and e) in IHM

rpm -ivh canutils-4.0.6-r0.cortexa9hf_vfp_neon.rpm
rpm -ivh  libsocketcan2-0.0.9-r0.cortexa9hf_vfp_neon.rpm

Step 5) canconfig can0 stop

Step 6) canconfig can0 bitrate 125000 sample-point 0.75

Step 7) canconfig start

Step 8) ifconfig can0 up

Step 9) cansend can0 -e -v -i 0x1CFEEEAB 01 12 23 45 56 67 78 89 90

Nenhum comentário:

Postar um comentário