cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB Shared RAM

marc6hbbs
Associate

Hello, on STM32WB is it possible to use shared RAM for the user app?

For example, I have the following on my STM32WB15CC:

FLASH (rx)                 : ORIGIN = 0x08000000, LENGTH = 162K
RAM1 (xrw)                 : ORIGIN = 0x20000008, LENGTH = 0x2FF8
RAM_SHARED (xrw)           : ORIGIN = 0x20030000, LENGTH = 10K

ram3.png

Does that mean unused RAM above the last object (APPD_GeneralConfig) can be used by the user app?

1 REPLY 1
OliM
Senior

At least on WB55 and WB35 there is room above the shared part before the SRAM2 area of the second core starts. SBRSA gives info about which part is actually accessed by the second core.
This is how I use it:

/* Specify the memory areas */
MEMORY
{
FLASH (rx)                 : ORIGIN = 0x08000000 + APP_SLOT0_APP_OFFSET, LENGTH = APP_SIZE /* (OTA in the first Blocks, peripheral only stack starts at end + dataflash)*/
RAM1 (xrw)                 : ORIGIN = 0x20000000 + APP_RAM_OFFSET, LENGTH = APP_RAM_SIZE
RAM_SHARED (xrw)           : ORIGIN = 0x20030000, LENGTH = 3K   /* should be enough for MB_MEM1 and MB_MEM2 both here and in bootloader */
RAM2 (xrw)                 : ORIGIN = 0x20030C00, LENGTH = 15K  /* checked available space in SBRSA */
}