You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, as per my understanding, this is crucial for I2C communication, since we might need a repeated start condition on certain use cases.
The error I have encountered is when reading a register for adt7420 which is always 0.
From what I understand,
LOC 453 will write the register address (that needs to be read) and a stop_bit should not be generated (However, when using Linux Platform, stop_bit does not do anything)
LOC 456, will read back the register value and a stop_bit should be generated (However, when using Linux Platform, stop_bit does not do anything)
I think the issue is with using write() and read() for I2C, which cannot use/implement stop_bit (where in each write/read might automatically send a stop_bit)
Note: I was able to replicate this issue in a simple C Program
Instead, I have found that using ioctl(file,I2C_RDWR, &packets); or __s32 i2c_smbus_read_byte_data(int file, __u8 command); are working alternatives
Note: I was only able to test this in a simple C program and have not tested it on the Linux I2C Driver.
This is definitely something that needs to be fixed, we will do it but I can't offer a timeline right now. If you would like to contribute and make a pull request that would be awesome!
In both linux_i2c_read and linux_i2c_write, the stop_bit condition is ignored;
The error I have encountered is when reading a register for adt7420 which is always 0.
write()
andread()
for I2C, which cannot use/implement stop_bit (where in each write/read might automatically send a stop_bit)ioctl(file,I2C_RDWR, &packets);
or__s32 i2c_smbus_read_byte_data(int file, __u8 command);
are working alternativesThe text was updated successfully, but these errors were encountered: