Working with iMX6UL-EVK I2C Accelerometer/Magnetometer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Working with iMX6UL-EVK I2C Accelerometer/Magnetometer

ソリューションへジャンプ
2,224件の閲覧回数
arnaudne
Contributor II

Hi everyone,

I'm a bit of a noob in Embedded Linux development. I just got an iMX6UL Evaluation Kit and succeeded to build a working Yocto Project image (core-image-minimal based, with some development packages added, as evtest).

I would like to retrieve (from an user-space console for the moment) events from the FXLS8471 Accelerometer and MAG3110 Magnetometer I2C devices already populated and configured (I looked in the imx6ulevk device tree).

I then launched evtest where I could see that /dev/input/event2 and /dev/input/event3 refer respectively to the accelerometer and magnetometer, but they return no event when I read them.

I suppose that we should configure them to provide interrupts at a fixed rate, but I could not figure where I should be looking.

Could someone help me with this ?

Thanks a lot in advance.

Arnaud N. (France)

ラベル(4)
0 件の賞賛
返信
1 解決策
1,492件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Arnaud

for sensor test one can look at unit tests :

imx-test package  ../mxc_sensor_test/acctest.c

http://patches.openembedded.org/patch/103551/

https://support.bluetechnix.at/wiki/Linux_Software_User_Manual_%28i.MX6%29#Magnetometer_.28Freescale...

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,493件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Arnaud

for sensor test one can look at unit tests :

imx-test package  ../mxc_sensor_test/acctest.c

http://patches.openembedded.org/patch/103551/

https://support.bluetechnix.at/wiki/Linux_Software_User_Manual_%28i.MX6%29#Magnetometer_.28Freescale...

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,492件の閲覧回数
arnaudne
Contributor II

Hi Igor,

Thanks to your answer, I managed to get the magnetometer working. Still seeking to enable the accelerometer input.

For the magnetometer, I used :

echo 1 > /sys/devices/virtual/input/input3/enable 

Then I could watch for events with :

evtest /dev/input/event3

But "/sys/devices/virtual/input/input2/enable" does not exist for Accelerometer... I will find another way to get it working !

Thanks again

Arnaud.

0 件の賞賛
返信