2. System and memory overview

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 Figure 1 for STM32L47x/L48x devices, and shown in Figure 2 for STM32L49x/L4Ax devices:


a. On STM32L47x/L48x devices, FMC and QUADSPI slaves are merged into same port.

Figure 1. System architecture for STM32L47x/L48x devices

System architecture diagram for STM32L47x/L48x devices showing the BusMatrix-S connecting various components like ARM Cortex-M4, DMA1, DMA2, FLASH, SRAM, and peripherals.

The diagram illustrates the system architecture for STM32L47x/L48x devices, centered around the BusMatrix-S . At the top, three components are connected to the matrix: ARM Cortex® -M4 with FPU (connected to S0, S1, S2), DMA1 (connected to S3), and DMA2 (connected to S4). The matrix itself is a grid with five slave ports (S0-S4) and seven master ports (M0-M6). Connections are as follows: M0 connects to ACCEL (which then connects to FLASH 1 MB ); M1 connects to ACCEL (labeled DCode ); M2 connects to SRAM1 ; M3 connects to SRAM2 ; M4 connects to AHB1 peripherals ; M5 connects to AHB2 peripherals ; and M6 connects to FMC and QUADSPI . The label BusMatrix-S is placed at the bottom of the matrix grid. A small code MS33489V3 is visible in the bottom right corner of the diagram area.

System architecture diagram for STM32L47x/L48x devices showing the BusMatrix-S connecting various components like ARM Cortex-M4, DMA1, DMA2, FLASH, SRAM, and peripherals.

Figure 2. System architecture for STM32L49x/L4Ax

System architecture diagram for STM32L49x/L4Ax showing the BusMatrix-S connecting various masters to slaves.

The diagram illustrates the system architecture for STM32L49x/L4Ax, centered around the BusMatrix-S. At the top, four masters are connected to the matrix: ARM® CORTEX®-M4 with FPU, DMA1, DMA2, and DMA2D. The matrix has six slave interfaces (S0 to S5) on the left and eight master interfaces (M0 to M7) on the right. The connections are as follows:

The matrix itself is labeled BusMatrix-S. A vertical label MSv38030V2 is present in the bottom right corner of the diagram area.

System architecture diagram for STM32L49x/L4Ax showing the BusMatrix-S connecting various masters to slaves.

2.1.1 S0: I-bus

This bus connects the instruction bus of the Cortex®-M4 core to the BusMatrix. This bus is used by the core to fetch instructions. The targets of this bus are the internal Flash memory, SRAM1, SRAM2 and external memories through QUADSPI or the FMC.

2.1.2 S1: D-bus

This bus connects the data bus of the Cortex®-M4 core to the BusMatrix. This bus is used by the core for literal load and debug access. The targets of this bus are the internal Flash memory, SRAM1, SRAM2 and external memories through QUADSPI or the FMC.

2.1.3 S2: S-bus

This bus connects the system bus of the Cortex®-M4 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 SRAM1, the AHB1 peripherals including the APB1 and APB2 peripherals, the AHB2 peripherals and the external memories through the QUADSPI or the FMC.

On STM32L49x/L4Ax devices, the SRAM2 is also accessible on this bus to allow continuous mapping with SRAM1.

2.1.4 S3, S4: 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 QUADSPI or the FMC.

2.1.5 S5: DMA2D-bus (a)

This bus connects the AHB master interface of the DMA2D to the BusMatrix. The targets of this bus are the SRAM1 and SRAM2 and external memories through the QUADSPI or the FMC.

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, DCode bus, ICode bus, DMA1, DMA2 and DMA2D bus) and up to eight slaves (FLASH, SRAM1, SRAM2, AHB1 (including APB1 and APB2), AHB2, QUADSPI and FMC).

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.2: Memory organization on page 75 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 you have 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.


a. it is present on L496/L4A6 only

2.2 Memory organization

2.2.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.

The addressable memory space is divided into eight main blocks, of 512 Mbytes each.

2.2.2 Memory map and register boundary addresses

Figure 3. Memory map for STM32L47x/L48x devices

Memory map diagram for STM32L47x/L48x devices showing memory banks 0-7 and their corresponding address ranges and contents.

The diagram illustrates the memory map for STM32L47x/L48x devices, organized into 8 banks (0-7). The left side shows the memory bank structure with addresses, and the right side shows the corresponding register and memory content structure with addresses.

Memory Bank Structure (Left Side):

Register and Memory Content Structure (Right Side):

Legend:

MS46961V1

Memory map diagram for STM32L47x/L48x devices showing memory banks 0-7 and their corresponding address ranges and contents.

Figure 4. Memory map for STM32L49x/L4Ax devices

Memory map for STM32L49x/L4Ax devices showing two columns of memory addresses and their corresponding regions. The left column shows the main memory map from 0x0000 0000 to 0xFFFF FFFF, divided into 8 banks (0-7). The right column shows a detailed view of the memory regions, including Cortex-M4 with FPU, Internal Peripherals, FMC and QUADSPI registers, QUADSPI Flash bank, FMC bank3, FMC bank1, Peripherals, SRAM2, SRAM1, CODE, Reserved, QUADSPI registers, FMC registers, AHB2, Reserved, AHB1, Reserved, APB2, Reserved, APB1, Option Bytes, System memory, Options Bytes, OTP area, SRAM2, Flash memory, and Flash, system memory or SRAM, depending on BOOT configuration.

Memory map for STM32L49x/L4Ax devices

