imx8m 加速度计不能正常使用

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

imx8m 加速度计不能正常使用

1,321 Views
1269813285
Contributor I

我们使用imx8mm的板子,通过i2c外接mma8452加速度计。驱动是好的,通过如下命令:

#echo 1 > /sys/class/input/input1/enable

#getevent

可以得到输入事件。

但是android没有加速度计的事件上报。

我看配置使用的BOARD_USE_SENSOR_FUSION即使用的fsl_sensor_fusion,这个是否是不能使用单加速度计的?

我改成BOARD_HAS_SENSOR,使用magd,但是好像需要检查Magnetometer,如果没有Magnetometer,就会退出magd。 我想知道的是如果只使用加速度计,android系统应该怎样配置?

0 Kudos
Reply
2 Replies

1,307 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

You can refer to these documents, I share them to you.

0 Kudos
Reply

1,292 Views
1269813285
Contributor I

hi,NXP thanks for your reply,I already have these two documents(and for imx8mm,it seems use fsl_sensor_fusion not magd to report sensor data).we are based in android 9 to develop our soft.and my understanding is that we need magd to report the Accelerometer data to framework and Application.but there is only Accelerometer sensor and there is no Magnetometer sensor in our board,so magd will exit ,because it can't read “FreescaleMagnetometer” poll input device. so my problem is how we can report the Accelerometer data to framework and Application,without Magnetometer sensor in our board. and we also found that it seems fsl_sensor_fusion still can't report Accelerometer data to framework.

0 Kudos
Reply