How to use External Loader to load initialised data into NOR Flash on Octo-SPI interface on STM32L552E-EV
- August 27, 2021
- 1 reply
- 890 views
Hi all,
I'm working on an STM32L552E-EV and trying to declare some constant data into the NOR Flash connected on the Octo-SPI interface. I want to have the Octo-SPI in memory-mapped, so that the constant arrays can be accessed easily in my code. To initialise the memory with the constant data I'm trying to use the available External Loader in CubeIDE, but the data doesn't get loaded.
My starting point was the 'OSPI_NOR_MemoryMapped' project available in the STM32L552E-EV examples. This example runs perfectly.
In order to load the data via the external loader i've made the following changes to the example
- added 'OSPI' memory and '.ospi_data' section (linker file attached)
- Select external loader 'MX25LM51245G_STM32L552E-EVAL, 0x90000000, NOR_FLASH, MX25LM51245G_STM32L552E-EVAL.stldr' in launch config properties.
- Added data array stored in 'ospi_data' section
- Commented out code segments in example to erase memory, and write and read from memory.
I've attached the linker file and modified 'main.c' file from the example.
I've done the same with the STM32F746-DISCO with NOR Flash on QSPI and an external loader and that works perfectly, but struggling to get this to work. Any help would be appreciated!
Thanks,