2025-03-14 1:38 AM
In my project, I intend to use an external serial flash to hold UI assets as recommended by TouchGFX.
I have followed this: https://community.st.com/t5/stm32-mcus/how-to-implement-and-use-your-own-external-flash-loader-an/ta-p/597752 but I only get flash erase errors from the STM32CubeProgrammer.
The main issue that I see is that this project also needs to have the secure flash feature active, which is where I believe that the problem lies.
Does anyone know if external flash loaders works with Secure Flash enabled? If so is there a white paper or document describing how to make both work?
Thank you.
2025-03-17 6:14 AM
Hello @RW3562
Very interesting use case that I will share internally. I need more details:
"Does anyone know if external flash loaders works with Secure Flash enabled?" can you share the reference of the external secure Flash ?
Best Regrds
2025-03-17 6:44 AM
Hello @RW3562 and welcome to the community;
"The main issue that I see is that this project also needs to have the secure flash feature active, which is where I believe that the problem lies."
I don't think the erase issue is related to flash secure.
Which memory are you using?
Could you please check the memories characteristics in Dev_Inf.c file?
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-03-21 1:06 AM
Hello Kaouthar
I'm using a N25Q128A external flash.
The contents of Dev_Inf.c is:
struct StorageInfo const StorageInfo = {
"my-board-loader", // Device Name + EVAL Borad name
NOR_FLASH, // Device Type
0x90000000, // Device Start Address
0x01000000, // Device Size
0x1000, // Programming Page Size
0xFF, // Initial Content of Erased Memory
// Specify Size and Address of Sectors (view example below)
0x00000100, 0x00010000, // Sector Num : 1024 ,Sector Size: 64 KBytes
0x00000000, 0x00000000,
};
The truth is that I don't know what is causing the failure, so I assumed that since the internal flash on the STM32U5 is protected with secure flash, the access to peripheral hardware could also been blocked by the secure flash protection.
2025-03-21 1:08 AM
Hi CMYL,
The external flash is a common N25Q128A flash. It's the internal flash on the STM32U5 that's secured - which I'm assuming could be blocking access to the external flash.
Thanks