Jump to content

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


stechy1

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

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...