2. Memory and bus architecture

The STM32L552xx and STM32L562xx devices are ultra-low-power microcontrollers (STM32L5 Series) based on the high-performance Arm Cortex-M33 32-bit RISC core. They operate at frequencies up to 110 MHz.

The Cortex-M33 processor delivers a high computational performance with low-power consumption and an advanced response to interrupts. It features:

The Cortex-M33 processor supports the following bus interfaces:

2.1 System architecture

The main system consists of 32-bit multilayer AHB bus matrix that interconnects:

The bus matrix provides access from a master to a slave, enabling concurrent access and efficient operation even when several high-speed peripherals work simultaneously. This architecture is shown in the figure below:

Figure 1. System architecture

Figure 1. System architecture diagram showing the BusMatrix-S connecting various masters to slaves. Masters include CORTEX-M33 (with TrustZone mainline and FPU), DMA1, DMA2, and SDMMC1. The CORTEX-M33 is connected via its C-bus to an 8 KB ART (I cache), which then connects to the BusMatrix-S via Slow-bus and Fast-bus interfaces. DMA1, DMA2, and SDMMC1 connect directly to the BusMatrix-S via their S-bus interfaces. The BusMatrix-S is a grid with 6 columns (one for each master) and 8 rows. Slaves connected to the rows are: Row 1: FLASH 512 KB; Row 2: MPCBB1 -> SRAM1; Row 3: MPCBB2 -> SRAM2; Row 4: AHB1 peripherals; Row 5: AHB2 peripherals; Row 6: MPCWM1 -> OTFDEC -> OctoSPI1; Row 7: MPCWM2/MPCWM3 -> FSMC; Row 8: (unoccupied). A legend indicates: Bus multiplexer (circle), Master Interface (T-shape), Slave Interface (L-shape), MPCBBx: Memory protection controller block-based, MPCWMx: Memory protection controller Watermark. A note indicates: ● When remapped by ICACHE. Reference MSv49345V2.
Figure 1. System architecture diagram showing the BusMatrix-S connecting various masters to slaves. Masters include CORTEX-M33 (with TrustZone mainline and FPU), DMA1, DMA2, and SDMMC1. The CORTEX-M33 is connected via its C-bus to an 8 KB ART (I cache), which then connects to the BusMatrix-S via Slow-bus and Fast-bus interfaces. DMA1, DMA2, and SDMMC1 connect directly to the BusMatrix-S via their S-bus interfaces. The BusMatrix-S is a grid with 6 columns (one for each master) and 8 rows. Slaves connected to the rows are: Row 1: FLASH 512 KB; Row 2: MPCBB1 -> SRAM1; Row 3: MPCBB2 -> SRAM2; Row 4: AHB1 peripherals; Row 5: AHB2 peripherals; Row 6: MPCWM1 -> OTFDEC -> OctoSPI1; Row 7: MPCWM2/MPCWM3 -> FSMC; Row 8: (unoccupied). A legend indicates: Bus multiplexer (circle), Master Interface (T-shape), Slave Interface (L-shape), MPCBBx: Memory protection controller block-based, MPCWMx: Memory protection controller Watermark. A note indicates: ● When remapped by ICACHE. Reference MSv49345V2.

2.1.1 Fast C-bus

This bus connects the C-bus of the Cortex-M33 core to the BusMatrix via the instruction cache. This bus is used for instruction fetch and data access to the internal memories mapped in code region. The target of this bus are the internal flash and internal SRAMs.

2.1.2 Slow C-bus

This bus connects the C-bus of the Cortex-M33 core to the BusMatrix via the instruction cache. This bus is used for instruction fetch and data access to the external memories mapped in code region. The target of this bus are the external memories (FSMC and OCTOSPI).

2.1.3 S-bus

This bus connects the system bus of the Cortex-M33 core to the BusMatrix. This bus is used by the core to access data located in a peripheral or SRAM area. The targets of this bus are

the internal SRAMs, the AHB1 peripherals including the APB1 and APB2 peripherals, the AHB2 peripherals and the external memories through the OCTOSPI or the FSMC.

The SRAM2 is also accessible on this bus to allow continuous mapping with SRAM1.

2.1.4 DMA-bus

This bus connects the AHB master interface of the DMA to the BusMatrix. The targets of this bus are the SRAM1 and SRAM2, the AHB1 peripherals including the APB1 and APB2 peripherals, the AHB2 peripherals and the external memories through the OCTOSPI or the FSMC.

2.1.5 SDMMC controller DMA bus

This bus connects the SDMMC1 DMA master interface to the BusMatrix. This bus is used only by the SDMMC1 DMA to load/store data from/to memory. The targets of this bus are data memories: internal SRAMs (SRAM1, SRAM2), internal flash memory or external memories through FSMC or OCTOSPI.

2.1.6 BusMatrix

