Hi,
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);
if(fileDescriptor<0){
LOGD("Failed to Open Port");
} else{
LOGD("port Opened Successfully");
}
if(ioctl(fileDescriptor,I2C_SLAVE_FORCE,0x68)<0){
LOGD("Failed to Set Address");
}
if(write(fileDescriptor,buffer,1)!=1){
LOGD("Failed to write register ");
}
if(read(fileDescriptor,buffer,1)!=1){
LOGD("Failed to read register ");
}
Output
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