cancel
Showing results for 
Search instead for 
Did you mean: 

Using SRAM2a for standby mode on STM32WB15

rs-dp
Associate II

Dear ST members,

 

I am developing a BLE application with STM32WB15 that requires entering to standby mode, thus the need to retain some variables.

 

The standard linker script has the RAM_SHARED region defined as per below:

RAM_SHARED (xrw) : ORIGIN = 0x20030000, LENGTH = 10K

And, on this thread, your colleague advises with the remark "Note that the RAM_SHARED section is used (and reserved) to exchange data in between the 2 cores". I can only conclude that my application shouldn't use this region and I must define my own region on the linker script using some of the remaining sectors of SRAM2a. Now, with STM32CubeProgrammer I was able to read the security configuration option bytes and it shows me the following:

SBRSA_B, Value=0x0, Address=0x2000b000

SBRSA_A, Value=0xA, Address=0x20032800

QUESTION 1 - Having SBRSA_A pointing to 0x20032800 means that there are no more free sectors on SRAM2a. How is that possible?

QUESTION 2 - The datasheet specifies that SRAM2b starts at address 0x20038000 and ends at address 0x20038FFF. How is it possible that SBRSA_B is pointing to 0x2000b000?

 

On the application note AN5289, section 4.3, you have the following:

"SRAM2a: the end of available memory address can be moved up to the SBRSA address. When CPU2 update support required, there must be some free sectors just below the secure memory to support new CPU2 FW updates requiring more sectors to be secure."

QUESTION 3 - How many free sectors are required for CPU2 FW updates?

 

Ideally it would be great if you can provide an example for STM32WB15 that shows how to modify the linker script to have some variables stored on SRAM2a.

 

Thanks in advance

 

2 REPLIES 2
rs-dp
Associate II

...

STTwo-32
ST Employee

Hello @rs-dp 

Q1: SBRSA_A, Value=0xA, Address=0x20032800 means that the secure SRAM2a area is from the address 0x20032800 (included) to the address 0x20034999(included). so from 0x20035000 to 0x20037999 is free to use if there is not any other use case for this area.

Q2: This should be an error or a typo or something else. Could you please send a screenshot for this. 

Q3: That depend on the CPU2 FW size and needs.

Best Regards.

STTwo-32

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.