james
May 29, 2019, 8:07am
1
Hi,
MPU6050 sensor to Firefly-RK3399 board on J21 connector
7 pin - VCC3V3_SYS (MPU6050-VDD),
8 pin - GND (MPU6050-GND),
25 pins - I2C4_SDA (MPU6050_SDA),
26 pins - I2C4_SCL (MPU6050_SCL),
29 pin - SPI1_RXD (MPU6050-INT) is connected.
Attach photos and files.
Firefly-RK3399 + MPU6050.jpg
SensorFind.apk
SensorFind.apk (1.48 MB)
And I installed the application (SensorFind.apk) to find the Android sensor, but it did not recognize the sensor.
I want to rotate the HDMI output screen every time the MPU6050 sensor moves.
Waiting for your help.
You need to add MPU6050 kernel driver and Android HAL support to get it working.
james
May 30, 2019, 5:27am
3
It is already applied to rk3399-firefly-port.dtsi file, and Android HAL support is already applied.
rk3399-firefly-port.dtsi
…
…
&i2c4 {
gsl3680: gsl3680@41 {
status = “disabled”;
compatible = “gslX680”;
reg = <0x41>;
screen_max_x = <1536>;
screen_max_y = <2048>;
touch-gpio = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>;
reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
};
mpu6050:mpu@68{
status = “okay”;
compatible = “invensense,mpu6050”;
reg = <0x68>;
mpu-int_config = <0x10>;
mpu-level_shifter = <0>;
mpu-orientation = <0 1 0 1 0 0 0 0 1>;
orientation-x= <1>;
orientation-y= <1>;
orientation-z= <1>;
irq-gpio = <&gpio1 7 IRQ_TYPE_LEVEL_LOW>; /gpio1 A7 /
mpu-debug = <1>;
};
};
Where do I find out where Android HAL support is applied?
james
May 30, 2019, 5:52am
4
penguin Posted at 5/30/2019 09:58
You need to add MPU6050 kernel driver and Android HAL support to get it working.
Hi penguin,
Thank you for the reply.
It is already applied to rk3399-firefly-port.dtsi file, and Android HAL support is already applied.
Where do I find out where Android HAL support is applied?
Hi james,
Please check to make sure that the sensor is probed and initialized correctly by inspecting the kernel log first.
james
June 5, 2019, 9:48am
6
penguin Posted at 6/5/2019 09:06
Hi james,
Please check to make sure that the sensor is probed and initialized correctly by inspec …
Hi penguin,
kernel build error
Error: arch/arm64/boot/dts/rockchip/rk3399-firefly-port.dtsi:200.11-12 syntax error
FATAL ERROR: Unable to parse input tree
rk3399-firefly-port.dtsi
…
…
&i2c4 {
mpu6500_acc@68 {
status = “okay”;
compatible = “mpu6500_acc”;
reg = <0x68>;
type = <SENSOR_TYPE_ACCEL>; // There was an error in this part. //
irq-gpio = <&gpio1 7 IRQ_TYPE_EDGE_RISING>;
mpu-int_config = <0x10>;
mpu-level_shifter = <0>;
mpu-orientation = <0 1 0 1 0 0 0 0 1>;
orientation-x= <1>;
orientation-y= <0>;
orientation-z= <0>;
mpu-debug = <1>;
};
};
I need your help.
Thank you.