STM32F469 Disco touchscreen

An area to discuss ARM specific problems and examples

Moderator: Benj

Post Reply
stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

STM32F469 Disco touchscreen

Post by stefan.erni »

Hi Ben
At first, it's nice to program the touchscreen with FC7.

There is only a small problem. If I touch to long (even it's not on the button ) the "Screen" is moving in x-direction.


I have written a program to show this. I tried on an another board, it's the same.
touchscreen_test2.PNG
(757.4 KiB) Downloaded 6907 times
Attachments
Flowcode_stm32f469i_touchscreen_test.fcfx
(20.02 KiB) Downloaded 335 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32F469 Disco touchscreen

Post by LeighM »

Hi,
Yes, I too have seen some flicker of the display whilst it is updating.
We will need to look into if we can synchronize updating of the display.
Maybe in your program you are repeating the update whilst the touch is made?
Could it instead update once, then wait for touch release?
I'll have a look at your program.
Leigh
btw. Could you post on the Flowcode V7 forum?, rather than General Programming,
otherwise the sys admins will be after us :wink:
also posts will get more relevant attention 8)

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32F469 Disco touchscreen

Post by LeighM »

try this ...
Attachments
Flowcode_stm32f469i_touchscreen_test 2.fcfx
(22.73 KiB) Downloaded 322 times

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: STM32F469 Disco touchscreen

Post by stefan.erni »

Hi Leigh

Thank you for the program. I think you are right.
Update the display while touched give some problems
I tried and it's 'better but it's unfortunately not good enough.
I still have a some problem.
For a test I used the LED's and not the Screen
but of course this is not a solution.
Attachments
Flowcode_stm32f469i_touchscreen_test_led.fcfx
(22.41 KiB) Downloaded 303 times

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: STM32F469 Disco touchscreen

Post by stefan.erni »

Hi Leigh
I did an another test. Just update the display every second .NO TOUCH fuction includet and I have the flicker.
Maybe it's more a problem of the display.
Attachments
Flowcode_stm32f469i_touchscreen_test_no_touch.msg.txt
(88.98 KiB) Downloaded 337 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32F469 Disco touchscreen

Post by LeighM »

OK, yes it's the updating of the screen data that causes the effect,
I've added the issue to our internal system, to see if we can improve things

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: STM32F469 Disco touchscreen

Post by Benj »

Hello,

I believe this device has an extra interrupt available called DISPLAY UPDATE. If you perform your LCD updates inside the interrupt macro or just after the interrupt has fired then this should help to overcome the flickering issue.

Here is a modified version of Leigh's example which waits for the interrupt to fire before drawing to the display. Now running 100% flicker free for me.
Flowcode_stm32f469i_touchscreen_test 3.fcfx
(24.1 KiB) Downloaded 348 times

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: STM32F469 Disco touchscreen

Post by stefan.erni »

Hi Ben
Thank you for the help. Yes there is no flicker anymore. I used the IRQ in my other programs and there is also no flicker anymore.

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: STM32F469 Disco touchscreen

Post by stefan.erni »

Hi Ben

Just a small info about it. The simulation of the Display is not working with the IRQ.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: STM32F469 Disco touchscreen

Post by Benj »

Hello,

Yes the simulation will not currently work correctly because simulating the interrupt is tricky.

What I might do is place the variable reset and while loop into a macro that you can call at various parts of your program whenever you need to write to the LCD. Then it is simply a case of disabling the while loop icon when simulating and remembering to re-enable the while loop when downloading.

Another workaround would be to add a timeout to the while loop, e.g. a max number of times to wait for. This might also help avoid lockups on the hardware if for some reason the LCD interface is ever switched off e.g. to temporarily save power when not being used.
Flowcode_stm32f469i_touchscreen_test 4.fcfx
(25.12 KiB) Downloaded 321 times

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: STM32F469 Disco touchscreen

Post by stefan.erni »

Hi Ben

I did something like this.
and
"remembering to re-enable" if not flicker will remind me.......

Post Reply