How to check for I2C bus status. ESP_ERR_TIMEOUT with multiple transactions

RMandR
Posts: 75
Joined: Mon Oct 29, 2018 3:13 pm

How to check for I2C bus status. ESP_ERR_TIMEOUT with multiple transactions

Postby RMandR » 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

Who is online

Users browsing this forum: REEASD, snutw_ and 151 guests