cancel
Showing results for 
Search instead for 
Did you mean: 

The button pressed animation is displayed but the callback is not executed every time the button is clicked

Touftoufe
Associate II

Hi everyone,

I am a student and I am working on a project involving an STM32f429ZI and a 7inch touch display.

It's the first time I work with displays, I am trying to create a GUI using touchgfx.

I have been working on it for a week now and so far I managed to :

  • Implement the display and touch panel drivers (8080 MCU interface using FMC + I2C)
  • generate the touchgfx files with cubeMx :
    • I'm using partial framebuffers
    • No OS
    • DMA2D hardware acceleration
  • Complete the functions needed (flushFrameBuffer, signalVsync, sampletouch, ... etc)
  • Create a basic GUI with a little animation and a button + interface with hardware buttons

The GUI is correctly displayed and work well on the screen, and the button animation is shown when I click on it, the only problem is that the button callback function isn't called every time I press on it.

(I mean, I have to press the button on the screen very fast several times until the callback function is finally called. When I use the debugger it works fine though)

Thank you very much for your time

4 REPLIES 4
Martin KJELDSEN
Chief III

First of all, sounds like you did a good job getting everything almost-working!

The UI responds according to touch input - Did you check your touch controller if you're always getting the right coordinates? And if touch is detected?

/Martin

Thank you.

Well, as I said, the touch seems to be detected because we can see the button being pressed and released every time I click.

(And when I start the debugger, all works fine, the coordinates are correct and the callback is called. But when the application is normally running without the debugger, it ignores the callback)

You can watch a demo here : https://drive.google.com/file/d/1lfvaBoGG-RwjKrS1Rngw5LAUuasnZ3MS/view?usp=sharing

Touftoufe
Associate II

Hello,

I tried to look every where in my code and I didn't found any thing that could explain that behavior, so I decided to create a new clean project and guess what? Every thing works fine. I don't know what detail I missed in my previous code, I wonder what went wrong, but never mind.

Thank you for your help once again :)

I missed the part where you said that the button was always being pressed, indicating that touch coordinates are correct. Strange behavior - Not something i can immediately pin point without actually trying the project, but since you already solved it :) Great