Working with iMX6UL-EVK I2C Accelerometer/Magnetometer

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Working with iMX6UL-EVK I2C Accelerometer/Magnetometer

跳至解决方案
2,223 次查看
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,491 次查看
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,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 项奖励
回复
1,491 次查看
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 项奖励
回复