Skip to main content
PYada.1
Associate III
March 6, 2023
Question

How to repartition SRAM while using trust zone

  • March 6, 2023
  • 2 replies
  • 1338 views

I am using the SBSFU example of "NUCLEO-L552ZE-Q" Projects.

I have added my application code to the NON-Secure application project.

When I see "Region_defs.h", in which nonsecure (NS_TOTAL_RAM_SIZE ) size is 192 KB whereas secure (S_TOTAL_RAM_SIZE)size is 64 KB. Most of my application code is in the non-secure application.

If I want to repartition SRAM is it possible? If yes how can I do it?

I want to increase the nonsecure ram size to 235 KB, Is it feasible?

This topic has been closed for replies.

2 replies

PYada.1
PYada.1Author
Associate III
March 7, 2023

I have tried to increase the nonsecure ram to 235 KB, in this case, the application is not booting correctly. With 216KB of nonsecure ram, the application boots properly. Is there any other dependency as well to change nonsecure RAM size?

@Frantz LEFRERE , Can you please help me regarding this?

Fred
ST Employee
April 12, 2023

Hi @PYada.1​ ,

you can refer to this document: https://www.st.com/resource/en/user_manual/dm00678763-getting-started-with-stm32cubel5-tfm-application-stmicroelectronics.pdf

Section 8.3.2 explains the SRAM memory layout.

I am not sure you can easily change this because:

  • SRAM2 (64kB) is dedicated to the secure part.
  • SRAM1 (192kB) is dedicated to the non-secure part

I am not sure you can shrink the secure part.

If you want to do so, you must:

  1. make sure you keep the security protections consistent (see Figure 54)
  2. make sure the secure RAM size is still sufficient