on 2018-07-23 04:29 AM
How to enable the touch capability of the STM32F746G-Discovery board screen for GUI application ?
By default the touch capability of the display is not enabled and this is not handled by the CubeMX tool.
This document will guide you through the few steps needed to get a functional touch screen based on an existing GUI application.
Setup review:
- a CubeMX v4.26 graphic application project for STM32F746G-Discovery
- the chosen IDE is Atollic
- the graphic library is STemWin
- the Cube Firmware is the STM32Cube_FW_F7_V1.11.0
In this section wil will quickly create a basic GUI composed of 2 buttons and generate the corresponding Atollic project.
This part is covered quickly since it is described in more details in the dedicated FAQ: STM32F746G-Discovery : Create a basic Graphical Application using CubeMX, feel free to refer to it.
Since some include files have been imported you must add their parent folder in the include folder list.
Note that the added include directives are kept despite the re-generation of source code !
Let's keep on adding the specific code between the USER tags.
Touching the Button 0 (top left corner of the screen) will hide the second button, clicking it again will make the second button appear again !
You now have a functional graphic application with the touch screen capabilities enabled and since all the additional source code has been added in specific user sections you are free to enable and configure other peripherals from the CubeMX tool and re-generate the source code without loosing it.
The full final project is provided in here.
Customer Note: 1) You can contact the author of this article by clicking on name provided as “Created By” info. 2) All other comments or feedback you can post by email to community@st.com 3) If you need specific (product) support please refer to our Support Center(https://www.st.com/content/st_com/en/support/support-home.html) where you can choose from a variety of online support options and select a service which fits your requirements best. |