The memory map is divided into two columns. The left column shows the main memory map, and the right column shows a detailed view of the memory regions.

Left Column: Main Memory Map

BankAddress RangeRegion
70xE000 0000 - 0xFFFF FFFFCortex™-M4 with FPU Internal Peripherals
60xC000 0000 - 0xE000 0000Reserved
50xA000 0000 - 0xC000 0000FMC and QUADSPI registers
40x9000 0000 - 0xA000 0000QUADSPI Flash bank
30x8000 0000 - 0x9000 0000FMC bank3
20x6000 0000 - 0x8000 0000Reserved
10x4000 0000 - 0x6000 0000FMC bank1
00x0000 0000 - 0x4000 0000Peripherals, SRAM2, SRAM1, CODE

Right Column: Detailed Memory Regions

Address RangeRegion
0xBFFF FFFF - 0xFFFF FFFFReserved
0xA000 1400 - 0xA000 FFFFQUADSPI registers
0xA000 1000 - 0xA000 13FFFMC registers
0xA000 0000 - 0xA000 09FFReserved
0x5FFF FFFF - 0xFFFF FFFFReserved
0x5006 0C00 - 0x5FFF FFFFReserved
0x4800 0000 - 0x5006 0BFFAHB2
0x4002 4400 - 0x4800 0000Reserved
0x4002 0000 - 0x4002 43FFAHB1
0x4001 6400 - 0x4002 0000Reserved
0x4001 0000 - 0x4001 63FFAPB2
0x4000 9800 - 0x4001 0000Reserved
0x4000 0000 - 0x4000 97FFAPB1
0x1FFF FFFF - 0x1FFF F828Reserved
0x1FFF F800 - 0x1FFF F827Option Bytes
0x1FFF F000 - 0x1FFF F7FFReserved
0x1FFF 8000 - 0x1FFF F000System memory
0x1FFF 7828 - 0x1FFF 8000Reserved
0x1FFF 7800 - 0x1FFF 7827Options Bytes
0x1FFF 7400 - 0x1FFF 7800Reserved
0x1FFF 7000 - 0x1FFF 73FFOTP area
0x1FFF 0000 - 0x1FFF 7000System memory
0x1001 0000 - 0x1FFF 0000Reserved
0x1000 0000 - 0x1001 0000SRAM2
0x0810 0000 - 0x1000 0000Reserved
0x0800 0000 - 0x0810 0000Flash memory
0x0010 0000 - 0x0800 0000Reserved
0x0000 0000 - 0x0010 0000Flash, system memory or SRAM, depending on BOOT configuration

Legend: Reserved

MS46962V1

Memory map for STM32L49x/L4Ax devices showing two columns of memory addresses and their corresponding regions. The left column shows the main memory map from 0x0000 0000 to 0xFFFF FFFF, divided into 8 banks (0-7). The right column shows a detailed view of the memory regions, including Cortex-M4 with FPU, Internal Peripherals, FMC and QUADSPI registers, QUADSPI Flash bank, FMC bank3, FMC bank1, Peripherals, SRAM2, SRAM1, CODE, Reserved, QUADSPI registers, FMC registers, AHB2, Reserved, AHB1, Reserved, APB2, Reserved, APB1, Option Bytes, System memory, Options Bytes, OTP area, SRAM2, Flash memory, and Flash, system memory or SRAM, depending on BOOT configuration.

It is forbidden to access QUADSPI Flash bank area before having properly configured and enabled the QUADSPI peripheral.

All the memory map areas that are not allocated to on-chip 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 1. STM32L47x/L48x devices memory map and peripheral register boundary addresses (1)

BusBoundary addressSize (bytes)PeripheralPeripheral register map
AHB20x5006 0800 - 0x5006 0BFF1 KBRNGSection 27.7.4: RNG register map
0x5006 0400 - 0x5006 07FF1 KBReserved-
0x5006 0000 - 0x5006 03FF1 KBAES (2)Section 28.7.18: AES register map
0x5004 0400 - 0x5005 FFFF127 KBReserved-
0x5004 0000 - 0x5004 03FF1 KBADCSection 18.9: ADC register map
0x5000 0000 - 0x5003 FFFF256 KBOTG_FS (3)Section 47.15.57: OTG_FS register map
0x4800 2000 - 0x4FFF FFFF~127 MBReserved-
0x4800 1C00 - 0x4800 1FFF1 KBGPIOHSection 8.5.13: GPIO register map
0x4800 1800 - 0x4800 1BFF1 KBGPIOGSection 8.5.13: GPIO register map
0x4800 1400 - 0x4800 17FF1 KBGPIOFSection 8.5.13: GPIO register map
0x4800 1000 - 0x4800 13FF1 KBGPIOESection 8.5.13: GPIO register map
0x4800 0C00 - 0x4800 0FFF1 KBGPIO DSection 8.5.13: GPIO register map
0x4800 0800 - 0x4800 0BFF1 KBGPIOCSection 8.5.13: GPIO register map
0x4800 0400 - 0x4800 07FF1 KBGPIOBSection 8.5.13: GPIO register map
0x4800 0000 - 0x4800 03FF1 KBGPIOASection 8.5.13: GPIO register map
0x4002 4400 - 0x47FF FFFF~127 MBReserved-

Table 1. STM32L47x/L48x devices memory map and peripheral register boundary addresses (1) (continued)

