228 views
in Getting started by
Hi guys,

I just get my stm32f429 board and want to create a GUI of my own. While getting familiar with the board and software (studio free), I find the touch screen was showing bug:

The touch screen was opposite with the display --- in the "BrickGame", when I move my finger to right, the board (that would bouce the ball) move to left, when I move my finger to left, the board move to right.

I change another example --- in the "AnimatedList", the display on the screen from left to right was "hour", "minute", "date", when I put my finger on the right, i.e. cover "date" and try to adjust it, the "hour" part was moving instead. And when I was trying to adjust "hour", "date" changed instead.

 

Could anyone please help me understand it and how to fix it?

1 Answer

+1 vote
by

Hello,

please try the example 'ScreenOrientation' - it contains a small cross that follows the finger. By using this example you can detect if and how your touch screen works.

Normally, the touch configuration should work without any modifications - if necessary, you can adapt the touch orientation and calibration within the file ewconfig.h.

Hope this helps...

Best regards,
Manfred.

 

 

by
Thank you, I tried the "ScreenOriantation" project, and the touch screen on the 480 px side was really opposite...

I'll check the 'adapt the touch orientation and calibration' part.
by
This sounds strange... the display is 320x240 pixel - where do you have a "480px side"?

Anyhow, it would be good to understand why there is the need on your target to change one of the EW_TOUCH_AREA_MIN / MAX values?

What board revision do you have?
by
Sorry my bad, I confused the display with another board, I meant the longer side.

It prints stm32f429i-disc1 on the board, but the board is blue, I think it's stm32f429i-E01
by

Thanks for the clarification.

According to UM1670 User Manual from ST, the pins YU and YD (touch up and touch down) have been swapped with revision E01 of the STM32F429 Discovery board.

So it is necessary to make the following settings in ewconfig.h:

#define EW_TOUCH_AREA_MIN_X                    0
#define EW_TOUCH_AREA_MIN_Y                    320
#define EW_TOUCH_AREA_MAX_X                    240
#define EW_TOUCH_AREA_MAX_Y                    0
#define EW_TOUCH_SWAP_XY                       0

Best regards,
Manfred.

 

by
Fixed as you expected,

thank you so much, especially about the part explaining the switching pin.

I'll take closer looks into the theories and the codes.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...