Jump to content
stechy1

FreeRTOS + uGFX + STM32F429i + ILI9341 (display) + STMPE811 (touch)

Recommended Posts

Hello,
I have working basic project with FreeRTOS and uGFX library. Display is finaly showing what I want, but there is a problem.
For now, I have one button with a label. When I press the button, then the label should change it's text, but nothing happening.
I have done little bit of debugging and find out, that:
- my touch driver can recognize, that there is some touch event
- also my driver sucessfully read x and y coordinations
- after that it continue in input processing in file: ginput_mouse.c
On line 300 in that file there is code, that notifies listeners that are interested about touch event. I have registred listener, but nothing happening.
At the bottom there is a link to full project, that should be compilable out of box. Im using System Workbench for STM32.

Can anyone help me, what I'm doing wrong?

Link to project: http://leteckaposta.cz/768971070

Share this post


Link to post
Share on other sites
6 hours ago, stechy1 said:

Program get stuck at line 179: pem = (GEventMouse *)geventEventWait(&gl, TIME_INFINITE);

That is normal behaviour as you ask to wait indefinitly for an event that never comes. Biggest chance is that the failure is somwhere in the STMPE811 driver.
I will look at your code tomorrow to see if I can catch something.

Share this post


Link to post
Share on other sites

Alright, I think, that I found the problem.
I have button on coordinates {x:10; y:30} with size {width:100; height:30}
When I touch the display where is the button, the driver will reads values {x:173; y:283} and this is a problem. But I have tested, that driver reads true values. When I subtract x value from width and y value from height, I get right values.
So the question is, where I should subtract these values?
The screen orientation is default btw.

Share this post


Link to post
Share on other sites

You need to turn in touch calibration rather than trying to work with driver based auto-calibration. In this case your touch panel is not oriented correctly relative to your display for that to work.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...