The BusMatrix manages the access arbitration between masters. The arbitration uses a Round Robin algorithm. The BusMatrix is composed of up to six masters (CPU AHB, system bus, Fast C-bus, Slow C-bus, DMA1, DMA2, SDMMC1) and up to seven slaves (FLASH, SRAM1, SRAM2, AHB1 (including APB1 and APB2), AHB2, OCTOSTPI1 and FSMC).

AHB/APB bridges

The two AHB/APB bridges provide full synchronous connections between the AHB and the two APB buses, allowing flexible selection of the peripheral frequency.

Refer to Section 2.3.2 for the address mapping of the peripherals connected to this bridge.

After each device reset, all peripheral clocks are disabled (except for the SRAM1/2 and flash memory interface). Before using a peripheral the user has to enable its clock in the RCC_AHBxENR and the RCC_APBxENR registers.

Note: When a 16- or 8-bit access is performed on an APB register, the access is transformed into a 32-bit access: the bridge duplicates the 16- or 8-bit data to feed the 32-bit vector.

2.2 TrustZone security architecture

The security architecture is based on Arm TrustZone with the Armv8-M main extension.

The TrustZone security is activated by the TZEN option bit in the FLASH_OPTR register.

When the TrustZone is enabled, the SAU (security attribution unit) and IDAU (implementation defined attribution unit) define the memory access permissions based on secure or non-secure state of the processor.

Based on IDAU security attribution, the flash, system SRAMs and peripherals memory space is aliased twice for secure and non-secure state. However, the external memories space is not aliased.

The table below shows an example of typical eight SAU regions mapping based on IDAU regions. The user can split and choose the secure, non-secure or NSC regions for external memories as needed.

Table 1. Example of memory map security attribution versus SAU regions configuration (1)

Region descriptionAddress rangeIDAU security attributionSAU security attribution typical configurationFinal security attribution
Code - external memories0x0000_0000
0x07FF_FFFF
Non-secureSecure, non-secure, or NSCSecure, non-secure, or NSC
Code - flash memory and SRAM0x0800_0000
0x0BFF_FFFF
Non-secureNon-secureNon-secure
0x0C00_0000
0x0FFF_FFFF
NSCSecure or NSCSecure or NSC
Code - external memories0x1000_0000
0x17FF_FFFF
Non-secureNon-secureNon-secure
0x1800_0000
0x1FFF_FFFF
Non-secureNon-secureNon-secure
SRAM0x2000_0000
0x2FFF_FFFF
Non-secureNon-secureNon-secure
0x3000_0000
0x3FFF_FFFF
NSCSecure or NSCSecure or NSC
Peripherals0x4000_0000
0x4FFF_FFFF
Non-secureNon-secureNon-secure
0x5000_0000
0x5FFF_FFFF
NSCSecure or NSCSecure or NSC
External memories0x6000_0000
0xDFFF_FFFF
Non-secureSecure, non-secure, or NSCSecure, non-secure, or NSC

1. Different colors highlights the different configurations: pink = non-secure, blue= NSC (non-secure callable), and green = secure, non-secure, or NSC.

2.2.1 Default TrustZone security state

When the TrustZone security is activated by the TZEN option bit in the FLASH_OPTR, the default system security state is:

Note: Refer to Table 2 and Table 3 for a list of securable and TrustZone-aware peripherals.

2.2.2 TrustZone peripheral classification

When the TrustZone security is active, a peripheral can be either securable or TrustZone-aware type as defined below:

Refer to Section 5.2.1: GTZC TrustZone system architecture

Table 2 and Table 3 summarize the list of Securables and TrustZone aware peripherals within the system.

Table 2. Securables peripherals by TZSC

BusPeripheral
AHB3OCTOSPI1 registers
FMC registers
AHB 2SDMMC1
PKA
RNG
HASH
AES
ADC

Table 2. Securable peripherals by TZSC (continued)

BusPeripheral
AHB1ICACHE registers
TSC
CRC
APB2DFSDM1
SAI2
SAI1
TIM17
TIM16
TIM15
USART1
TIM8
SPI1
TIM1
COMP
VREFBUF
APB1UCPD1
USB FS
FDCAN1
LPTIM3
LPTIM2
I2C4
LPUART1
LPTIM1
OPAMP
DAC1/DAC2
CRS
I2C3
I2C2
I2C1
UART5
UART4
USART3
USART2
SPI3
SPI2

Table 2. Securable peripherals by TZSC (continued)

BusPeripheral
APB1IWDG
WWDG
TIM7
TIM6
TIM5
TIM4
TIM3
TIM2

Table 3. TrustZone-aware peripherals

BusPeripheral
AHB2GPIOH
GPIOG
GPIOF
GPIOE
GPIO D
GPIOC
GPIOB
GPIOA
OTFDEC1 (1)
AHB1GTZC
EXTI
Flash memory
RCC
DMAMUX1
DMA2
DMA1
APB2SYSCFG
APB1PWR
RTC
TAMP

1. Always secure when TZEN = 1.

2.3 Memory organization

2.3.1 Introduction

Program memory, data memory, registers and I/O ports are organized within the same linear 4-Gbyte address space.

