Skip to content

Timing Issues Likely Related to Clock Holding #22

@mnewman401

Description

@mnewman401

I found a number of timing issues on the ESP8266 and ESP32 where the simple examples would not work with the CCS811. These are likely related to the fact that some I2C libraries (including the ESP32) do not support clock stretching. I have not verified that this is actually the reason for the failure.

In the existing libraries there was no error checking in the interactions with the device. There were a number of device interactions that did not always work. I added retries to work around this issue. I added error checking and perform retries on errors.

After a great deal of trial and error I was able to repair the library so it would work correctly on the SparkFun ESP32 Thing, the ESP32 Dev Module and my LOGGER ESP8266 board. The repaired code attached uses delays to make the interactions work. It should replace the existing modules cleanly. Error handling and retries are performed. Error reporting and some test code is included but turned off.

Also included is an enhanced simple test .INO that does a bit more reporting. The library fixes are important this test is not.

test.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions