cancel
Showing results for 
Search instead for 
Did you mean: 

Touch event problem

S.Mirza
Associate II

Hi. I generate a touchgfx project that toggle an led by pressing a button. the problem is trigger action by clicking button is randomly happen. the problem comes from that the touch function gets some touch sample and they slightly different .How do I fix this Issue?

12 REPLIES 12
Alexandre RENOUX
Principal

Hello,

Could you provide more information, pieces of code, something that showcases your issue ?

/Alexandre

S.Mirza
Associate II

I just add toggle button code inside button function. I'll send a video for show the case.

http://s13.picofile.com/d/8397941400/e2cf349d-b62d-433b-8a0a-e69cf4fcbc38/buttonProblem.mp4

Karan 123
Senior

Hello,

Please send us code . I haven't faced this issue.

--

Karan

S.Mirza
Associate II

Ok. This is my code. I create two button. one for turn LED 'ON' and another for Turn it OFF.

http://uupload.ir/filelink/79GxOweRqBbx/1t23_video6.rar

Alexandre RENOUX
Principal

Hello,

Can you upload this .rar project and .mp4 video directly on this thread instead ?

You will find a a paper clip logo on the left of the button "Answer" that allows you to enclose files.

Also what board are you using ? What version of TouchGFX Designer ? What IDE ? Please provide these information for us to have a better overview of your setup.

/Alexandre

S.Mirza
Associate II

Hello,

Unfortiunatly I couldn't upload the code files here maybe because the size.

I used a costume board with stm32f429ig microcontroller, XPT2046 Touch Screen Controller, MT48LC16M16A2P SDRAM.

touchGfx 4.13.0, cubeMx 5.6, IAR 8.2.

If you couldn't download the code file from the URL that I sent, please give me an email address to send that.

Hello,

Can you provide the gui/ folder and .touchgfx file ? This should be very small in size.

It might also be a problem regarding your touch controller implementation. Please provide also the code of your touch controller implementation.

How did you create your application ?

/Alexandre

S.Mirza
Associate II

I used cubeMx to create the project. I added the touchGfx v 4.13.0 to the cubemx. the I open the ApplicationTemplate.touchgfx.part file inside the Src folder that created by cubeMx. In the touchGfx I just addet two button and define two interaction "call new virtual function". I opened the IAR compiler and add some code to turn on and turn off the LED. I added these code in Screen 1ViewBase.hpp file. When I simulate the project it work fine but when I programe it on the hardware the problem show up. I attach the touch screen files.

Alexandre RENOUX
Principal

Hello,

Have you tried debugging with IAR ?

When you press the button on your screen does it go correctly into the sampleTouch function in STM32TouchController.cpp ?

How do you propagate the touch event to your GUI ?

/Alexandre