BusBoundary addressSize (bytes)PeripheralPeripheral register map
AHB10x4002 4000 - 0x4002 43FF1 KBTSCSection 26.6.11: TSC register map
0x4002 3400 - 0x4002 3FFF3 KBReserved-
0x4002 3000 - 0x4002 33FF1 KBCRCSection 15.4.6: CRC register map
0x4002 2400 - 0x4002 2FFF3 KBReserved-
0x4002 2000 - 0x4002 23FF1 KBFLASH registersSection 3.7.17: FLASH register map
0x4002 1400 - 0x4002 1FFF3 KBReserved-
0x4002 1000 - 0x4002 13FF1 KBRCCSection 6.4.33: RCC register map
0x4002 0800 - 0x4002 0FFF2 KBReserved-
0x4002 0400 - 0x4002 07FF1 KBDMA2Section 11.6.8: DMA register map
0x4002 0000 - 0x4002 03FF1 KBDMA1Section 11.6.8: DMA register map
APB20x4001 6400 - 0x4001 FFFF39 KBReserved-
0x4001 6000 - 0x4001 63FF1 KBDFSDM1Section 24.8.16: DFSDM register map
0x4001 5C00 - 0x4001 5FFF1 KBReserved-
0x4001 5800 - 0x4001 5BFF1 KBSAI2Section 43.5.18: SAI register map
0x4001 5400 - 0x4001 57FF1 KBSAI1Section 43.5.18: SAI register map
0x4001 4C00 - 0x4001 53FF2 KBReserved-

Table 1. STM32L47x/L48x devices memory map and peripheral register boundary addresses (1) (continued)

BusBoundary addressSize (bytes)PeripheralPeripheral register map
APB20x4001 4800 - 0x4001 4BFF1 KBTIM17Section 32.7.21: TIM16/TIM17 register map
0x4001 4400 - 0x4001 47FF1 KBTIM16Section 32.7.21: TIM16/TIM17 register map
0x4001 4000 - 0x4001 43FF1 KBTIM15Section 32.7.21: TIM16/TIM17 register map
0x4001 3C00 - 0x4001 3FFF1 KBReserved-
0x4001 3800 - 0x4001 3BFF1 KBUSART1Section 40.8.12: USART register map
0x4001 3400 - 0x4001 37FF1 KBTIM8Section 30.4.33: TIM8 register map
0x4001 3000 - 0x4001 33FF1 KBSPI1Section 42.6.8: SPI register map
0x4001 2C00 - 0x4001 2FFF1 KBTIM1Section 30.4.32: TIM1 register map
0x4001 2800 - 0x4001 2BFF1 KBSDMMC1Section 45.8.16: SDMMC register map
0x4001 2000 - 0x4001 27FF2 KBReserved-
0x4001 1C00 - 0x4001 1FFF1 KBFIREWALLSection 4.4.8: Firewall register map
0x4001 0800 - 0x4001 1BFF5 KBReserved-
0x4001 0400 - 0x4001 07FF1 KBEXTISection 14.5.13: EXTI register map
0x4001 0200 - 0x4001 03FF1 KBCOMPSection 22.6.3: COMP register map
0x4001 0030 - 0x4001 01FFVREFBUFSection 21.4.3: VREFBUF register map
0x4001 0000 - 0x4001 002FSYSCFGSection 9.2.12: SYSCFG register map

Table 1. STM32L47x/L48x devices memory map and peripheral register boundary addresses (1) (continued)

BusBoundary addressSize (bytes)PeripheralPeripheral register map
APB10x4000 9800 - 0x4000 FFFF26 KBReserved-
0x4000 9400 - 0x4000 97FF1 KBLPTIM2Section 34.7.11: LPTIM register map
0x4000 8C00 - 0x4000 93FF2 KBReserved-
0x4000 8800 - 0x4000 8BFF1 KBSWPMI1Section 44.6.10: SWPMI register map and reset value table
0x4000 8400 - 0x4000 87FF1 KBReserved-
0x4000 8000 - 0x4000 83FF1 KBLPUART1Section 41.7.10: LPUART register map
0x4000 7C00 - 0x4000 7FFF1 KBLPTIM1Section 34.7.11: LPTIM register map
0x4000 7800 - 0x4000 7BFF1 KBOPAMPSection 23.5.7: OPAMP register map
0x4000 7400 - 0x4000 77FF1 KBDAC1Section 19.7.21: DAC register map
0x4000 7000 - 0x4000 73FF1 KBPWRSection 5.4.26: PWR register map and reset value table
0x4000 6800 - 0x4000 6FFF2 KBReserved-
0x4000 6400 - 0x4000 67FF1 KBCAN1Section 46.9.5: bxCAN register map
0x4000 6000 - 0x4000 63FF1 KBReserved-
0x4000 5C00 - 0x4000 5FFF1 KBI2C3Section 39.9.12: I2C register map
0x4000 5800 - 0x4000 5BFF1 KBI2C2Section 39.9.12: I2C register map
0x4000 5400 - 0x4000 57FF1 KBI2C1Section 39.9.12: I2C register map

Table 1. STM32L47x/L48x devices memory map and peripheral register boundary addresses (1) (continued)

