9. System configuration controller (SYSCFG)

9.1 SYSCFG main features

The STM32L41xxx/42xxx/43xxx/44xxx/45xxx/46xxx devices feature a set of configuration registers. The main purposes of the system configuration controller are the following:

9.2 SYSCFG registers

9.2.1 SYSCFG memory remap register (SYSCFG_MEMRMP)

This register is used for specific configurations on memory remap.

Address offset: 0x00

Reset value: 0x0000 000X (X is the memory mode selected by the BOOT0 pin and BOOT1 option bit)

31302928272625242322212019181716
ResResResResResResResResResResResResResResResRes
1514131211109876543210
ResResResResResResResResResResResResResMEM_MODE
rwrwrw

Bits 31:3 Reserved, must be kept at reset value.

Bits 2:0 MEM_MODE : Memory mapping selection

These bits control the memory internal mapping at address 0x0000 0000. These bits are used to select the physical remap by software and so, bypass the BOOT mode setting. After reset these bits take the value selected by BOOT0 (pin or option bit depending on nSWBOOT0 option bit) and BOOT1 option bit.

000: Main Flash memory mapped at 0x00000000.

001: System Flash memory mapped at 0x00000000.

010: Reserved

011: SRAM1 mapped at 0x00000000.

100: Reserved

101: Reserved

110: QUADSPI memory mapped at 0x00000000.

111: Reserved

Note: In remap mode, the CPU can access the external memory via ICode bus instead of System bus which boosts up the performance.

9.2.2 SYSCFG configuration register 1 (SYSCFG_CFGR1)

Address offset: 0x04

Reset value: 0x7C00 0001

31302928272625242322212019181716
FPU_IE[5..0]ResResI2C4_FMPI2C3_FMPI2C2_FMPI2C1_FMPI2C_PB9_FMPI2C_PB8_FMPI2C_PB7_FMPI2C_PB6_FMP
rwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
ResResResResResResResBOOST_ENResResResResResResResFWDIS
rwrc_w0

Bits 31:26 FPU_IE[5..0] : Floating Point Unit interrupts enable bits

FPU_IE[5]: Inexact interrupt enable

FPU_IE[4]: Input denormal interrupt enable

FPU_IE[3]: Overflow interrupt enable

FPU_IE[2]: underflow interrupt enable

FPU_IE[1]: Divide-by-zero interrupt enable

FPU_IE[0]: Invalid operation interrupt enable

Bits 25:24 Reserved, must be kept at reset value.

Bit 23 I2C4_FMP : Fast-mode Plus driving capability activation

This bit enables the Fm+ driving mode on I2C4 pins selected through AF selection bits.

0: Fm+ mode is not enabled on I2C4 pins selected through AF selection bits

1: Fm+ mode is enabled on I2C4 pins selected through AF selection bits.

Bit 22 I2C3_FMP : I2C3 Fast-mode Plus driving capability activation

This bit enables the Fm+ driving mode on I2C3 pins selected through AF selection bits.

0: Fm+ mode is not enabled on I2C3 pins selected through AF selection bits

1: Fm+ mode is enabled on I2C3 pins selected through AF selection bits.

Bit 21 I2C2_FMP : I2C2 Fast-mode Plus driving capability activation

This bit enables the Fm+ driving mode on I2C2 pins selected through AF selection bits.

0: Fm+ mode is not enabled on I2C2 pins selected through AF selection bits

1: Fm+ mode is enabled on I2C2 pins selected through AF selection bits.

Bit 20 I2C1_FMP : I2C1 Fast-mode Plus driving capability activation

This bit enables the Fm+ driving mode on I2C1 pins selected through AF selection bits.

0: Fm+ mode is not enabled on I2C1 pins selected through AF selection bits

1: Fm+ mode is enabled on I2C1 pins selected through AF selection bits.

Bit 19 I2C_PB9_FMP : Fast-mode Plus (Fm+) driving capability activation on PB9

This bit enables the Fm+ driving mode for PB9.