The bytes are coded in memory in Little Endian format. The lowest numbered byte in a word is considered the word's least significant byte and the highest numbered byte the most significant.

2.3.2 Memory map and register boundary addresses

Figure 2. Memory map based on IDAU mapping

Memory map diagram showing the mapping of memory regions for Cortex M33. The diagram is divided into three vertical columns. The left column shows the memory address range from 0x0000 0000 to 0xFFFF FFFF. The middle column shows the corresponding memory region names and their security attributes (Non-secure or Non-secure callable). The right column shows the register boundary addresses and the corresponding register names or reserved status. Lines connect the address ranges in the left column to the region names in the middle column, and further lines connect these region names to the specific register address blocks in the right column. A legend at the bottom left indicates that pink boxes represent 'Non-secure' regions and green boxes represent 'Non-secure callable' regions.

Memory Map Summary:

Address RangeMemory RegionSecurity Attribute
0x0000 0000 - 0x1000 0000CodeNon-secure
0x1000 0000 - 0x2000 0000CodeNon-secure
0x2000 0000 - 0x3000 0000SRAM 1Non-secure
0x3000 0000 - 0x4000 0000SRAM 2Non-secure
0x4000 0000 - 0x5000 0000SRAM1Non-secure callable
0x5000 0000 - 0x6000 0000SRAM2Non-secure callable
0x6000 0000 - 0x7000 0000PeripheralsNon-secure
0x7000 0000 - 0x8000 0000PeripheralsNon-secure callable
0x8000 0000 - 0x9000 0000FMC bank 1Non-secure
0x9000 0000 - 0xA000 0000FMC bank 3Non-secure
0xA000 0000 - 0xE000 0000OCTOSPI1 bankNon-secure
0xE000 0000 - 0xFFFF FFFFCortex M33Non-secure

Register Boundary Addresses:

Legend:

MSv49340V3

Memory map diagram showing the mapping of memory regions for Cortex M33. The diagram is divided into three vertical columns. The left column shows the memory address range from 0x0000 0000 to 0xFFFF FFFF. The middle column shows the corresponding memory region names and their security attributes (Non-secure or Non-secure callable). The right column shows the register boundary addresses and the corresponding register names or reserved status. Lines connect the address ranges in the left column to the region names in the middle column, and further lines connect these region names to the specific register address blocks in the right column. A legend at the bottom left indicates that pink boxes represent 'Non-secure' regions and green boxes represent 'Non-secure callable' regions.

All the memory map areas that are not allocated to memories and peripherals are considered “Reserved”. For the detailed mapping of available memory and register areas, refer to the following table.

The following table gives the boundary addresses of the peripherals available in the devices.

Table 4. STM32L552xx and STM32L562xx memory map and peripheral register boundary addresses

BusSecure boundary addressNon-secure boundary addressSize (bytes)PeripheralPeripheral register map
AHB30x5402 1400 - 0x5FFF FFFF0x4402 1400 - 0x4FFF FFFF129 MBReserved-
0x5402 1000 - 0x5402 13FF0x4402 1000 - 0x4402 13FF1 KBOCTOSPI1 registersSection 20.7.28: OCTOSPI register map
0x5402 0400 - 0x5402 0FFF0x4402 0400 - 0x4402 0FFF3 KBReserved-
0x5402 0000 - 0x5402 03FF0x4402 0000 - 0x4402 03FF1 KBFMC registersSection 19.7.8: FMC register map
AHB20x520C 8400 - 0x5401 FFFF0x420C 8400 - 0x4401 FFFF32 MBReserved-
0x520C 8000 - 0x520C 83FF0x420C 8000 - 0x420C 83FF1 KBSDMMC1Section 48.9.20: SDMMC register map
0x520C 5400 - 0x520C 7FFF0x420C 5400 - 0x420C 7FFF11 KBReserved-
0x520C 5000 - 0x520C 53FF0x420C 5000 - 0x420C 53FF1 KBOTFDEC1Section 31.6.15: OTFDEC register map
0x520C 4000 - 0x520C 4FFF0x420C 4000 - 0x420C 4FFF4 KBReserved-
0x520C 2000 - 0x520C 3FFF0x420C 2000 - 0x420C 3FFF8 KBPKASection 32.7.5: PKA register map
0x520C 0C00 - 0x520C 1FFF0x420C 0C00 - 0x420C 1FFF5 KBReserved-
0x520C 0800 - 0x520C 0BFF0x420C 0800 - 0x420C 0BFF1 KBRNGSection 28.7.5: RNG register map
0x520C 0400 - 0x520C 07FF0x420C 0400 - 0x420C 07FF1 KBHASHSection 30.6.8: HASH register map
0x520C 0000 - 0x520C 03FF0x420C 0000 - 0x420C 03FF1 KBAESSection 29.7.18: AES register map
0x5202 8400 - 0x520B FFFF0x4202 8400 - 0x420B FFFF609 KBReserved-
0x5202 8000 - 0x5202 83FF0x4202 8000 - 0x4202 83FF1 KBADCSection 21.9: ADC register map on page 792
0x5202 2000 - 0x5202 7FFF0x4202 2000 - 0x4202 7FFF24 KBReserved-
0x5202 1C00 - 0x5202 1FFF0x4202 1C00 - 0x4202 1FFF1 KBGPIOHSection 11.6.13: GPIO register map
0x5202 1800 - 0x5202 1BFF0x4202 1800 - 0x4202 1BFF1 KBGPIOGSection 11.6.13: GPIO register map
0x5202 1400 - 0x5202 17FF0x4202 1400 - 0x4202 17FF1 KBGPIOFSection 11.6.13: GPIO register map

