Skip to main content
Andi
Associate III
Nov 6, 2019 9:56 AM UTC
Question

The display is not reacting on touch

bool STM32F7TouchController::sampleTouch(int32_t& x, int32_t& y) is working as it can be tested by setting a breakpoint. The display is running as it is tested with an animated image that runs fine.

It runs fine in simulator but not on stm32f746G-discovery (Working with STM32CubeIDE 1.1.0) : The display is not reacting on button pressed at all.

Any hints to get the touch working with the display are welcome.

This topic has been closed for replies.

7 replies

Martin KJELDSEN
Principal III
Nov 6, 2019 10:15 AM UTC

So you've tried breaking inside the touch controller and inspecting that the actual coordinates that you're pressing are what's being read back?

/Martin

Andi
AndiAuthor
Associate III
Nov 6, 2019 10:32 AM UTC

The coordinates seems to be plausible (126, 300).0690X00000ArjmzQAB.png0690X00000ArjmuQAB.png

Martin KJELDSEN
Principal III
Nov 6, 2019 10:36 AM UTC

How did you create this project? Through the designer? CubeMX -> CubeIDE ?

Could you try overriding handleClickEvent(ClickEvent& event); in your view and breaking in there?

/Martin

Andi
AndiAuthor
Associate III
Nov 6, 2019 2:08 PM UTC

I use the most current versions STM32CubeIDE 1.1.0, TouchGFX 4.12.3 Designer but I started with an older versions und migrated to the newest in the last two weeks.

What do you mean with “in your view�?. Do you mean code in the TouchGFX/gui folder? It might be possible that there is some code missing in my application because I only see some virtual methods in the debugger. See the other question “Behind FreeRTOS and TouchGFX Interaction�? in this forum.

Please give me the folder to find handleClickEvent(ClickEvent& event) so I will post the snipped here.

Martin KJELDSEN
Principal III
Nov 6, 2019 2:11 PM UTC

In your gui/ folder you have a file that defines a class which inherits from its base-equivalent generated by the designer. You can implement handleClickEvent in this view in order to receive click events in your view (and intercept/steal them from any widgets on that view).

in your header file:
 
virtual void handleClickEvent(ClickEvent& evt);
 
 
in cpp:
 
void MyView::handleClickEvent(ClickEvent& evt)
{
 //write some code here and break
}