cancel
Showing results for 
Search instead for 
Did you mean: 

Transition from onboard RAM to external SRAM for STM32H753

RandyB_42
Associate

I am working on a new design using the using the STM32H753XIH6.  The microcontroller has 1Mbyte of RAM onboard.  The software requirement calls for 4Mbyte of RAM.  I plan to add 4Mbyte of SRAM using the FMC parallel bus.  How does the STM32H753 handle the transition from onboard RAM to off chip RAM data?  Any tips or recommendations for implementing the design?

I have also wondered how this same situation would be handled with the FLASH portion of the memory, but that might call for another thread to be started for that answer.

Thank you

2 REPLIES 2
Pavel A.
Super User

TL;DR the FMC of STM32H7 allows what you want. Note that it consumes many pins. Choose a suitable MCU variant. For external flash: FMC again (parallel flash) or QSPI.

The best way to start: get a STM32H7-EVAL board which has both external RAM and flash. Run provided examples, see how it works.

 

mƎALLEm
ST Employee

Hello @RandyB_42 and welcome to the ST community,

Indeed that's possible but you need to consider two thinhs:

1- The FMC and the corresponding GPIOs needs to be intilized before to jump to main (at the scatter load phase).

For example in the examples provided in the CubeH7, there are the following defines: DATA_IN_ExtSRAM and DATA_IN_ExtSDRAM

Each one activates the initialisation of an external memeory: SRAM or SDRAM.

Look at system_stm32h7xx.c implementation for STM32H743-Eval board especially the implemzntation of:

void SystemInit_ExtMemCtl(void)

It initilizes the GPIOs and the FMC interface of the external RAM memories on the STM32H743-Eval board. That SystemInit_ExtMemCtl() is called before the main().

You can refer to the example provided in the STM32CubeH7 package: https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H743I-EVAL/Examples/FMC/FMC_SDRAM_DataMemory.

2- The data read/write relocation needs to be done with the linker file. 

Refer to the X-CUBE-PERF-H7 and open the project "6 - D1_ITCM - D1_SDRAM" the code is located in ITCM and all the data are located in SDRAM. So refer to that project linker file implementation. The application note linked to that X-CUBE-PERF-H7 package is the AN4981 "STM32H72x, STM32H73x, and single-core STM32H74x/75x
system architecture and performance". You can find valuable information there.

Hope that answers your question.

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.