Need help with touch feature on STM32F429I-Discovery using new CubeIDE project and TouchGFX
I want to create the TouchGFX demo 3 (the animated bubbles) for my STM32F429i-Discovery board by creating a new project within CubeIDE.
I'm a total noob to this STM32 stuff, but thanks to you folks here and on YouTube I've got it working apart from the touch feature. If I tap the screen on the button, nothing happens.
The hardware is fine as I have downloaded other demos (non CubeIDE ones) and they work OK.
Below is a walk-through of how I create the project ( sorry, its pretty long).
I created the project without a real-time OS, which I assume is OK for this demo.
Maybe someone can tell me what I've missed for implementing the touch control.
Using:
Board: STM32F429I-DISC1
STM32CubeIDE Ver 1.3.0
TouchGX 4.13.0
EDIT: DO NOT USE THIS WALK-THROUGH. See the one further down this post.
// Creating a project in STM32CubeIDE with working display on STM32F429I-Discovery board.
// --------------------------------------------------------------------------------------
//
// In CubeIDE Start a new project either through the Help/Information Center or File/New/STM32 Project
//
// In Board Selector tab pick 32F429IDISCOVERY and click next.
// Add a project name and select C++ as the target language and click finish.
// Initialize all peripherals with their default mode ? click Yes
// also confirm yes to change perspective if shown.
// Once the project is created, the integral CubeMX designer appears.
//
// System Core:
// select GPIO. Then in "Configuration" tab select "SPI", set "Maximum Output Speed" to "Very High" for each signal.
//
// In Connectivity:
// SPI5: Set Mode to Half-Duplex Master, then below in "Parameter Settings" tab/Clock Parameters, Select "Prescaler (for Baud Rate)" to 2 and Set "Clock Phase (CPHA)" 1 Edge
//
// USART1: Disable
// USB_OTG_HS/Internal FS Phy: Disable
//
// In MultiMedia
// LTDC: In the Layer Settings tab set "Alpha Constant" for both "Layer 0 - Blending Factor" 1 and 2
// DMS2D: In Parameter Settings/Color Mode = RGB565
//
//
// Middleware:
// FREERTOS: Interface: Disable
// USB_HOST: Disable
//
// Select "Additional Software" tab at the top
// Open up the tree view for "STMicroelectronics X-CUBE-TOUCHFX" until you see Application and select "TouchGFX Generator" then click OK
//
// A new item "Additional Software" should now have appeared on the left. Open it and click on "STMicroelectronics X-CUBE-TOUCHFX"
// In the adjacent section, tick "Graphics Application"
// Now in the "TouchGFX Generator" tab under "Display" change "Interface" to Parallel RGB (LTDC)
// Then change Buffer Location to "By Address" and set Start Address to "0xD0000000"
// Then under "Driver" set "Application Tick Source" to LTDC and Real Time Operating System to No OS
//
// "Clock Configuration" tab
//
// The HSE input frequency should already be set to 8 and selected as the souce
// then set /M = /4
// *N = X180
// /P = /2
// (/Q should be greyed out)
// then over to the right:
// APB1 Prescaler = /4
// APB2 Prescaler = /2
// now non of the boxes should be red and the output frequencies should be:
// 180 Ethernet PTP Clock
// 180 HCLK to AHB
// 180 To Cortex system timer
// 180 FCLK Cortex clocks
// 45 APB1 peripheral clocks
// 90 APB1 timer clocks
// 90 APB2 peripheral clocks
// 180 APB2 timer clocks
// finally, at the bottom, in the PLL SAI section:
// *N = X54
// /R = /3
// PLLCDCLK = /4
// giving 9 as the "LCD-TFT clocks" output frequency
//
//
// Now click "Generate Code" from the "Project" menu
// Now close the tab with your project name.ioc, which will switch back to normal Eclipse perspective.
//
// Open the TouchGFX folder in the tree view and double click "ApplicationTemplate.touchgfx.part"
//
// This opens up TouchGFX designer (assuming it's installed)
// Select "Matching UI Templates" and click on TouchGFX Demo 3" and click "Select"
// Then click "Generate Code" top right button. Once done close the App
// Right click the Project and select refresh. You now see a file with your project name.touchgfx
//
// The project should now build without errors. Check by selecting: Project/Build All
// However it will do nothing if you download to the board and you'd just get a white screen.
//
// Now modify Core/Src/main.c by adding the code shown below into the relevant sections.
// Be sure to put the code only inside the commented sections, otherwise future code generation will delete it!
//
// Once done you can build the project.
// Now run it in debug: Right click the project, select "Debug As" and pick "STM32 Cortex M C/C++ Application"
// Leave the defaults and just click "OK"
// Once downloaded, the code will stop at HAL_Init();
// Now just click the "resume" button and the display should show the demo screen.
//
//
//
// in Main.c
