cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP15x: CM4 - Is it possible to combine SRAM2 and SRAM3 to one buffer

Dat Tran
Senior II

Hi, we need a buffer about 200KB on CM4 MCU (STM32MP153)

We change the linker file as below, that allow 256KB heap (combine SRAM2 and SRAM3)

DatTran_0-1699909132928.png

But every time the buffer has more than 0x30000 (192KB) then it is failed, seem we can't combine SRAM2 and SRAM3 into one buffer. If the buffer stays on SRAM2 or SRAM3 only then it works, but if the buffer starts on SRAM2 and the end is on SRAM3 then fail.

Does anyone know the reason?

 

 

 

 

 

 

2 REPLIES 2
PatrickF
ST Employee

Hi @Dat Tran 

SRAM2 is 128KB, SRAM3 is 64KB and SRAM4 is 64KB.

So, sound logical that SRAM2+SRAM3 is working up to 192KB.

What is the 'fail' you encounter ? bad data ? abort ? else ?

Maybe SRAM4 has some restriction for Cortex-M4 inside ETZPC or it is used by Linux which overwrite your data.
See https://wiki.st.com/stm32mpu/wiki/STM32MP15_RAM_mapping#Zoom_in_the_Cortex-A7-2FCortex-M4_shared_memory

Regards

In order 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.

Hi PatrickF,

The problem I am facing is "Failed pre launch" as picture below, when the buffer is start on SRAM2 and end is on SRAM3. But if I make buffer smaller like 100KB (stay only on SRAM2) or 32KB (moved and stay only on SRAM3) then the program runs fine. 

DatTran_0-1699967974520.png