2021-05-24 01:51 AM
Hello, I am trying to create external loader for MX25L12835F flash memory. My MCU is STM32H7B0RBTx and I followed "External QSPI loader how to" video series on Youtube. I used source files from the Github link that is shared below the videos. I had to change content of functions in quadspi.c file because STM32H7B0RBTx has OCTOSPI and contents of libraries are different. But I didn't change name of functions.
When I try this test code it can reach end of the code without any error so I can read memory in the debug screen.
After finishing test I include Dev_Inf.c, Dev_Inf.h, Loader_Src.c and linker.ld files. I used linker.ld for H7 devices to be sure that RAM start address is 0x24000000. In the Loader_Src.c file I only made these changes:
I compiled code and created .stldr file and prepare it for STM32CubeProgrammer.
When I try to read data STM32CubeProgrammer it says Data read successfully but it isn't showing correct data.
When I try to upload test binary file with these settings
I get this error.
Also in the test code it can delete sectors 0-2047, it cant delete 2048 and stuck in while loop. Device size is 16 MB and sector size is 4 KB so there must be 4096 sectors.
What am I doing wrong and how can I solve it? Thank you.
Solved! Go to Solution.
2021-06-16 10:09 PM
I will do that, thank you.
2024-01-06 10:18 PM
First off, I apologize in advance for reviving an old thread. I thought that I should add some important information for anyone who might end up here after a google search.
On newer versions of the CubeProgrammer (might apply to older versions too) it's important that the RAM address contains a 4-byte offset (for whatever reason). So for an H7 that would be 0x24000004. I found out the hard way after looking at the logs and realizing that CubeProgrammer adds an offset of 4 to the PC from the starting address. Looking at some example scripts confirmed this. See Linker Script H7.