STM32F469 Disco touchscreen
Moderator: Benj
-
- 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
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.
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.
- Attachments
-
- Flowcode_stm32f469i_touchscreen_test.fcfx
- (20.02 KiB) Downloaded 348 times
- 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
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
also posts will get more relevant attention
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
also posts will get more relevant attention
- 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
try this ...
- Attachments
-
- Flowcode_stm32f469i_touchscreen_test 2.fcfx
- (22.73 KiB) Downloaded 332 times
-
- 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
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.
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 315 times
-
- 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
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.
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 350 times
- 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
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
I've added the issue to our internal system, to see if we can improve things
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- 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
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.
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.
-
- 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
Hi Ben
Just a small info about it. The simulation of the Display is not working with the IRQ.
Just a small info about it. The simulation of the Display is not working with the IRQ.
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- 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
Hi Ben
I did something like this.
and
"remembering to re-enable" if not flicker will remind me.......
I did something like this.
and
"remembering to re-enable" if not flicker will remind me.......