Skip to main content
Dat Tran
Senior II
November 13, 2023
Question

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

  • November 13, 2023
  • 1 reply
  • 1170 views

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?

 

 

 

 

 

 

This topic has been closed for replies.

1 reply

PatrickF
Technical Moderator
November 14, 2023

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.NEW ! Sidekick STM32 AI agent, see here
Dat Tran
Dat TranAuthor
Senior II
November 14, 2023

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