0: PB9 pin operates in standard mode.

1: Fm+ mode enabled on PB9 pin, and the Speed control is bypassed.

Bit 18 I2C_PB8_FMP : Fast-mode Plus (Fm+) driving capability activation on PB8

This bit enables the Fm+ driving mode for PB8.

0: PB8 pin operates in standard mode.

1: Fm+ mode enabled on PB8 pin, and the Speed control is bypassed.

Bit 17 I2C_PB7_FMP : Fast-mode Plus (Fm+) driving capability activation on PB7

This bit enables the Fm+ driving mode for PB7.

0: PB7 pin operates in standard mode.

1: Fm+ mode enabled on PB7 pin, and the Speed control is bypassed.

Bit 16 I2C_PB6_FMP : Fast-mode Plus (Fm+) driving capability activation on PB6

This bit enables the Fm+ driving mode for PB6.

0: PB6 pin operates in standard mode.

1: Fm+ mode enabled on PB6 pin, and the Speed control is bypassed.

Bits 15:9 Reserved, must be kept at reset value.

Bit 8 BOOSTEN : I/O analog switch voltage booster enable

0: I/O analog switches are supplied by \( V_{DDA} \) voltage. This is the recommended configuration when using the ADC in high \( V_{DDA} \) voltage operation.

1: I/O analog switches are supplied by a dedicated voltage booster (supplied by \( V_{DD} \) ). This is the recommended configuration when using the ADC in low \( V_{DDA} \) voltage operation.

Bits 7:1 Reserved, must be kept at reset value.

Bit 0 FWDIS : Firewall disable

This bit is cleared by software to protect the access to the memory segments according to the Firewall configuration. Once enabled, the firewall cannot be disabled by software. Only a system reset set the bit.

0: Firewall protection enabled

1: Firewall protection disabled

9.2.3 SYSCFG external interrupt configuration register 1 (SYSCFG_EXTICR1)

Address offset: 0x08

Reset value: 0x0000 0000

