I am facing an issue when I run my app on the EVK board. After downloading the application I receive rogue touch events on the TFT. The frequency and position of the touch are quite random.
Below is the polling method that I use to poll the I2C for the touch events:
Could you please clarify which example of the SDK are you using? I just tested several examples where the touch of the LCD is used and I didn't face any problems. Also, I noticed that you are using an old version of the SDK, I highly recommend you to upgrade it.
I did not face any issue with the example app. I used the emwin gui demo app.
But I am facing the issue with the app that I am developing.
I compared the touch polling method with that of the emwin app. Its the same as mentioned in the original post. And both use the same SDK 2.5.1 touch driver implementation.
Still I get the rogue touch events in my app and not in the demo app.
I have also checked the clock and I2C init functions.
The function LPI2C_MasterTransferBlocking(handle->base, &handle->xfer); returns kStatus_success with random touchUp and touchDown events.
How are you initializing the touch in your application? Are you using the drivers that we provide in the SDK for this purpose (fsl_ft5406_rt.c and fsl_ft5406_rt.h)? These drivers include all the functions needed to initialize the touch sensor of the screen and to read the touch data.
As mentioned in my previous response, I highly recommend you to upgrade your SDK to the newest version available.