-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
Component: I2CRegarding the I2C componentRegarding the I2C componentbugSomething isn't workingSomething isn't working
Description
When performing a read from i2c slaves with registers, the wire library appears to be failing on repeated starts. The bus gets stuck in a clock low state and the I2C state machine gets stuck in I2C_BUSY.
To work around the issue I have forced the processor to send a stop and start by changing:
Wire.beginTransmission(address);
Wire.write(subAddress);
Wire.endTransmission(false);
Wire.requestFrom(address, (uint8_t)1);
uint8_t data = wire.read();
to
Wire.beginTransmission(address);
Wire.write(subAddress);
Wire.endTransmission();
Wire.requestFrom(address, (uint8_t)1);
uint8_t data = wire.read();
This behaviour was found on a MPU6050A slave device. I have not tried other slaves but I believe this behaviour lies within the GD32 libraries. Has anyone experienced similar (or disimilar) behaviour?
Metadata
Metadata
Assignees
Labels
Component: I2CRegarding the I2C componentRegarding the I2C componentbugSomething isn't workingSomething isn't working