Table 4. STM32L552xx and STM32L562xx memory map and peripheral register boundary addresses (continued)

BusSecure boundary addressNon-secure boundary addressSize (bytes)PeripheralPeripheral register map
AHB2 (continued)0x5202 1000 - 0x5202 13FF0x4202 1000 - 0x4202 13FF1 KBGPIOESection 11.6.13: GPIO register map
0x5202 0C00 - 0x5202 0FFF0x4202 0C00 - 0x4202 0FFF1 KBGPIOESection 11.6.13: GPIO register map
0x5202 0800 - 0x5202 0BFF0x4202 0800 - 0x4202 0BFF1 KBGPIOCSection 11.6.13: GPIO register map
0x5202 0400 - 0x5202 07FF0x4202 0400 - 0x4202 07FF1 KBGPIOBSection 11.6.13: GPIO register map
0x5202 0000 - 0x5202 03FF0x4202 0000 - 0x4202 03FF1 KBGPIOASection 11.6.13: GPIO register map
AHB10x5003 4000 - 0x5201 FFFF0x4003 3400 - 0x4201 FFFF32 MBReserved-
0x5003 2400 - 0x5003 33FF0x4003 2400 - 0x4003 33FF4 KBGTZCSection 5.6.5: GTZC_MPCBB1 register map and reset values
Section 5.6.6: GTZC_MPCBB2 register map and reset values
Section 5.7.10: GTZC_TZIC register map and reset values
Section 5.5.8: GTZC_TZSC register map and reset values
0x5003 0800 - 0x5003 23FF0x4003 0800 - 0x4003 23FF7 KBReserved-
0x5003 0400 - 0x5003 07FF0x4003 0400 - 0x4003 07FF1 KBICacheSection 7.7.8: ICACHE register map
0x5002 F800 - 0x5003 03FF0x4002 F800 - 0x4003 03FF3 KBReserved-
0x5002 F400 - 0x5002 F7FF0x4002 F400 - 0x4002 F7FF1 KBEXTISection 17.6.21: EXTI register map
0x5002 4400 - 0x5002 F3FF0x4002 4400 - 0x4002 F3FF43 KBReserved-
0x5002 4000 - 0x5002 43FF0x4002 4000 - 0x4002 43FF1 KBTSCSection 27.6.11: TSC register map
0x5002 3400 - 0x5002 3FFF0x4002 3400 - 0x4002 3FFF3 KBReserved-
0x5002 3000 - 0x5002 33FF0x4002 3000 - 0x4002 33FF1 KBCRCSection 18.4.6: CRC register map
0x5002 2400 - 0x5002 2FFF0x4002 2400 - 0x4002 2FFF3 KBReserved-
0x5002 2000 - 0x5002 23FF0x4002 2000 - 0x4002 23FF1 KBFlash registersSection 6.9.28: FLASH register map and reset values

Table 4. STM32L552xx and STM32L562xx memory map and peripheral register boundary addresses (continued)

