GTT43a I2C Bug
Posted: Sun May 06, 2018 11:35 am
I have a loop that does I2C reads...
essentially like this
while(1)
{
x = read
print x
}
When you run this you will get 0's ... until there is something in the buffer... this is good.
I have a screen with a legacy button. Every time you press the button it puts 252,135,0,2,0,7 into the buffer... when that happens you can see a string of 0's then the message... then more 0's ... that is good.
What is notice is that if you press the button on the screen... really fast... it will eventually cause the I2C to hang.... when it hangs... SDA becomes stuck at 0...
I am guessing that the mcu on the gtt43 doesn't clock stretch...
Or maybe when you make the mcu busy by touching so frequently it hangs the I2C bus.
I also notice that if I put a delay in the loop... the longer the delay the less likely it is to hang... this makes me think that if the CPU is busy writing to some buffer and you do an I2C read that it hangs.
There are tons of obvious problems with the delay... so id rather not have it.
Has anyone else seen this bug? Any known solutions?
To unhang the i2c bus you have to
1) Power cycle the screen
2) send it 8 SCLs of 0..
essentially like this
while(1)
{
x = read
print x
}
When you run this you will get 0's ... until there is something in the buffer... this is good.
I have a screen with a legacy button. Every time you press the button it puts 252,135,0,2,0,7 into the buffer... when that happens you can see a string of 0's then the message... then more 0's ... that is good.
What is notice is that if you press the button on the screen... really fast... it will eventually cause the I2C to hang.... when it hangs... SDA becomes stuck at 0...
I am guessing that the mcu on the gtt43 doesn't clock stretch...
Or maybe when you make the mcu busy by touching so frequently it hangs the I2C bus.
I also notice that if I put a delay in the loop... the longer the delay the less likely it is to hang... this makes me think that if the CPU is busy writing to some buffer and you do an I2C read that it hangs.
There are tons of obvious problems with the delay... so id rather not have it.
Has anyone else seen this bug? Any known solutions?
To unhang the i2c bus you have to
1) Power cycle the screen
2) send it 8 SCLs of 0..