Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2C fix READ of zero bytes hardware hang #2301

Merged
merged 1 commit into from
Jan 10, 2019

Commits on Jan 10, 2019

  1. I2C fix READ of zero bytes hardware hang

     The i2c peripheral will hang if a READ request is issued with a zero data length.  The peripheral
    drops into a continuous timeout interrupt response.  The STOP command can not be set out to the I2C
    bus. The SLAVE device correctly ACK'd the address byte, with READ bit set, it has control of the SDA
     pin.  The ESP32 send out the next SCL HIGH pulse but, since the SLAVE is in READ Mode, and the First
    bit it is sending happened to be a ZERO, the ESP32 cannot send the STOP.  When it releases SDA during
    the SCL HIGH, the pin does not change state.  The pin stays low because the SLAVE is outputing a LOW!
    The ESP32 drops into a perminent WAIT state waiting for SDA to go HIGH (the STOP).
    
    **esp32-hal-i2c.c**
    * add databuff length checks to `i2cRead()` and `i2cWrite()`
    stickbreaker authored Jan 10, 2019
    Configuration menu
    Copy the full SHA
    a10b510 View commit details
    Browse the repository at this point in the history