BusSecure boundary addressNon-secure boundary addressSize (bytes)PeripheralPeripheral register map
AHB1 (continued)0x5002 1400 - 0x5002 1FFF0x4002 1400 - 0x4002 1FFF3 KBReserved-
0x5002 1000 - 0x5002 13FF0x4002 1000 - 0x4002 13FF1 KBRCCSection 9.8.42: RCC register map
0x5002 0C00 - 0x5002 0FFF0x4002 0C00 - 0x4002 0FFF1 KBReserved-
0x5002 0800 - 0x5002 0BFF0x4002 0800 - 0x4002 0BFF1 KBDMAMUX1Section 15.6.7: DMAMUX register map
0x5002 0400 - 0x5002 07FF0x4002 0400 - 0x4002 07FF1 KBDMA2Section 14.6.8: DMA register map
0x5002 0000 - 0x5002 03FF0x4002 0000 - 0x4002 03FF1 KBDMA1Section 14.6.8: DMA register map
APB20x5001 6800 - 0x5001 FFFF0x4001 6800 - 0x4001 FFFF38 KBReserved-
0x5001 6000 - 0x5001 67FF0x4001 6000 - 0x4001 67FF2 KBDFSDM1Section 26.8.16: DFSDM register map
0x5001 5C00 - 0x5001 5FFF0x4001 5C00 - 0x4001 5FFF1 KBReserved-
0x5001 5800 - 0x5001 5BFF0x4001 5800 - 0x4001 5BFF1 KBSAI2Section 47.6.20: SAI register map
0x5001 5400 - 0x5001 57FF0x4001 5400 - 0x4001 57FF1 KBSAI1Section 47.6.20: SAI register map
0x5001 4C00 - 0x5001 53FF0x4001 4C00 - 0x4001 53FF2 KBReserved-
0x5001 4800 - 0x5001 4BFF0x4001 4800 - 0x4001 4BFF1 KBTIM17Section 35.6.21: TIM16/TIM17 register map
0x5001 4400 - 0x5001 47FF0x4001 4400 - 0x4001 47FF1 KBTIM16Section 35.6.21: TIM16/TIM17 register map
0x5001 4000 - 0x5001 43FF0x4001 4000 - 0x4001 43FF1 KBTIM15Section 35.5.21: TIM15 register map
0x5001 3C00 - 0x5001 3FFF0x4001 3C00 - 0x4001 3FFF1 KBReserved-
0x5001 3800 - 0x5001 3BFF0x4001 3800 - 0x4001 3BFF1 KBUSART1Section 44.8.15: USART register map
0x5001 3400 - 0x5001 37FF0x4001 3400 - 0x4001 37FF1 KBTIM8Section 33.4.33: TIM8 register map
0x5001 3000 - 0x5001 33FF0x4001 3000 - 0x4001 33FF1 KBSPI1Section 46.6.8: SPI register map
0x5001 2C00 - 0x5001 2FFF0x4001 2C00 - 0x4001 2FFF1 KBTIM1Section 33.4.32: TIM1 register map

Table 4. STM32L552xx and STM32L562xx memory map and peripheral register boundary addresses (continued)

BusSecure boundary addressNon-secure boundary addressSize (bytes)PeripheralPeripheral register map
APB2 (continued)0x5001 0400 - 0x5001 2BFF0x4001 0400 - 0x4001 2BFF10 KBReserved-
0x5001 0200 - 0x5001 03FF0x4001 0200 - 0x4001 03FF1 KBCOMPSection 24.6.3: COMP register map
0x5001 0100 - 0x5001 01FF0x4001 0100 - 0x4001 01FF1 KBVREFBUFSection 23.4.3: VREFBUF register map
0x5001 0000 - 0x5001 002F0x4001 0000 - 0x4001 002F1 KBSYSCFGSection 12.3.12: SYSCFG register map
APB10x5000 E000 - 0x5000 FFFF0x4000 E000 - 0x4000 FFFF8 KBReserved-
0x5000 DC00 - 0x5000 DFFF0x4000 DC00 - 0x4000 DFFF1 KBUCPD1Section 51.8.15: UCPD register map
0x5000 D800 - 0x5000 DBFF0x4000 D800 - 0x4000 DBFF1 KBUSB SRAMSection 50.6.3: USB register map
0x5000 D400 - 0x5000 D7FF0x4000 D400 - 0x4000 D7FF1 KBUSB FSSection 50.6.3: USB register map
0x5000 B000 - 0x5000 D3FF0x4000 B000 - 0x4000 D3FF9 KBReserved-
0x5000 AC00 - 0x5000 AFFF0x4000 AC00 - 0x4000 AFFF1 KBFDCAN RAMSection 49.4.38: FDCAN register map
0x5000 A800 - 0x5000 ABFF0x4000 A800 - 0x4000 ABFF1 KBReserved-
0x5000 A400 - 0x5000 A7FF0x4000 A400 - 0x4000 A7FF1 KBFDCAN1Section 49.4.38: FDCAN register map
0x5000 9C00 - 0x5000 A3FF0x4000 9C00 - 0x4000 A3FF2 KBReserved-
0x5000 9800 - 0x5000 9BFF0x4000 9800 - 0x4000 9BFF1 KBLPTIM3Section 37.7.13: LPTIM register map
0x5000 9400 - 0x5000 97FF0x4000 9400 - 0x4000 97FF1 KBLPTIM2Section 37.7.13: LPTIM register map
0x5000 8800 - 0x5000 93FF0x4000 8800 - 0x4000 93FF3 KBReserved-
0x5000 8400 - 0x5000 87FF0x4000 8400 - 0x4000 87FF1 KBI2C4Section 43.9.12: I2C register map
0x5000 8000 - 0x5000 83FF0x4000 8000 - 0x4000 83FF1 KBLPUART1-
0x5000 7C00 - 0x5000 7FFF0x4000 7C00 - 0x4000 7FFF1 KBLPTIM1Section 37.7.13: LPTIM register map
0x5000 7800 - 0x5000 7BFF0x4000 7800 - 0x4000 7BFF1 KBOPAMPSection 25.5: OPAMP registers

Table 4. STM32L552xx and STM32L562xx memory map and peripheral register boundary addresses (continued)

