Hi @Nili
while reading the touch IC (GT911) documentation I found that there is a mechanism which allows to select which of two I2C addresses should be used. Depending on how the touch INT line is driven by the ESP32 (low or high) when the reset line goes back to high, either I2C address gets selected.
But since the touch INT line is connected to GPIO36 of the ESP32 and GPIO36 is an input only GPIO the ESP32 cannot drive it. From the ESP32 documentation:
GPIO34-39 can only be set as input mode and do not have software pullup or pulldown functions.
I further found that the 10k pull-up resistor (R87) on the touch INT line, listed in the schematics, is not populated in my M5Paper. I guess this mean when the touch IC is not driving the INT line it is floating and the touch IC could end up with either I2C address.
Now, in the GT911 library I found the following code in function begin() which I tries to figure out which I2C address the touch IC actually started up with:
Wire.beginTransmission(0x14);
if (Wire.endTransmission())
{
Wire.beginTransmission(0x5D);
if (Wire.endTransmission())
{
log_e("Touch screen IIC connection error");
return ESP_FAIL;
}
_iic_addr = 0x5D;
}
I wonder if that auto detect mechanism fails sometimes leaving the touch IC with one I2C address and the ESP32 trying to talk to it with the other?
Thanks
Felix