Implement gyroscope on IMX6 device.

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

Implement gyroscope on IMX6 device.

2,899 Views
quantran
Contributor II

Now we are developing one device like a smartphone base on design from imx6q- sabreSD kit. We are facing a problem with gyroscope sensor that: On IMX6 kit there is not gyrosensor hardware but on my device we are using l3gd20 chip to work as gyrosensor and my problem is we had driver of l3gd20 (l3gd20.c) from manufacture and added it to my kernel. It seem to worked because the axis data are readed into i2c register of l3gd20. but we can't read that data from these register to show up to android (like show up to one app sensor test on android).

i think my problem is on HAL layer(like gyrosensor.cpp, gyrosensor.h in link: myandroid/hardware/imx/libsensors/).i'm using android 4.2, Please give me some advice.

2 Replies

1,950 Views
igorpadykov
NXP Employee
NXP Employee

Hi blood

you can use Freescale Xtrinsic Pressure Sensor examples

for Android porting

MPL3115A2: 50 to 110kPa, 2.5v, Absolute Xtrinsic Smart Pressure Sensor

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

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

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

1,950 Views
quantran
Contributor II

Thank chipexpert for your help. I followed your suggestion and now i 'm facing new problem. On kernel both gyro and accel work and their register had data.But on android gyro seems only read data from accel 's data. when i turn off accel in board-mx6q_ sabresd.c then gyro can't read data. I only turn on one sensor at one time and It seems that all sensors only read data from accelsensor.

Can you show me with one sensor, which place in source decide where do data read from?

Thank again!

0 Kudos