I am trying to find a way to load/execute code that is stored on an external SRAM chip without having to load it to the microcontroller internal memory. I'm not 100% sure of the name for what I'm trying to do but I think a memory mapping would work.
Reading the CMSIS driver for the board, this file (large file so no line numbers, but search for "#define APB1PERIPH_BASE" ) shows me that the peripherals of the boards, buses and such are already handled with memory mappings. So with this, I was thinking of mapping a region of code with an interrupt that would fire on memory accesses so I could fetch the data from the device using the SPI bus of my project's board. Doesn't need to be fast.
I thought also of using DMA but I'm similarly stumped.
I can't seem to find any definitive documentation either on creating a memory map or handling DMA with Peripheral->Device and Device->Peripheral transfers. I have a bunch of documentation on DMA internals but nothing with concrete information regarding memory maps.
I'm assuming that the STM32Cube CMSIS library has specific initialization code to setup the existing memory maps for the board but it must be using a precompiled driver because I can't see the source files, only headers.
I'm otherwise lost in the vastness of the ARM documentation and it is taking a long time to skim the documentation since I can't exactly name the thing I need in the same terms as in the documentation.
To keep it in simple terms, how can I create a memory map for an STM board using the STM32CubeF7 so I can transfer information to and from an external chip without loading/storing parts of the data in the main microcontroller memory.
Code examples would be great but I'm also looking for documentation for how it works in details.
EDIT 1 :
I have begun reading in more details the ARM Cortex M7 - Generic User Guide (page 28), and it in they mention a range of memory used for External RAM. What I am really looking for is how to wire up external RAM on my board to be used as external RAM.
I will keep analyzing the document but I have not seen specific documentation on using external SRAM chips as an ARM external RAM.
EDIT 2 :
I have found several questions on StackOverflow regarding programming STM boards with external memory chips. One of them was using FMC and it linked to a document by STM. Now I think I understand better what the current situation is and what the answers and comments on this question were saying.
Since I am using SPI right now, it would be impossible to map this directly to memory. Instead there are protocols like FMC and QuadSPI (or QSPI?) where the protocol and external chip specs can function with memory mapping. The linked document above (AN4761) shows examples on how to setup such functionality using SRAM, NAND and other chip types.
Reference material :
- Board : STM32F756zg Nucleo https://www.st.com/en/evaluation-tools/nucleo-f756zg.html
- Platform : STM32CubeF7 https://github.com/STMicroelectronics/STM32CubeF7
- ARM M7 Generic User Guide http://infocenter.arm.com/help/topic/com.arm.doc.dui0646a/DUI0646A_cortex_m7_dgug.pdf
- Using STM32L476/486 FSMC peripheral to drive external memories https://www.st.com/content/ccc/resource/technical/document/application_note/3f/38/6c/cc/0b/7b/41/b7/DM00228015.pdf/files/DM00228015.pdf/jcr:content/translations/en.DM00228015.pdf