2025-05-30 3:09 AM
2025-07-31 4:09 AM
Hi @Artur5,
In the STM32N6, there are 4.2 MBytes of internal SRAM plus 128 kB of TCM ECC. All the SRAM is contiguous and by default, it is divided into several blocks, for example: SRAM2, AXI SRAM1, AXI SRAM3, etc. In the application example, the SRAM2 memory located at address 0x34100000 is used by default. This SRAM2 region is limited to 512 kB. This limitation is due to the memory being shared with the BootROM (the memory used for microcontroller startup).
If you want to increase the memory available for your application, you can use other memory regions such as AXI SRAM1, SRAM3, SRAM4, or SRAM5. These regions are also parts of the internal SRAM but are not limited like SRAM2.
To change the memory region used, you need to modify the linker file. This file tells the compiler where to place your program and data in memory. By modifying this file, you can instruct the system to use, for example, AXI SRAM1 instead of SRAM2.
For more details, you can refer to the Reference Manual RM0486, section 10: SRAM Configuration Controller (RAMCFG). This document explains in detail how the memory is organized and how to configure it.
Another information is that in the STM32N6, it's also possible to execute code from external NOR Flash connected via XSPI2 or from external SRAM/PSRAM connected via XSPI1.
We have such examples in the STM32CubeFW_N6 under Examples and also Templates.
Thank you.
ELABI.1
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.