BusSecure boundary addressNon-secure boundary addressSize (bytes)PeripheralPeripheral register map
APB1 (continued)0x5000 7400 - 0x5000 77FF0x4000 7400 - 0x4000 77FF1 KBDACSection 22.7.21: DAC register map
0x5000 7000 - 0x5000 73FF0x4000 7000 - 0x4000 73FF1 KBPWRSection 8.6.26: PWR register map and reset values
0x5000 6400 - 0x5000 6FFF0x4000 6400 - 0x4000 6FFF3 KBReserved-
0x5000 6000 - 0x5000 63FF0x4000 6000 - 0x4000 63FF1 KBCRSSection 10.7.5: CRS register map
0x5000 5C00 - 0x5000 5FFF0x4000 5C00 - 0x4000 5FFF1 KBI2C3Section 43.9.12: I2C register map
0x5000 5800 - 0x5000 5BFF0x4000 5800 - 0x4000 5BFF1 KBI2C2Section 43.9.12: I2C register map
0x5000 5400 - 0x5000 57FF0x4000 5400 - 0x4000 57FF1 KBI2C1Section 43.9.12: I2C register map
0x5000 5000 - 0x5000 53FF0x4000 5000 - 0x4000 53FF1 KBUART5Section 44.8.15: USART register map
0x5000 4C00 - 0x5000 4FFF0x4000 4C00 - 0x4000 4FFF1 KBUART4Section 44.8.15: USART register map
0x5000 4800 - 0x5000 4BFF0x4000 4800 - 0x4000 4BFF1 KBUSART3Section 44.8.15: USART register map
0x5000 4400 - 0x5000 47FF0x4000 4400 - 0x4000 47FF1 KBUSART2Section 44.8.15: USART register map
0x5000 4000 - 0x5000 43FF0x4000 4000 - 0x4000 43FF1 KBReserved-
0x5000 3C00 - 0x5000 3FFF0x4000 3C00 - 0x4000 3FFF1 KBSPI3Section 46.6.8: SPI register map
0x5000 3800 - 0x5000 3BFF0x4000 3800 - 0x4000 3BFF1 KBSPI2Section 46.6.8: SPI register map
0x5000 3400 - 0x5000 37FF0x4000 3400 - 0x4000 37FF1 KBTAMPSection 42.6.19: TAMP register map
0x5000 3000 - 0x5000 33FF0x4000 3000 - 0x4000 33FF1 KBIWDGSection 39.4.6: IWDG register map
0x5000 2C00 - 0x5000 2FFF0x4000 2C00 - 0x4000 2FFF1 KBWWDGSection 40.5.4: WWDG register map
0x5000 2800 - 0x5000 2BFF0x4000 2800 - 0x4000 2BFF1 KBRTCSection 41.6.24: RTC register map
0x5000 1800 - 0x5000 27FF0x4000 1800 - 0x4000 27FF4 KBReserved-
0x5000 1400 - 0x5000 17FF0x4000 1400 - 0x4000 17FF1 KBTIM7Section 36.4.9: TIMx register map
Table 4. STM32L552xx and STM32L562xx memory map and peripheral register boundary addresses (continued)
BusSecure boundary addressNon-secure boundary addressSize (bytes)PeripheralPeripheral register map
APB1 (continued)0x5000 1000 - 0x5000 13FF0x4000 1000 - 0x4000 13FF1 KBTIM6Section 36.4.9: TIMx register map
0x5000 0C00 - 0x5000 0FFF0x4000 0C00 - 0x4000 0FFF1 KBTIM5Section 34.4.26: TIMx register map
0x5000 0800 - 0x5000 0BFF0x4000 0800 - 0x4000 0BFF1 KBTIM4Section 34.4.26: TIMx register map
0x5000 0400 - 0x5000 07FF0x4000 0400 - 0x4000 07FF1 KBTIM3Section 34.4.26: TIMx register map
0x5000 0000 - 0x5000 03FF0x4000 0000 - 0x4000 03FF1 KBTIM2Section 34.4.26: TIMx register map

2.4 Embedded SRAM

The STM32L552xx and STM32L562xx devices feature up to 256 Kbytes SRAM:

These SRAM can be accessed as bytes, half-words (16 bits) or full words (32 bits). These memories can be addressed at maximum system clock frequency without wait state and thus by both CPU and DMA.

The CPU can access the SRAM1 and SRAM2 through the system bus or through the C-bus depending on the selected address.

Either 64 Kbytes or upper 4 Kbytes of SRAM2 can be retained in Standby mode.

When the TrustZone security is enabled, all SRAMs are secure after reset. The SRAM can be programmed as non-secure with a block granularity, using MPCBB (memory protection controller block configuration based) in GTZC controller. The granularity of SRAM secure/non-secure block-based is a page of 256 bytes.

2.4.1 SRAM2 parity check

The user can enable the SRAM2 parity check using the option bit SRAM2_PE in the OPTTR user option register (refer to Section 6.4.1: Option bytes description ).

The data bus width is 36 bits because 4 bits are available for parity check (1 bit per byte) in order to increase memory robustness, as required for instance by Class B or SIL safety standards.

