cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WLE5JBI6 SRAM memory address

JBoot.1
Associate II

I'm using the STM32WLE5JBI6 part which has 128kB Flash and 48kB SRAM but it is not clear what address these have as the STM32CubeMX generated linker and header files is for the 256kB Flash and 64kB SRAM part

Am I correct in thinking the layout for this part is as follows:

Flash start address: 0x08000000 length: 128K

SRAM1 start address: 0x20000000 length: 16K

SRAM2 start address: 0x20008000 length: 32K

If so this is quite strange as the SRAM memory is no longer contiguous but I can't see anything that says otherwise

1 ACCEPTED SOLUTION

Accepted Solutions
JBoot.1
Associate II

Okay thanks Remi, so the region 0x20004000 to 0x20008000 is unusable on the STM32WLE5JBI6 part due to it only have 16K of SRAM1?

View solution in original post

6 REPLIES 6
Remi QUINTIN
ST Employee

STM32WL variants are made such that there should be no need to modify the SRAM addresses => hence only one unique linker file to generate.

JBoot.1
Associate II

Hi Remi, thanks for the fast response!

If I don't change the linker file then my compiler is free to generate a >128kB application which won't fit in my part. The same is true for using too much RAM

In my application I am using more than 16K RAM for the data and bss regions combined so need to move them into the SRAM2 region but I don't know which address to use for this

Are you saying the SRAM layout is as follows?

SRAM1 start address: 0x20000000 length: 16K

SRAM2 start address: 0x20004000 length: 32K

Remi QUINTIN
ST Employee

SRAM2, up to 32 Kbytes is located at address 0x2000 8000

This is why the linker file always has this line

RAM2 (xrw) : ORIGIN = 0x20008000, LENGTH = 32K

JBoot.1
Associate II

Okay thanks Remi, so the region 0x20004000 to 0x20008000 is unusable on the STM32WLE5JBI6 part due to it only have 16K of SRAM1?

Remi QUINTIN
ST Employee

exactly!

JBoot.1
Associate II

Great, thanks Remi. I'll adjust the linker file so it warns me when I overrun it