BusBoundary addressSize (bytes)PeripheralPeripheral register map
APB10x4000 5000 - 0x4000 53FF1 KBUART5Section 40.8.12: USART register map
0x4000 4C00 - 0x4000 4FFF1 KBUART4Section 40.8.12: USART register map
0x4000 4800 - 0x4000 4BFF1 KBUSART3Section 40.8.12: USART register map
0x4000 4400 - 0x4000 47FF1 KBUSART2Section 40.8.12: USART register map
0x4000 4000 - 0x4000 43FF1 KBReserved-
0x4000 3C00 - 0x4000 3FFF1 KBSPI3Section 42.6.8: SPI register map
0x4000 3800 - 0x4000 3BFF1 KBSPI2Section 42.6.8: SPI register map
0x4000 3400 - 0x4000 37FF1 KBReserved-
0x4000 3000 - 0x4000 33FF1 KBIWDGSection 36.4.6: IWDG register map
0x4000 2C00 - 0x4000 2FFF1 KBWWDGSection 37.5.4: WWDG register map
0x4000 2800 - 0x4000 2BFF1 KBRTCSection 38.6.21: RTC register map
0x4000 2400 - 0x4000 27FF1 KBLCD (4)Section 25.6.8: LCD register map
0x4000 1800 - 0x4000 24003 KBReserved-
0x4000 1400 - 0x4000 17FF1 KBTIM7Section 33.4.9: TIMx register map
0x4000 1000 - 0x4000 13FF1 KBTIM6Section 33.4.9: TIMx register map
0x4000 0C00 - 0x4000 0FFF1 KBTIM5Section 31.4.26: TIMx register map
0x4000 0800 - 0x4000 0BFF1 KBTIM4Section 31.4.26: TIMx register map
0x4000 0400 - 0x4000 07FF1 KBTIM3Section 31.4.26: TIMx register map
0x4000 0000 - 0x4000 03FF1 KBTIM2Section 31.4.26: TIMx register map

1. The gray color is used for reserved boundary addresses.

2. Available on STM32L48x devices only.

3. Available on STM32L4x5/L4x6 devices only.

4. Available on STM32L4x6 devices only.

Table 2. STM32L49x/L4Ax devices memory map and peripheral register boundary addresses (1)

BusBoundary addressSize (bytes)PeripheralPeripheral register map
AHB40xA000 1000 - 0xA000 13FF1 KBQUADSPISection 17.6.14: QUADSPI register map
AHB30xA000 0400 - 0xA000 0FFF3 KBReserved-
0xA000 0000 - 0xA000 03FF1 KBFMCSection 16.7.8: FMC register map
-0x5006 0C00 - 0x5FFF FFFF~260 MBReserved-
AHB20x5006 0800 - 0x5006 0BFF1 KBRNGSection 27.7.4: RNG register map
0x5006 0400 - 0x5006 07FF1 KBHASHSection 29.7.8: HASH register map
0x5006 0000 - 0x5006 03FF1 KBAES (2)Section 28.7.18: AES register map
0x5005 0400 - 0x5005 FFFF63 KBReserved-
0x5005 0000 - 0x5005 03FF1 KBDCMISection 20.5.12: DCMI register map
0x5004 0400 - 0x5004 FFFF63 KBReserved-
0x5004 0000 - 0x5004 03FF1 KBADCSection 18.9: ADC register map
0x5000 0000 - 0x5003 FFFF256 KBOTG_FSSection 47.15.57: OTG_FS register map
0x4800 2400 - 0x4FFF FFFF~127 MBReserved-
0x4800 2000 - 0x4800 23FF1 KBGPIOISection 8.5.13: GPIO register map
0x4800 1C00 - 0x4800 1FFF1 KBGPIOHSection 8.5.13: GPIO register map
0x4800 1800 - 0x4800 1BFF1 KBGPIOGSection 8.5.13: GPIO register map
0x4800 1400 - 0x4800 17FF1 KBGPIOFSection 8.5.13: GPIO register map
0x4800 1000 - 0x4800 13FF1 KBGPIOESection 8.5.13: GPIO register map
0x4800 0C00 - 0x4800 0FFF1 KBGPIO_DSection 8.5.13: GPIO register map
0x4800 0800 - 0x4800 0BFF1 KBGPIOCSection 8.5.13: GPIO register map
0x4800 0400 - 0x4800 07FF1 KBGPIOBSection 8.5.13: GPIO register map
0x4800 0000 - 0x4800 03FF1 KBGPIOASection 8.5.13: GPIO register map
-0x4002 BC00 - 0x47FF FFFF~127 MBReserved-

Table 2. STM32L49x/L4Ax devices memory map and peripheral register boundary addresses (1) (continued)

