This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

I2C write error

Other Parts Discussed in Thread: AM3359

Hi,

I am trying to use the I2C1 to communicate to the slave on AM3359 with Linux as host.

I have changed the pin mux for I2C1 to uart0_ctsn.i2c1_sda, similarly for scl in board specific file. The same is assigned in the board file to read factory eeprom configuration

To use the same I2c to communicate to my slave device what are the configurations to be added.

 

I just created an application with the following code but I2C write is failing and the error number is: EREMOTEIO

I have mentioned the code i have used:

fd = open(filename, O_RDWR); /*filename = "/dev/i2c-2"

ioctl(fd, I2C_SLAVE, addr);

ret = write(fd, buf, 5);

 

Could you please let me know what could be the problem.

Regards,

Raja.