cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in External events as triggers using TouchGFX.

ChintanParmar
Associate III

I am using External events as triggers example for reference.

https://support.touchgfx.com/docs/development/board-bring-up/example-gpio/

I have successfully changed box color with external events using STM32F429-DISC0 kit.

Now, I want to use USR_BTN ( only single button ) key for screen transition. I have add two interactions in TouchGFX Designer.

For that I have made two screens, and want to change screen whenever USR_BTN is pressed.

For example: Currently, I am on Screen1 and press the key then screen should be changed to Screen2 and vice versa.

But whenever USR_BTN key is pressed, screen is not transitioned smoothly. LCD will flicker for some time. I want smooth transition in between. What should I do for that?

0693W000000VrvMQAS.png0693W000000VrudQAC.png

1 ACCEPTED SOLUTION

Accepted Solutions

Martin,

Thanks for your reply.

I have managed it with by adding debounce time using HAL_Delay(). Now it is working fine. In TouchGFX Designer, we can add debounce time feature in Interactions.

View solution in original post

6 REPLIES 6
Martin KJELDSEN
Chief III

How did you create the project? I sound like a broken record 🙂 Flickering has little to do with the external events and more to do with configuration. So what is your configuration? etc

(Martin

0693W000000VuHKQA0.gifHi Martin,

I think, I have not properly write the question.

If I change box color through external event, it will trigger properly and box color is changed.

Even if I want to change Screen1 from Screen2 using external button it is working fine. But I want to change from Screen2 to Screen1 using same button.

I think that multiple times events gets registered and due to that LCD will continuously back and forth in Screen1 and Screen2. So it looks like flickering.

I have to add some delay or wait mechanism to correctly detect the button is properly pressed.

There is no option in TouchGFX for that. How will I do that?

Attached GIF for reference.

Sounds like you can just maintain the state of the button somewhere and figure out when you want it to one thing over the other. Either in seperate task, or in the receiving task (gui task). It's _very_ application specific so we wouldn't dream of adding support for something like that, however that might be done.

/Martin

Martin,

Thanks for your reply.

I have managed it with by adding debounce time using HAL_Delay(). Now it is working fine. In TouchGFX Designer, we can add debounce time feature in Interactions.

Okay, great @ChintanParmar​!

NMung.1
Associate II

Good evening, afternoon and morning for some, can someone help me on how to add more buttons for, I have tried with one button...it's working perfectly.

 "PhysicalButtons": [
      {
        "Key": 0,
        "Name": "KEY_2"
      },
      {
        "Key": 1,
        "Name": "KEY_1"
      },
      {
        "Key": 2,
        "Name": "KEY_0"
      },
      {
        "Key": 3,
        "Name": "KEY_UP"
      }
    ]

I have added this buttons to touchgfx and can be listed as HW triggers as shown in the picture below. But I don't really find the way to interface these keys with actual physical buttons or map them to the GPIOs I've set earlier