Closed MRusinov closed 5 months ago
SHT4x often gives "i2cdev: Could not read from device [0x44 at 0]" error on measurement. ESP32C3
Corrected this way:
--- sht4x.c.old 2024-02-02 10:34:14.680822283 +0400 +++ sht4x.c 2024-02-02 11:23:58.529277599 +0400 @@ -174,8 +174,8 @@ { I2C_DEV_TAKE_MUTEX(&dev->i2c_dev); I2C_DEV_CHECK(&dev->i2c_dev, send_cmd_nolock(dev, cmd)); - if (delay_ticks) - vTaskDelay(delay_ticks); + // if (delay_ticks) + vTaskDelay(delay_ticks + 1); I2C_DEV_CHECK(&dev->i2c_dev, read_res_nolock(dev, res)); I2C_DEV_GIVE_MUTEX(&dev->i2c_dev);
After that all errors gone...
esp-idf
5.1.2
sht4x
No response
Thank you. But could you do a pull request instead of an issue?
Never did it, but I'll try today...
The issue
SHT4x often gives "i2cdev: Could not read from device [0x44 at 0]" error on measurement. ESP32C3
Corrected this way:
After that all errors gone...
Which SDK are you using?
esp-idf
Which version of SDK are you using?
5.1.2
Which build target have you used?
Component causing the issue
sht4x
Anything in the logs that might be useful for us?
No response
Additional information or context
No response
Confirmation