The parity bits are computed and stored when writing into the SRAM2. Then, they are automatically checked when reading. If one bit fails, an NMI is generated. The same error can also be linked to the BRK_IN Break input of TIM1/TIM8/TIM15/TIM16/TIM17 with the SPL control bit in the SYSCFG configuration register 2 (SYSCFG_CFGR2) . The SRAM2 Parity Error flag (SPF) is available in the SYSCFG configuration register 2 (SYSCFG_CFGR2) .

Note: When enabling the RAM parity check, it is advised to initialize by software the whole RAM memory at the beginning of the code, to avoid getting parity errors when reading non-initialized locations.

2.4.2 SRAM2 Write protection

The SRAM2 can be write protected with a page granularity of 1 Kbyte.

Table 5. SRAM2 organization

Page numberStart addressEnd address
Page 00x2003 00000x2003 03FF
Page 10x2003 04000x2003 07FF
Page 20x2003 08000x2003 0BFF
Page 30x2003 0C000x2003 0FFF
Page 40x2003 10000x2003 13FF
Page 50x2003 14000x2003 17FF
Page 60x2003 18000x2003 1BFF
Page 70x2003 1C000x2003 1FFF
Page 80x2003 20000x2003 23FF
Page 90x2003 24000x2003 27FF
Page 100x2003 28000x2003 2BFF
Page 110x2003 2C000x2003 2FFF
Page 120x2003 30000x2003 33FF
Page 130x2003 34000x2003 37FF
Page 140x2003 38000x2003 3BFF
Page 150x2003 3C000x2003 3FFF
Page 160x2003 40000x2003 43FF
Page 170x2003 44000x2003 47FF
Page 180x2003 48000x2003 4BFF
Page 190x2003 4C000x2003 4FFF
Page 200x2003 50000x2003 53FF
Page 210x2003 54000x2003 57FF
Page 220x2003 58000x2003 5BFF
Page 230x2003 5C000x2003 5FFF
Page 240x2003 60000x2003 63FF
Page 250x2003 64000x2003 67FF
Page 260x2003 68000x2003 6BFF
Page 270x2003 6C000x2003 6FFF
Page 280x2003 70000x2003 73FF

Table 5. SRAM2 organization (continued)

Page numberStart addressEnd address
Page 290x2003 74000x2003 77FF
Page 300x2003 78000x2003 7BFF
Page 310x2003 7C000x2003 7FFF
Page 320x2003 80000x2003 83FF
Page 330x2003 84000x2003 87FF
Page 340x2003 88000x2003 8BFF
Page 350x2003 8C000x2003 8FFF
Page 360x2003 90000x2003 93FF
Page 370x2003 94000x2003 97FF
Page 380x2003 98000x2003 9BFF
Page 390x2003 9C000x2003 9FFF
Page 400x2003 A0000x2003 A3FF
Page 410x2003 A4000x2003 A7FF
Page 420x2003 A8000x2003 ABFF
Page 430x2003 AC000x2003 AFFF
Page 440x2003 B0000x2003 B3FF
Page 450x2003 B4000x2003 B7FF
Page 460x2003 B8000x2003 BBFF
Page 470x2003 BC000x2003 BFFF
Page 480x2003 C0000x2003 C3FF
Page 490x2003 C4000x2003 C7FF
Page 500x2003 C8000x2003 CBFF
Page 510x2003 CC000x2003 CFFF
Page 520x2003 D0000x2003 D3FF
Page 530x2003 D4000x2003 D7FF
Page 540x2003 D8000x2003 DBFF
Page 550x2003 DC000x2003 DFFF
Page 560x2003 E0000x2003 E3FF
Page 570x2003 E4000x2003 E7FF
Page 580x2003 E8000x2003 EBFF
Page 590x2003 EC000x2003 EFFF
Page 600x2003 F0000x2003 F3FF
Page 610x2003 F4000x2003 F7FF
Page 620x2003 F8000x2003 FBFF
Page 630x2003 FC000x2003 FFFF

The write protection can be enabled in SYSCFG SRAM2 write protection register (SYSCFG_SWPR) in the SYSCFG block. This is a register with write '1' once mechanism, which means that writing '1' on a bit will setup the write protection for that page of SRAM and it can be removed/cleared by a system reset only.

2.4.3 SRAM2 Read protection

The SRAM2 is protected with the Read protection (RDP). Refer to Section 6.7.2: Readout protection (RDP) for more details.

2.4.4 SRAM2 Erase

The SRAM2 can be erased with a system reset using the option bit SRAM2_RST in the OPTR user option register (refer to Section 6.4.1: Option bytes description ).

The SRAM2 erase can also be requested by software by setting the bit SRAM2ER in the SYSCFG SRAM2 control and status register (SYSCFG_SCSR) .

The SRAM2 is also erased by a Backup domain reset.

2.5 Flash memory overview

The flash memory is composed of two distinct physical areas:

The flash interface implements instruction access and data access based on the AHB protocol. It also implements the logic necessary to carry out the flash memory operations (program/erase) controlled through the flash registers plus security access control features. Refer to Section 6: Embedded flash memory (FLASH) for more details.