BusBoundary addressSize (bytes)PeripheralPeripheral register map
AHB10x4002 B000 - 0x4002 BBFF3 KBDMA2DSection 12.5.26: DMA2D register map
0x4002 4400 - 0x4002 AFFF27 KBReserved-
0x4002 4000 - 0x4002 43FF1 KBTSCSection 26.6.11: TSC register map
0x4002 3400 - 0x4002 3FFF1 KBReserved-
0x4002 3000 - 0x4002 33FF1 KBCRCSection 15.4.6: CRC register map
0x4002 2400 - 0x4002 2FFF3 KBReserved-
0x4002 2000 - 0x4002 23FF1 KBFLASH registersSection 3.7.17: FLASH register map
0x4002 1400 - 0x4002 1FFF3 KBReserved-
0x4002 1000 - 0x4002 13FF1 KBRCCSection 6.4.33: RCC register map
0x4002 0800 - 0x4002 0FFF2 KBReserved-
0x4002 0400 - 0x4002 07FF1 KBDMA2Section 11.6.8: DMA register map
0x4002 0000 - 0x4002 03FF1 KBDMA1Section 11.6.8: DMA register map
APB20x4001 6400 - 0x4001 FFFF39 KBReserved-
0x4001 6000 - 0x4001 63FF1 KBDFSDM1Section 24.8.16: DFSDM register map
0x4001 5C00 - 0x4001 5FFF1 KBReserved-
0x4001 5800 - 0x4001 5BFF1 KBSAI2Section 43.5: SAI registers
0x4001 5400 - 0x4001 57FF1 KBSAI1Section 43.5: SAI registers
0x4001 4C00 - 0x4001 53FF2 KBReserved-
0x4001 4800 - 0x4001 4BFF1 KBTIM17Section 32.7.21: TIM16/TIM17 register map
0x4001 4400 - 0x4001 47FF1 KBTIM16Section 32.7.21: TIM16/TIM17 register map
0x4001 4000 - 0x4001 43FF1 KBTIM15Section 32.6.21: TIM15 register map
0x4001 3C00 - 0x4001 3FFF1 KBReserved-
0x4001 3800 - 0x4001 3BFF1 KBUSART1Section 40.8.12: USART register map
0x4001 3400 - 0x4001 37FF1 KBTIM8Section 30.4.33: TIM8 register map
0x4001 3000 - 0x4001 33FF1 KBSPI1Section 42.6.8: SPI register map
0x4001 2C00 - 0x4001 2FFF1 KBTIM1Section 30.4.32: TIM1 register map
0x4001 2800 - 0x4001 2BFF1 KBSDMMC1Section 45.8.16: SDMMC register map
0x4001 2000 - 0x4001 27FF2 KBReserved-
0x4001 1C00 - 0x4001 1FFF1 KBFIREWALLSection 4.4.8: Firewall register map
0x4001 0800 - 0x4001 1BFF5 KBReserved-
0x4001 0400 - 0x4001 07FF1 KBEXTISection 14.5.13: EXTI register map

Table 2. STM32L49x/L4Ax devices memory map and peripheral register boundary addresses (1) (continued)

BusBoundary addressSize (bytes)PeripheralPeripheral register map
APB20x4001 0200 - 0x4001 03FF1 KBCOMPSection 22.6.3: COMP register map
0x4001 0030 - 0x4001 01FFVREFBUFSection 21.4.3: VREFBUF register map
0x4001 0000 - 0x4001 002FSYSCFGSection 9.2.12: SYSCFG register map
APB10x4000 9800 - 0x4000 FFFF26 KBReserved-
0x4000 9400 - 0x4000 97FF1 KBLPTIM2Section 34.7.11: LPTIM register map
0x4000 8C00 - 0x4000 93FF2 KBReserved-
0x4000 8800 - 0x4000 8BFF1 KBSWPMI1Section 44.6.10: SWPMI register map and reset value table
0x4000 8400 - 0x4000 87FF1 KBI2C4Section 39.9.12: I2C register map
0x4000 8000 - 0x4000 83FF1 KBLPUART1Section 41.7.10: LPUART register map
0x4000 7C00 - 0x4000 7FFF1 KBLPTIM1Section 34.7.11: LPTIM register map
0x4000 7800 - 0x4000 7BFF1 KBOPAMPSection 23.5.7: OPAMP register map
0x4000 7400 - 0x4000 77FF1 KBDAC1Section 19.7.21: DAC register map
0x4000 7000 - 0x4000 73FF1 KBPWRSection 5.4.26: PWR register map and reset value table
0x4000 6C00 - 0x4000 6FFF1 KBReserved-
0x4000 6800 - 0x4000 6BFF1 KBCAN2Section 46.9.5: bxCAN register map
0x4000 6400 - 0x4000 67FF1 KBCAN1Section 46.9.5: bxCAN register map
0x4000 6000 - 0x4000 63FF1 KBCRSSection 7.7.5: CRS register map
0x4000 5C00 - 0x4000 5FFF1 KBI2C3Section 39.9.12: I2C register map
0x4000 5800 - 0x4000 5BFF1 KBI2C2Section 39.9.12: I2C register map
0x4000 5400 - 0x4000 57FF1 KBI2C1Section 39.9.12: I2C register map
0x4000 5000 - 0x4000 53FF1 KBUART5Section 40.8.12: USART register map
0x4000 4C00 - 0x4000 4FFF1 KBUART4Section 40.8.12: USART register map

Table 2. STM32L49x/L4Ax devices memory map and peripheral register boundary addresses (1) (continued)

BusBoundary addressSize (bytes)PeripheralPeripheral register map
APB10x4000 4800 - 0x4000 4BFF1 KBUSART3Section 40.8.12: USART register map
0x4000 4400 - 0x4000 47FF1 KBUSART2Section 40.8.12: USART register map
0x4000 4000 - 0x4000 43FF1 KBReserved-
0x4000 3C00 - 0x4000 3FFF1 KBSPI3Section 42.6.8: SPI register map
0x4000 3800 - 0x4000 3BFF1 KBSPI2Section 42.6.8: SPI register map
0x4000 3400 - 0x4000 37FF1 KBReserved-
0x4000 3000 - 0x4000 33FF1 KBIWDGSection 36.4.6: IWDG register map
0x4000 2C00 - 0x4000 2FFF1 KBWWDGSection 37.5.4: WWDG register map
0x4000 2800 - 0x4000 2BFF1 KBRTCSection 38.6.21: RTC register map
0x4000 2400 - 0x4000 27FF1 KBLCDSection 25.6.8: LCD register map
0x4000 1800 - 0x4000 23FF3 KBReserved-
0x4000 1400 - 0x4000 17FF1 KBTIM7Section 33.4.9: TIMx register map
0x4000 1000 - 0x4000 13FF1 KBTIM6Section 33.4.9: TIMx register map
0x4000 0C00 - 0x4000 0FFF1 KBTIM5Section 31.4.26: TIMx register map
0x4000 0800 - 0x4000 0BFF1 KBTIM4Section 31.4.26: TIMx register map
0x4000 0400 - 0x4000 07FF1 KBTIM3Section 31.4.26: TIMx register map
0x4000 0000 - 0x4000 03FF1 KBTIM2Section 31.4.26: TIMx register map

