Page 1 of 1

STM32F469 Disco touchscreen

Posted: Thu Apr 20, 2017 11:55 am
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

Re: STM32F469 Disco touchscreen

Posted: Thu Apr 20, 2017 1:02 pm
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)

Re: STM32F469 Disco touchscreen

Posted: Thu Apr 20, 2017 1:10 pm
by LeighM
try this ...

Re: STM32F469 Disco touchscreen

Posted: Thu Apr 20, 2017 2:06 pm
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.

Re: STM32F469 Disco touchscreen

Posted: Thu Apr 20, 2017 2:16 pm
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.

Re: STM32F469 Disco touchscreen

Posted: Thu Apr 20, 2017 2:19 pm
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

Re: STM32F469 Disco touchscreen

Posted: Thu Apr 20, 2017 5:27 pm
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 355 times

Re: STM32F469 Disco touchscreen

Posted: Fri Apr 21, 2017 8:38 am
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.

Re: STM32F469 Disco touchscreen

Posted: Fri Apr 21, 2017 10:25 am
by stefan.erni
Hi Ben

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

Re: STM32F469 Disco touchscreen

Posted: Fri Apr 21, 2017 1:36 pm
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 331 times

Re: STM32F469 Disco touchscreen

Posted: Fri Apr 21, 2017 2:05 pm
by stefan.erni
Hi Ben

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