31302928272625242322212019181716
ResResResResResResResResResResResResResResResRes
1514131211109876543210
ResEXTI3[2:0]ResEXTI2[2:0]ResEXTI1[2:0]ResEXTI0[2:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:15 Reserved, must be kept at reset value.

Bits 14:12 EXTI3[2:0] : EXTI 3 configuration bits

These bits are written by software to select the source input for the EXTI3 external interrupt.

000: PA[3] pin
001: PB[3] pin
010: PC[3] pin
011: PD[3] pin
100: PE[3] pin
101: Reserved
110: Reserved
111: PH[3] pin

Bit 11 Reserved, must be kept at reset value.

Bits 10:8 EXTI2[2:0] : EXTI 2 configuration bits

These bits are written by software to select the source input for the EXTI2 external interrupt.

000: PA[2] pin
001: PB[2] pin
010: PC[2] pin
011: PD[2] pin
100: PE[2] pin
101: Reserved
110: Reserved
111: Reserved

Bit 7 Reserved, must be kept at reset value.

Bits 6:4 EXTI1[2:0] : EXTI 1 configuration bits

These bits are written by software to select the source input for the EXTI1 external interrupt.

000: PA[1] pin
001: PB[1] pin
010: PC[1] pin
011: PD[1] pin
100: PE[1] pin
101: Reserved
110: Reserved
111: PH[1] pin

Bit 3 Reserved, must be kept at reset value.

Bits 2:0 EXTI0[2:0] : EXTI 0 configuration bits

These bits are written by software to select the source input for the EXTI0 external interrupt.

000: PA[0] pin
001: PB[0] pin
010: PC[0] pin
011: PD[0] pin
100: PE[0] pin
101: Reserved
110: Reserved
111: PH[0] pin

9.2.4 SYSCFG external interrupt configuration register 2 (SYSCFG_EXTICR2)

Address offset: 0x0C

Reset value: 0x0000 0000

31302928272625242322212019181716
ResResResResResResResResResResResResResResResRes
1514131211109876543210
ResEXTI7[2:0]ResEXTI6[2:0]ResEXTI5[2:0]ResEXTI4[2:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:15 Reserved, must be kept at reset value.

Bits 14:12 EXTI7[2:0] : EXTI 7 configuration bits

These bits are written by software to select the source input for the EXTI7 external interrupt.

Bit 11 Reserved, must be kept at reset value.

Bits 10:8 EXTI6[2:0] : EXTI 6 configuration bits

These bits are written by software to select the source input for the EXTI6 external interrupt.

Bit 7 Reserved, must be kept at reset value.

Bits 6:4 EXTI5[2:0] : EXTI 5 configuration bits

These bits are written by software to select the source input for the EXTI5 external interrupt.

Bit 3 Reserved, must be kept at reset value.

Bits 2:0 EXTI4[2:0] : EXTI 4 configuration bits

These bits are written by software to select the source input for the EXTI4 external interrupt.

Note: Some of the I/O pins mentioned in the above register may not be available on small packages.

9.2.5 SYSCFG external interrupt configuration register 3 (SYSCFG_EXTICR3)

Address offset: 0x10

Reset value: 0x0000 0000

31302928272625242322212019181716
ResResResResResResResResResResResResResResResRes
1514131211109876543210
ResEXTI11[2:0]ResEXTI10[2:0]ResEXTI9[2:0]ResEXTI8[2:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:15 Reserved, must be kept at reset value.

Bits 14:12 EXTI11[2:0] : EXTI 11 configuration bits

These bits are written by software to select the source input for the EXTI11 external interrupt.

000: PA[11] pin
001: PB[11] pin
010: PC[11] pin
011: PD[11] pin
100: PE[11] pin
101: Reserved
110: Reserved
111: Reserved

Bit 11 Reserved, must be kept at reset value.

Bits 10:8 EXTI10[2:0] : EXTI 10 configuration bits

These bits are written by software to select the source input for the EXTI10 external interrupt.

000: PA[10] pin
001: PB[10] pin
010: PC[10] pin
011: PD[10] pin
100: PE[10] pin
101: Reserved
110: Reserved
111: Reserved

Bit 7 Reserved, must be kept at reset value.

Bits 6:4 EXTI9[2:0] : EXTI 9 configuration bits

These bits are written by software to select the source input for the EXTI9 external interrupt.

000: PA[9] pin
001: PB[9] pin
010: PC[9] pin
011: PD[9] pin
100: PE[9] pin
101: Reserved
110: Reserved
111: Reserved

Bit 3 Reserved, must be kept at reset value.

Bits 2:0 EXTI8[2:0] : EXTI 8 configuration bits

These bits are written by software to select the source input for the EXTI8 external interrupt.

000: PA[8] pin
001: PB[8] pin
010: PC[8] pin
011: PD[8] pin
100: PE[8] pin
101: Reserved
110: Reserved
111: Reserved

Note: Some of the I/O pins mentioned in the above register may not be available on small packages.

9.2.6 SYSCFG external interrupt configuration register 4 (SYSCFG_EXTICR4)

Address offset: 0x14

Reset value: 0x0000 0000

31302928272625242322212019181716
ResResResResResResResResResResResResResResResRes
1514131211109876543210
ResEXTI15[2:0]ResEXTI14[2:0]ResEXTI13[2:0]ResEXTI12[2:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:15 Reserved, must be kept at reset value.

Bits 14:12 EXTI15[2:0] : EXTI15 configuration bits

These bits are written by software to select the source input for the EXTI15 external interrupt.

Bit 11 Reserved, must be kept at reset value.

Bits 10:8 EXTI14[2:0] : EXTI14 configuration bits

These bits are written by software to select the source input for the EXTI14 external interrupt.

Bit 7 Reserved, must be kept at reset value.

Bits 6:4 EXTI13[2:0] : EXTI13 configuration bits

These bits are written by software to select the source input for the EXTI13 external interrupt.

000: PA[13] pin
001: PB[13] pin
010: PC[13] pin
011: PD[13] pin
100: PE[13] pin
101: Reserved
110: Reserved
111: Reserved

Bit 3 Reserved, must be kept at reset value.

Bits 2:0 EXTI12[2:0] : EXTI12 configuration bits

These bits are written by software to select the source input for the EXTI12 external interrupt.

000: PA[12] pin
001: PB[12] pin
010: PC[12] pin
011: PD[12] pin
100: PE[12] pin
101: Reserved
110: Reserved
111: Reserved

Note: Some of the I/O pins mentioned in the above register may not be available on small packages.

9.2.7 SYSCFG SRAM2 control and status register (SYSCFG_SCSR)

Address offset: 0x18

System reset value: 0x0000 0000

31302928272625242322212019181716
ResResResResResResResResResResResResResResResRes
1514131211109876543210
ResResResResResResResResResResResResResResSRAM2
BSY
SRAM2
ER
rrw

Bits 31:2 Reserved, must be kept at reset value

Bit 1 SRAM2BSY : SRAM2 busy by erase operation

0: No SRAM2 erase operation is on going.
1: SRAM2 erase operation is on going.

Bit 0 SRAM2ER : SRAM2 Erase

Setting this bit starts a hardware SRAM2 erase operation. This bit is automatically cleared at the end of the SRAM2 erase operation.

Note: This bit is write-protected: setting this bit is possible only after the correct key sequence is written in the SYSCFG_SKR register.

9.2.8 SYSCFG configuration register 2 (SYSCFG_CFGR2)

Address offset: 0x1C

System reset value: 0x0000 0000

31302928272625242322212019181716
ResResResResResResResResResResResResResResResRes
1514131211109876543210
ResResResResResResResSPFResResResResECCLPVDLSPLCLL
rc_w1rsrsrsrs

Bits 31:9 Reserved, must be kept at reset value

Bit 8 SPF : SRAM2 parity error flag

This bit is set by hardware when an SRAM2 parity error is detected. It is cleared by software by writing '1'.

0: No SRAM2 parity error detected

1: SRAM2 parity error detected

Bits 7:4 Reserved, must be kept at reset value

Bit 3 ECCL : ECC Lock

This bit is set by software and cleared only by a system reset. It can be used to enable and lock the Flash ECC error connection to TIM1/15/16 Break input.

0: ECC error disconnected from TIM1/15/16 Break input.

1: ECC error connected to TIM1/15/16 Break input.

Bit 2 PVDL : PVD lock enable bit

This bit is set by software and cleared only by a system reset. It can be used to enable and lock the PVD connection to TIM1/15/16 Break input, as well as the PVDE and PLS[2:0] in the PWR_CR2 register.

0: PVD interrupt disconnected from TIM1/15/16 Break input. PVDE and PLS[2:0] bits can be programmed by the application.

1: PVD interrupt connected to TIM1/15/16 Break input, PVDE and PLS[2:0] bits are read only.

Bit 1 SPL : SRAM2 parity lock bit

This bit is set by software and cleared only by a system reset. It can be used to enable and lock the SRAM2 parity error signal connection to TIM1/15/16 Break inputs.

0: SRAM2 parity error signal disconnected from TIM1/15/16 Break inputs

1: SRAM2 parity error signal connected to TIM1/15/16 Break inputs

Bit 0 CLL : Cortex®-M4 LOCKUP (Hardfault) output enable bit

This bit is set by software and cleared only by a system reset. It can be used to enable and lock the connection of Cortex®-M4 LOCKUP (Hardfault) output to TIM1/15/16 Break input

0: Cortex®-M4 LOCKUP output disconnected from TIM1/15/16 Break inputs

1: Cortex®-M4 LOCKUP output connected to TIM1/15/16 Break inputs

9.2.9 SYSCFG SRAM2 write protection register (SYSCFG_SWPR)

Address offset: 0x20

System reset value: 0x0000 0000

31302928272625242322212019181716
P31WPP30WPP29WPP28WPP27WPP26WPP25WPP24WPP23WPP22WPP21WPP20WPP19WPP18WPP17WPP16WP
rsrsrsrsrsrsrsrsrsrsrsrsrsrsrsrs
1514131211109876543210
P15WPP14WPP13WPP12WPP11WPP10WPP9WPP8WPP7WPP6WPP5WPP4WPP3WPP2WPP1WPP0WP
rsrsrsrsrsrsrsrsrsrsrsrsrsrsrsrs

Bits 31:0 PxWP (x = 0 to 31): SRAM2 page x write protection

These bits are set by software and cleared only by a system reset.

0: Write protection of SRAM2 page x is disabled.

1: Write protection of SRAM2 page x is enabled.

Note: PxWP (x = 16 to 31) available on STM32L45x and STM32L46x devices only.

9.2.10 SYSCFG SRAM2 key register (SYSCFG_SKR)

Address offset: 0x24

System reset value: 0x0000 0000

31302928272625242322212019181716
ResResResResResResResResResResResResResResResRes
1514131211109876543210
ResResResResResResResResKEY[7:0]
wwwwwwww

Bits 31:8 Reserved, must be kept at reset value

Bits 7:0 KEY[7:0] : SRAM2 write protection key for software erase

The following steps are required to unlock the write protection of the SRAM2ER bit in the SYSCFG_CFGR2 register.

1. Write "0xCA" into Key[7:0]

2. Write "0x53" into Key[7:0]

Writing a wrong key reactivates the write protection.

9.2.11 SYSCFG register map

The following table gives the SYSCFG register map and the reset values.

Table 42. SYSCFG register map and reset values

OffsetRegister313029282726252423222120191817161514131211109876543210
0x00SYSCFG_MEMRMPRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MEM
MODE
Reset valuexxx
0x04SYSCFG_CFGR1FPU_IE[5:0]Res.Res.I2C4_FMPI2C3_FMPI2C2_FMPI2C1_FMPI2C_P99_FMPI2C_P89_FMPI2C_P87_FMPI2C_P86_FMPRes.Res.Res.Res.Res.Res.BOOSTENRes.Res.Res.Res.Res.Res.Res.FWDIS
Reset value0111110000000000001
0x08SYSCFG_EXTICR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EXTI3
[2:0]
Res.EXTI2
[2:0]
Res.Res.Res.Res.EXTI1
[2:0]
Res.Res.Res.Res.EXTI0
[2:0]
Reset value000000000000
0x0CSYSCFG_EXTICR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EXTI7
[2:0]
Res.EXTI6
[2:0]
Res.Res.Res.Res.EXTI5
[2:0]
Res.Res.Res.Res.EXTI4
[2:0]
Reset value000000000000
0x10SYSCFG_EXTICR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EXTI11
[2:0]
Res.EXTI10
[2:0]
Res.Res.Res.Res.EXTI9
[2:0]
Res.Res.Res.Res.EXTI8
[2:0]
Reset value000000000000
0x14SYSCFG_EXTICR4Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EXTI15
[2:0]
Res.EXTI14
[2:0]
Res.Res.Res.Res.EXTI13
[2:0]
Res.Res.Res.Res.EXTI12
[2:0]
Reset value000000000000
0x18SYSCFG_SCSRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SRAM2BSSRAM2ER
Reset value00
0x1CSYSCFG_CFGR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SPFRes.Res.Res.Res.Res.ECCLPVDLSPLCLL
Reset value00000
0x20SYSCFG_SWPRP31WPP30WPP29WPP28WPP27WPP26WPP25WPP24WPP23WPP22WPP21WPP20WPP19WPP18WPP17WPP16WPP15WPP14WPP13WPP12WPP11WPP10WPP9WPP8WPP7WPP6WPP5WPP4WPP3WPP2WPP1WPP0WP
Reset value00000000000000000000000000000000
0x24SYSCFG_SKRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.KEY
Reset value000000000

Refer to Section 2.2 on page 70 for the register boundary addresses.