1. The gray color is used for reserved boundary addresses.

2. Available on STM32L4Ax only.

2.3 Bit banding

The Cortex ® -M4 memory map includes two bit-band regions. These regions map each word in an alias region of memory to a bit in a bit-band region of memory. Writing to a word in the alias region has the same effect as a read-modify-write operation on the targeted bit in the bit-band region.

In the STM32L4x6 devices both the peripheral registers and the SRAM1 are mapped to a bit-band region, so that single bit-band write and read operations are allowed. The operations are only available for Cortex ® -M4 accesses, and not from other bus masters (e.g. DMA).

A mapping formula shows how to reference each word in the alias region to a corresponding bit in the bit-band region. The mapping formula is:

\[ bit\_word\_addr = bit\_band\_base + (byte\_offset \times 32) + (bit\_number \times 4) \]

where:

Example

The following example shows how to map bit 2 of the byte located at SRAM1 address 0x20000300 to the alias region:

\[ 0x22006008 = 0x22000000 + (0x300*32) + (2*4) \]

Writing to address 0x22006008 has the same effect as a read-modify-write operation on bit 2 of the byte at SRAM1 address 0x20000300.

Reading address 0x22006008 returns the value (0x01 or 0x00) of bit 2 of the byte at SRAM1 address 0x20000300 (0x01: bit set; 0x00: bit reset).

For more information on bit-banding, refer to the Cortex®-M4 programming manual (see Related documents on page 1 ).

2.4 Embedded SRAM

The STM32L47x/L48x/L49x/L4Ax devices feature up to 320 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 through the system bus or through the ICode/DCode buses when boot from SRAM1 is selected or when physical remap is selected ( Section 9.2.1: SYSCFG memory remap register (SYSCFG_MEMRMP) in the SYSCFG controller). To get the maximum performance on SRAM1 execution, physical remap should be selected (boot or software selection).

Execution can be performed from SRAM2 with maximum performance without any remap thanks to access through ICode bus.

On STM32L49x/L4Ax devices, the SRAM2 is aliased at address 0x2004 0000, offering a continuous address space with the SRAM1.

2.4.1 SRAM2 parity check