3 Boot configuration

At startup, a BOOT0 pin, nBOOT0 and NSBOOTADDx[24:0] / SECBOOTADD0[24:0] option bytes are used to select the boot memory address which includes:

The BOOT0 value may come from the PH3-BOOT0 pin or from an option bit depending on the value of a user option bit to free the GPIO pad if needed.

Refer to Table 6 and Table 7 for boot modes when TrustZone is disabled and enabled respectively.

Table 6. Boot modes when TrustZone is disabled (TZEN=0)

nBOOT0
FLASH_
OPTR[27]
BOOT0
pin PH3
nSWBOOT0
FLASH_
OPTR[26]
Boot address option-
bytes selection
Boot areaST programmed
default value
-01NSBOOTADD0[24:0]Boot address defined by user option bytes NSBOOTADD0[24:0]Flash: 0x0800 0000
-11NSBOOTADD1[24:0]Boot address defined by user option bytes NSBOOTADD1[24:0]System bootloader: 0x0BF9 0000
1-0NSBOOTADD0[24:0]Boot address defined by user option bytes NSBOOTADD0[24:0]Flash: 0x0800 0000
0-0NSBOOTADD1[24:0]Boot address defined by user option bytes NSBOOTADD1[24:0]System bootloader: 0x0BF9 0000

When TrustZone is enabled by setting the TZEN option bit, the boot space must be in secure area. The SECBOOTADD0[24:0] option bytes are used to select the boot secure memory address.

A unique boot entry option can be selected by setting the BOOT_LOCK option bit. All other boot options are ignored.

Table 7. Boot modes when TrustZone is enabled (TZEN=1)

BOOT_LOCKnBOOT0
FLASH_OPTR[27]
BOOT0
pin PH3
nSWBOOT0
FLASH_OPTR[26]
RSS
command
Boot address
option-bytes
selection
Boot areaST
programmed
default
value
0-010SECBOOTADD0
[24:0]
Secure boot address defined by user option bytes
SECBOOTADD0
[24:0]
Flash:
0x0C00 0000
-110N/ARSS: 0x0FF8 0000RSS:
0x0FF8 0000
1-00SECBOOTADD0
[24:0]
Secure boot address defined by user option bytes
SECBOOTADD0
[24:0]
Flash:
0x0C00 0000
0-00N/ARSS: RSS:
0x0FF8 0000
RSS:
0x0FF8 0000
---≠ 0N/ARSS: RSS:
0x0FF8 0000
RSS:
0x0FF8 0000
1----SECBOOTADD0
[24:0]
Secure boot address defined by user option bytes
SECBOOTADD0
[24:0]
Flash:
0x0C00 0000

The boot address option bytes enables the possibility to program any boot memory address. However, the allowed address space depends on flash read protection RDP level.

If the programmed boot memory address is out of the allowed memory mapped area when RDP level is 0.5 or more, the default boot fetch address is forced to:

Refer to the Table 8 .

Table 8. Boot space versus RDP protection

RDPTZEN = 1TZEN = 0
0Any boot addressAny boot address
0.5N/A
1Boot address only in:
RSS: 0x0FF80000
or secure flash: 0x0C000000 -
0x0C07 FFFF
Any boot address
2Otherwise the boot address is forced to RSSBoot address only in flash 0x0800 0000 -
0x0807 FFFF
Otherwise the forced boot address is:
0x0800 0000 (1)
  1. 1. In RDP level 2, the boot is done from the address programmed in NSBOOTADD0 or NSBOOTADD1 depending on the boot configuration before setting the RDP level 2 and if the programmed address is within the user flash memory.
    If the programmed NSBOOTADD0 or NSBOOTADD1 is not a valid address, the boot is forced at 0x800 0000.

The BOOT0 value (either coming from the pin or the option bit) is latched upon reset release. It is up to the user to set nBOOT0 or BOOT0 values to select the required boot mode.

The BOOT0 pin or user option bit (depending on the nSWBOOT0 bit value in the FLASH_OPTR register) is also re-sampled when exiting from Standby mode. Consequently, they must be kept in the required Boot mode configuration in Standby mode. After startup delay, the selection of the boot area is done before releasing the processor reset.

PH3/BOOT0 GPIO is configured in:

Embedded bootloader and RSS

The bootloader is located in the system memory. It is used to reprogram the flash memory by using USART, I2C, SPI, FDCAN or USB FS in device mode through the DFU (device firmware upgrade). It is programmed by ST during production. Refer to AN2606, STM32 microcontroller system memory boot mode .

The root secure services (RSS) are embedded in a flash memory area named secure information block, programmed during ST production.

The RSS enables for example the secure firmware installation (SFI) thanks to the RSS extension firmware (RSSe SFI).

This feature allows the customers to protect the confidentiality of the firmware to be provisioned into the STM32 device when the production is subcontracted to a third party.

The RSS is available on all devices, after enabling the TrustZone through the TZEN option bit.