How to check for I2C bus status. ESP_ERR_TIMEOUT with multiple transactions
Posted: Mon Jul 29, 2019 2:29 pm
I sometimes get ESP_ERR_TIMEOUT from i2c_master_cmd_begin(I2C_NUM, cmd, 1000 / portTICK_PERIOD_MS) when sending multiple I2C read write sequences.
It also seems that i2c_master_cmd_begin returns with the bus busy error before the 1000ms tick timeout.
Inserting an arbitrary delay in between the transactions seems to help.
Is there a deterministic way to check for bus state before calling cmd_begin?
TIA
It also seems that i2c_master_cmd_begin returns with the bus busy error before the 1000ms tick timeout.
Inserting an arbitrary delay in between the transactions seems to help.
Is there a deterministic way to check for bus state before calling cmd_begin?
TIA