The user can enable the SRAM2 parity check using the option bit SRAM2_PE in the user option byte (refer to Section 3.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 norms.

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 3. SRAM2 organization

Page numberStart addressEnd address
Page 00x1000 00000x1000 03FF
Page 10x1000 04000x1000 07FF
Page 20x1000 08000x1000 0BFF
Page 30x1000 0C000x1000 0FFF
Page 40x1000 10000x1000 13FF
Page 50x1000 14000x1000 17FF
Page 60x1000 18000x1000 1BFF
Page 70x1000 1C000x1000 1FFF
Page 80x1000 20000x1000 23FF
Page 90x1000 24000x1000 27FF
Page 100x1000 28000x1000 2BFF
Page 110x1000 2C000x1000 2FFF
Page 120x1000 30000x1000 33FF
Page 130x1000 34000x1000 37FF
Page 140x1000 38000x1000 3BFF
Page 150x1000 3C000x1000 3FFF
Page 160x1000 40000x1000 43FF
Page 170x1000 44000x1000 47FF
Page 180x1000 48000x1000 4BFF
Page 190x1000 4C000x1000 4FFF
Page 200x1000 50000x1000 53FF
Page 210x1000 54000x1000 57FF
Page 220x1000 58000x1000 5BFF

Table 3. SRAM2 organization (continued)

Page numberStart addressEnd address
Page 230x1000 5C000x1000 5FFF
Page 240x1000 60000x1000 63FF
Page 250x1000 64000x1000 67FF
Page 260x1000 68000x1000 6BFF
Page 270x1000 6C000x1000 6FFF
Page 280x1000 70000x1000 73FF
Page 290x1000 74000x1000 77FF
Page 300x1000 78000x1000 7BFF
Page 310x1000 7C000x1000 7FFF
STM32L49x/L4Ax devices only
Page 320x1000 80000x1000 83FF
Page 330x1000 84000x1000 87FF
Page 340x1000 88000x1000 8BFF
Page 350x1000 8C000x1000 8FFF
Page 360x1000 90000x1000 93FF
Page 370x1000 94000x1000 97FF
Page 380x1000 98000x1000 9BFF
Page 390x1000 9C000x1000 9FFF
Page 400x1000 A0000x1000 A3FF
Page 410x1000 A4000x1000 A7FF
Page 420x1000 A8000x1000 ABFF
Page 430x1000 AC000x1000 AFFF
Page 440x1000 B0000x1000 B3FF
Page 450x1000 B4000x1000 B7FF
Page 460x1000 B8000x1000 BBFF
Page 470x1000 BC000x1000 BFFF
Page 480x1000 C0000x1000 C3FF
Page 490x1000 C4000x1000 C7FF
Page 500x1000 C8000x1000 CBFF
Page 510x1000 CC000x1000 CFFF
Page 520x1000 D0000x1000 D3FF
Page 530x1000 D4000x1000 D7FF
Page 540x1000 D8000x1000 DBFF
Page 550x1000 DC000x1000 DFFF
Page 560x1000 E0000x1000 E3FF
Table 3. SRAM2 organization (continued)
Page numberStart addressEnd address
Page 570x1000 E4000x1000 E7FF
Page 580x1000 E8000x1000 EBFF
Page 590x1000 EC000x1000 EFFF
Page 600x1000 F0000x1000 F3FF
Page 610x1000 F4000x1000 F7FF
Page 620x1000 F8000x1000 FBFF
Page 630x1000 FC000x1000 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 by writing '1' on a bit it 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 3.5.1: Read 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 user option byte (refer to Section 3.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) .

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 Refer to Section 3: Embedded Flash memory (FLASH) for more details.

2.6 Boot configuration

2.6.1 Boot configuration for STM32L47x/L48x devices

In the STM32L47x/L48x devices, three different boot modes can be selected through the BOOT0 pin and nBOOT1 bit in the User option byte, as shown in the following table.

Table 4. Boot modes

Boot mode selectionBoot modeAliasings
BOOT1 (1)BOOT0
x0Main Flash memoryMain Flash memory is selected as boot area
01System memorySystem memory is selected as boot area
11Embedded SRAM1Embedded SRAM1 is selected as boot area

1. The BOOT1 value is the opposite of the nBOOT1 Option Bit.

The values on both BOOT0 pin and nBOOT1 bit are latched after a reset. It is up to the user to set nBOOT1 and BOOT0 to select the required boot mode.

The BOOT0 pin and nBOOT1 bit are also re-sampled when exiting from Standby mode. Consequently they must be kept in the required Boot mode configuration in Standby mode. After this startup delay has elapsed, the CPU fetches the top-of-stack value from address 0x0000 0000, then starts code execution from the boot memory at 0x0000 0004.

Depending on the selected boot mode, main Flash memory, system memory or SRAM1 is accessible as follows:

Note: When the device boots from SRAM, in the application initialization code, you have to relocate the vector table in SRAM using the NVIC exception table and the offset register.

When booting from the main Flash memory, the application software can either boot from bank 1 or from bank 2. By default, boot from bank 1 is selected.

To select boot from Flash memory bank 2, set the BFB2 bit in the user option bytes. When this bit is set and the boot pins are in the “boot from main Flash memory” configuration, the device boots from system memory, and the boot loader jumps to execute the user application programmed in Flash memory bank 2. The system memory remains aliased to the boot memory space (0x0000 0000). For further details, please refer to AN2606.

Note: When booting from bank 2, the boot loader will swap the Flash memory banks. Consequently, in the application initialization code, you have to relocate the vector table to bank 2 swapped base address (0x0800 0000) using the NVIC exception table and offset register.

Physical remap

Once the boot pins are selected, the application software can modify the memory accessible in the code area (in this way the code can be executed through the ICode bus in place of the System bus). This modification is performed by programming the SYSCFG memory remap register (SYSCFG_MEMRMP) in the SYSCFG controller.

The following memories can thus be remapped:

Table 5. Memory mapping versus boot mode/physical remap

AddressesBoot/remap in main Flash memoryBoot/remap in embedded SRAM 1Boot/remap in system memoryRemap in FSMCRemap in QUADSPI
0x2000 0000 - 0x2001 7FFFSRAM1SRAM1SRAM1SRAM1SRAM1
0x1FFF 0000 - 0x1FFF FFFFSystem memory/OTP/Options bytesSystem memory/OTP/Options bytesSystem memory/OTP/Options bytesSystem memory/OTP/Options bytesSystem memory/OTP/Options bytes
0x1000 8000 - 0x1FFE FFFFReservedReservedReservedReservedReserved
0x1000 0000 - 0x1000 7FFFSRAM2SRAM2SRAM2SRAM2SRAM2
0x0810 0000 - 0x0FFF FFFFReservedReservedReservedReservedReserved
0x0800 0000 - 0x080F FFFFFlash memoryFlash memoryFlash memoryFlash memoryFlash memory
0x0400 0000 - 0x07FF FFFFReservedReservedReservedFSMC bank 1 NOR/PSRAM 2 (128 MB) AliasedQUADSPI bank (128 MB) Aliased
0x0010 0000 - 0x03FF FFFFReservedReservedReservedFSMC bank 1 NOR/PSRAM 1 (128 MB) AliasedQUADSPI bank (128 MB) Aliased
0x0000 0000 - 0x000F FFFF
(1) (2)
Flash (1 MB) AliasedSRAM1 (96 KB) AliasedSystem memory (28 KB) AliasedFSMC bank 1 NOR/PSRAM 1 (128 MB) AliasedQUADSPI bank (128 MB) Aliased

1. When the FSMC is remapped at address 0x0000 0000, only the first two regions of bank 1 memory controller (bank 1 NOR/PSRAM 1 and NOR/PSRAM 2) can be remapped. When the QUADSPI is remapped at address 0x0000 0000, only 128 MB are remapped. In remap mode, the CPU can access the external memory via ICode bus instead of system bus, which boosts up the performance.

2. Even when aliased in the boot memory space, the related memory is still accessible at its original memory space.

Embedded boot loader

The embedded boot loader is located in the System memory, programmed by ST during production. Refer to AN2606 STM32 microcontroller system memory boot mode.

2.6.2 Boot configuration for STM32L49x/L4Ax devices

In the STM32L49x/L4Ax devices, three different boot modes can be selected through the BOOT0 pin or the nBOOT0 bit into the FLASH_OPTR register (if the nSWBOOT0 bit is cleared into the FLASH_OPTR register), and nBOOT1 bit in FLASH_OPTR register, as shown in the following table.

Table 6. Boot modes

nBOOT1
FLASH_OPTR[23]
nBOOT0
FLASH_OPTR[27]
BOOT0
pin PH3
nSWBOOT0
FLASH_OPTR[26]
Boot Memory Space
Alias
XX01Main Flash memory is selected as boot area (1)
X1X0Main Flash memory is selected as boot area (2)
0X11Embedded SRAM1 is selected as boot area
00X0Embedded SRAM1 is selected as boot area
1X11System memory is selected as boot area
10X0System memory is selected as boot area

1. Empty flash will be handled by the bootloader.

2. Empty flash will generate a hard fault.

The values on both BOOT0 pin (coming from the pin or the option bit) and nBOOT1 bit are latched upon reset release. It is up to the user to set nBOOT1 and BOOT0 to select the required boot mode.

The BOOT0 pin or user option bit (depending on the nSWBOOT0 bit value in the FLASH_OPTR register), and nBOOT1 bit are also re-sampled when exiting from Standby mode. Consequently, they must be kept in the required Boot mode configuration in Standby mode. After this startup delay has elapsed, the CPU fetches the top-of-stack value from address 0x0000 0000, then starts code execution from the boot memory at 0x0000 0004.

Depending on the selected boot mode, main Flash memory, system memory or SRAM1 is accessible as follows:

(0x0800 0000). In other words, the Flash memory contents can be accessed starting from address 0x0000 0000 or 0x0800 0000.

PH3/BOOT0 GPIO is configured in:

Note: When the device boots from SRAM, in the application initialization code, you have to relocate the vector table in SRAM using the NVIC exception table and the offset register. When booting from the main Flash memory, the application software can either boot from bank 1 or from bank 2. By default, boot from bank 1 is selected. To select boot from Flash memory bank 2, set the BFB2 bit in the user option bytes. When this bit is set and the boot pins are in the boot from main Flash memory configuration, the device boots from system memory, and the boot loader jumps to execute the user application programmed in Flash memory bank 2. For further details, please refer to AN2606.

Physical remap

Once the boot pins mode is selected, the application software can modify the memory accessible in the code area (in this way the code can be executed through the ICode bus in place of the System bus). This modification is performed by programming the SYSCFG memory remap register (SYSCFG_MEMRMP) in the SYSCFG controller.

The following memories can thus be remapped:

Table 7. Memory mapping versus boot mode/physical remap

AddressesBoot/remap in main Flash memoryBoot/remap in embedded SRAM 1Boot/remap in system memoryRemap in FSMCRemap in QUADSPI
0x2000 0000 - 0x2003 FFFFSRAM1SRAM1SRAM1SRAM1SRAM1
0x1FFF 0000 - 0x1FFF FFFFSystem memory/OTP/Options bytesSystem memory/OTP/Options bytesSystem memory/OTP/Options bytesSystem memory/OTP/Options bytesSystem memory/OTP/Options bytes
0x1000 8000 - 0x1FFE FFFFReservedReservedReservedReservedReserved

Table 7. Memory mapping versus boot mode/physical remap (continued)

AddressesBoot/remap in main Flash memoryBoot/remap in embedded SRAM 1Boot/remap in system memoryRemap in FSMCRemap in QUADSPI
0x1000 0000 - 0x1000 FFFFSRAM2SRAM2SRAM2SRAM2SRAM2
0x0810 0000 - 0x0FFF FFFFReservedReservedReservedReservedReserved
0x0800 0000 - 0x080F FFFFFlash memoryFlash memoryFlash memoryFlash memoryFlash memory
0x0400 0000 - 0x07FF FFFFReservedReservedReservedFSMC bank 1
NOR/
PSRAM 2
(128 MB)
Aliased
QUADSPI
bank (128 MB)
Aliased
0x0010 0000 - 0x03FF FFFFReservedReservedReservedFSMC bank 1
NOR/
PSRAM 1
(128 MB)
Aliased
QUADSPI
bank (128 MB)
Aliased
0x0000 0000 - 0x000F FFFF
(1) (2)
Flash (1 MB)
Aliased
SRAM1
(256 KB)
Aliased
System
memory
(28 KB)
Aliased
FSMC bank 1
NOR/
PSRAM 1
(128 MB)
Aliased
QUADSPI
bank (128 MB)
Aliased
  1. 1. When the FSMC is remapped at address 0x0000 0000, only the first two regions of bank 1 memory controller (bank 1 NOR/PSRAM 1 and NOR/PSRAM 2) can be remapped. When the QUADSPI is remapped at address 0x0000 0000, only 128 MB are remapped. In remap mode, the CPU can access the external memory via ICode bus instead of system bus, which boosts up the performance.
  2. 2. Even when aliased in the boot memory space, the related memory is still accessible at its original memory space.

Embedded boot loader

The embedded boot loader is located in the system memory, programmed by ST during production. Refer to AN2606 STM32 microcontroller system memory boot mode.