Failed to access MPU6050 Connected to i2c-3 in Smart-EVB-G2_V1.2

I am facing issues when accessing MPU6050 which is connected i2c-3 bus of SC600T EVM board.
i am using below EVB Board having 2 Display

i have removed the right side touch panel and connected MPU6050 using level shifter to i2c-3 bus.

this is my sample code to read and write to MPU6050

    uint8_t buffer[3];
    buffer[0] = 0x74;

    int fileDescriptor = -1;
    fileDescriptor = open("/dev/i2c-3",O_RDWR);
        LOGD("Failed to Open Port");
    } else{
        LOGD("port Opened Successfully");

        LOGD("Failed to Set Address");

        LOGD("Failed to write register ");
        LOGD("Failed to read register ");

port Opened Sucessfully
Failed to write register address
Failed to read register

Note : i dont want to use the Sensor_i2c bus

this is the output i am getting when i type “dmesg” in shell

Hi,try to fix the avc denied.

1 Like

i have tried following things

  1. setenforce 0
  2. chmod 666 /dev/i2c-*
    but getting same error
    In UART got same avc denied error but i was able to send and receive data

Hi,TP I2C couldn’t be used for sensor,vice versa.

1 Like

Hi Rooney ,

Thank you for the quick reply . if TP I2C can not be used for sensor then which i2c bus will be better for Sensor( I dont want to use Sensor I2C bus because it is connected to ADSP and we dont have access to it ) . i want the port to be general purpose i2c port which can be used to connect any i2c device and can be access from /dev interface

Thank you

Hi, sensor can only connect to sensor I2C, other i2c can’t use to connect sensor, thanks!
because the sensor is control from ADSP side. that is nothing you can change.

Thank you!