2026-04-27 1:57 AM - last edited on 2026-04-30 2:17 AM by KDJEM.1
Hi Community,
I am using STM32H745I-DISCO board and generated a TouchGFX project and attempted to flash/debug from CubeIDE. The flashing process fails during the erase stage.
I am using STM32CubeIDE v1.18.1 and STM32CubeProgrammer: v2.16.x
I have attached screenshots.
Can someone help what could be the issue?
Thanks.
2026-04-27 3:22 AM - edited 2026-04-27 3:23 AM
Hello,
@Tharun123 wrote:
- In CubeProgrammer:
- External flash is detected when selecting loader MT25TL01_STM32H745I-DISCO
- However:
- Mass erase fails
- Sector erase also fails
- Error message:
- “Sector erase operation has failed… please verify flash protection”
Based on this statement I have the impression there is a problem with the external memory.
Try to run the QSPI example provided in CubeH7: https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H745I-DISCO/Examples/QSPI/QSPI_MemoryMappedDual
If it doesn't work there is an issue with the external memory, either the memory is broken or there is something gone wrong on the board/PCB!
2026-05-05 11:22 PM
Hi mƎALLEm,
I tried the QSPI_MemoryMappedDual example from CubeH7 on the STM32H745I-DISCO board.
Results:
The example flashed successfully
It ran successfully without any errors
QSPI erase/write/read operations are working correctly
I also tested another example:
LTDC_Layer1
The image is displayed correctly on the LCD
So it looks like:
QSPI hardware is working
External flash is working
LCD/LTDC is also working
However, when I generate a simple TouchGFX project (small image only):
If I flash without enabling external loader:
Flashing succeeds
Code runs
But nothing appears on the display
If I enable and initialize the external loader:
I get:
“Failed to initialize external memory”
“Error in initializing ST-LINK device”
At this point I am confused about the correct workflow for TouchGFX on STM32H745I-DISCO.
Could you please clarify:
What is the exact process to generate and flash a TouchGFX project on STM32H745I-DISCO?
Is external QSPI flash mandatory even for a very small image/UI?
Which external loader should be selected for this board?
Are there any specific TouchGFX memory configuration settings required for this board?
Thanks.
2026-05-06 2:06 AM
Hello,
I don't have your project so I couldn't tell what problem you have.
I've attached a TouchGFX project running on STM32H745I-DISCO board.
You can use the TouchGFX Designer tool to directly generate code, compile, simulate and upload the application.
As shown in the below screenshot:
1- You need to generate the code by clicking
2- (Optional step) to compile and simulate the graphics on PC:
3- To Compile and upload your TouchGFX application to the target (The DISCO board in your case):
With the attached project, please test it by following step 1 and step 3. You should see this screen in the LCD: