cancel
Showing results for 
Search instead for 
Did you mean: 

GUI doesn't work anymore after I2C error

FLuba.1
Senior

For my project, an error message must display on the screen when there's a I2C related communication error. To simulate an I2C error, I pulled out the resistor that is connected between SDA and VCC(for good working of I2C communication, a resistor between VCC and SDA is necessary).

 

When I2C error communication occurs, I2C error callback is called, a lot of things are apparently deactivated such as systick timer etc, using of a delay halts the code(since tick value doesn't increase). The MCU can't enter presenter and view of touchgfx anymore.

 

What  can be done so that TouchGFX works again, so that I can display the needed error message on the screen)?

10 REPLIES 10
FLuba.1
Senior

Hi, by this message i want  communicate that unfornately, i couldn't fix this problem(the fact that GUI halts after I2C hardware error). I have used the following code(see attachment), in the hope that it will abort the I2C communication and put the pins of I2C to init state(GPIO), so that my error handler code(with the help of LCD screen) can communicate which error is present. The error handler that i use,  is not a generic error handler.

The only way to fix this problem is apparently by fixing the I2C hardware issue(so have the deactivate the device for this, the power On the device again). Is there no other way that when I2c hardware issue has occured, that SMT32 makes it possible to make TouchGFX code still functionable?