Does it always error or just occasionally? I get occasional timeout errors and just try again.
John A
(solved) error when trying to use I2C
Re: (solved) error when trying to use I2C
I won't say "always" but this is a highly repeatable problem, and I'm 99% sure that retries won't fix whatever's going on.
EDIT:
I spoke with an FAE for the company that supplies the fuel gauge (the device on the other end of the I2C); here's part of his response.
You can try sending 8 extra SCL pulses with SDA high, which can cause the slave to release the line in some fault states. If this happens at the end of a read sequence, it could because the slave does not receive a NACK and is therefore waiting for the master to send more clock pulses to read the next register. This is a common cause with all I2C devices that can cause the bus to get stuck.
As near as I can tell, this would involve bypassing the I2C library and bit-banging the GPIO myself. Is this a good idea?
EDIT:
I spoke with an FAE for the company that supplies the fuel gauge (the device on the other end of the I2C); here's part of his response.
You can try sending 8 extra SCL pulses with SDA high, which can cause the slave to release the line in some fault states. If this happens at the end of a read sequence, it could because the slave does not receive a NACK and is therefore waiting for the master to send more clock pulses to read the next register. This is a common cause with all I2C devices that can cause the bus to get stuck.
As near as I can tell, this would involve bypassing the I2C library and bit-banging the GPIO myself. Is this a good idea?
Who is online
Users browsing this forum: Google [Bot] and 85 guests