RM0515-STM32WBA6
This document is addressed to application developers. It provides complete information on how to use the STM32WBA62xx, STM32WBA63xx, STM32WBA64xx, and STM32WBA65xx (hereinafter referred to as STM32WBA6xxx) microcontrollers, including ST state-of-the-art patented technology, and featuring 2.4 GHz wireless radio, memory and peripherals.
The STM32WBA6xxx are microcontrollers based on a single core (Arm ® Cortex ® -M33), with the following memory configurations:
- – 1-Mbyte flash + 256-Kbyte SRAM
- – 2-Mbyte flash + 512-Kbyte SRAM
For information on the Arm ® Cortex ® -M33 core, refer to the Cortex ® -M33 Technical Reference Manual available on http://infocenter.arm.com .
Related documents
- • STM32WBA6xxx datasheet (DS14736)
- • STM32WBA6xxx errata (ES0644)
Contents
| 1 | Documentation conventions . . . . . | 78 |
| 1.1 | General information . . . . . | 78 |
| 1.2 | List of abbreviations for registers . . . . . | 78 |
| 1.3 | Register reset value . . . . . | 78 |
| 1.4 | Glossary . . . . . | 79 |
| 2 | Memory and bus architecture . . . . . | 80 |
| 2.1 | System architecture . . . . . | 80 |
| 2.1.1 | CPU C-bus . . . . . | 81 |
| 2.1.2 | CPU S-bus . . . . . | 81 |
| 2.1.3 | GPDMA1-bus . . . . . | 81 |
| 2.1.4 | USB OTG_HS-bus . . . . . | 82 |
| 2.1.5 | Bus matrix . . . . . | 82 |
| 2.1.6 | AHB/APB bridges . . . . . | 82 |
| 2.2 | TrustZone ® security architecture . . . . . | 82 |
| 2.2.1 | Default TrustZone security state . . . . . | 84 |
| 2.2.2 | TrustZone peripheral classification . . . . . | 84 |
| 2.3 | Memory organization . . . . . | 87 |
| 2.3.1 | Introduction . . . . . | 87 |
| 2.3.2 | Memory map and register boundary addresses . . . . . | 88 |
| 2.3.3 | Embedded SRAM . . . . . | 93 |
| 2.3.4 | Flash memory overview . . . . . | 93 |
| 3 | System security . . . . . | 94 |
| 3.1 | Key security features . . . . . | 94 |
| 3.2 | Secure firmware install . . . . . | 95 |
| 3.3 | Secure boot . . . . . | 95 |
| 3.3.1 | Unique boot entry and BOOT_LOCK . . . . . | 95 |
| 3.3.2 | Immutable root of trust in system flash memory . . . . . | 96 |
| 3.4 | Secure firmware update . . . . . | 96 |
| 3.5 | Resource isolation using TrustZone . . . . . | 96 |
| 3.5.1 | TrustZone security architecture . . . . . | 97 |
| 3.5.2 | Armv8-M security extension of Cortex-M33 . . . . . | 97 |
| 3.5.3 | Memory and peripheral allocation using IDAU/SAU . . . . . | 98 |
| 3.5.4 | Memory and peripheral allocation using GTZC . . . . . | 100 |
| 3.5.5 | Managing security in TrustZone-aware peripherals . . . . . | 102 |
| 3.5.6 | Activating TrustZone security . . . . . | 109 |
| 3.5.7 | Deactivating TrustZone security . . . . . | 109 |
| 3.6 | Isolation of other resources . . . . . | 110 |
| 3.6.1 | Temporal isolation using secure hide protection (HDP) . . . . . | 110 |
| 3.6.2 | RSSLIB functions . . . . . | 110 |
| 3.6.3 | Resource isolation using Cortex privileged mode . . . . . | 111 |
| 3.7 | Secure execution . . . . . | 115 |
| 3.7.1 | Memory protection unit (MPU) . . . . . | 115 |
| 3.7.2 | Embedded flash memory write protection . . . . . | 115 |
| 3.7.3 | Tamper detection and response . . . . . | 116 |
| 3.8 | Secure storage . . . . . | 118 |
| 3.8.1 | Hardware secret key management . . . . . | 119 |
| 3.9 | Unique ID . . . . . | 119 |
| 3.10 | Crypto engines . . . . . | 119 |
| 3.10.1 | Crypto engines features . . . . . | 120 |
| 3.10.2 | Secure AES coprocessor (SAES) . . . . . | 121 |
| 3.11 | Product life cycle . . . . . | 121 |
| 3.11.1 | Life-cycle management with readout protection (RDP) . . . . . | 122 |
| 3.11.2 | Recommended option byte settings . . . . . | 125 |
| 3.12 | Access controlled debug . . . . . | 125 |
| 3.12.1 | Debug protection with readout protection (RDP) . . . . . | 125 |
| 3.13 | Software intellectual property protection and collaborative development . . . . . | 126 |
| 3.13.1 | Software intellectual property protection with RDP . . . . . | 126 |
| 3.13.2 | Other software intellectual property protections . . . . . | 127 |
| 4 | Boot modes . . . . . | 128 |
| 5 | Global TrustZone controller (GTZC) . . . . . | 130 |
| 5.1 | Introduction . . . . . | 130 |
| 5.2 | GTZC main features . . . . . | 130 |
| 5.3 | GTZC implementation . . . . . | 132 |
| 5.4 | GTZC functional description . . . . . | 133 |
| 5.4.1 | GTZC block diagram . . . . . | 133 |
- 5.4.2 Illegal access definition . . . . . 134
- 5.4.3 TrustZone security controller (TZSC) . . . . . 135
- 5.4.4 Memory protection controller - block based (MPCBB) . . . . . 135
- 5.4.5 TrustZone illegal access controller (TZIC) . . . . . 135
- 5.4.6 Power-on/reset state . . . . . 136
- 5.5 GTZC interrupts . . . . . 136
- 5.6 GTZC1 TZSC registers . . . . . 137
- 5.6.1 GTZC1 TZSC control register (GTZC1_TZSC_CR) . . . . . 137
- 5.6.2 GTZC1 TZSC secure configuration register 1
(GTZC1_TZSC_SECCFGR1) . . . . . 138 - 5.6.3 GTZC1 TZSC secure configuration register 2
(GTZC1_TZSC_SECCFGR2) . . . . . 140 - 5.6.4 GTZC1 TZSC secure configuration register 3
(GTZC1_TZSC_SECCFGR3) . . . . . 142 - 5.6.5 GTZC1 TZSC privilege configuration register 1
(GTZC1_TZSC_PRIVCFGR1) . . . . . 144 - 5.6.6 GTZC1 TZSC privilege configuration register 2
(GTZC1_TZSC_PRIVCFGR2) . . . . . 146 - 5.6.7 GTZC1 TZSC privilege configuration register 3
(GTZC1_TZSC_PRIVCFGR3) . . . . . 148 - 5.6.8 GTZC1 TZSC register map . . . . . 150
- 5.7 GTZC1 TZIC registers . . . . . 151
- 5.7.1 GTZC1 TZIC interrupt enable register 1 (GTZC1_TZIC_IER1) . . . . . 151
- 5.7.2 GTZC1 TZIC interrupt enable register 2 (GTZC1_TZIC_IER2) . . . . . 152
- 5.7.3 GTZC1 TZIC interrupt enable register 3 (GTZC1_TZIC_IER3) . . . . . 153
- 5.7.4 GTZC1 TZIC interrupt enable register 4 (GTZC1_TZIC_IER4) . . . . . 155
- 5.7.5 GTZC1 TZIC status register 1 (GTZC1_TZIC_SR1) . . . . . 157
- 5.7.6 GTZC1 TZIC status register 2 (GTZC1_TZIC_SR2) . . . . . 158
- 5.7.7 GTZC1 TZIC status register 3 (GTZC1_TZIC_SR3) . . . . . 160
- 5.7.8 GTZC1 TZIC status register 4 (GTZC1_TZIC_SR4) . . . . . 161
- 5.7.9 GTZC1 TZIC flag clear register 1 (GTZC1_TZIC_FCR1) . . . . . 163
- 5.7.10 GTZC1 TZIC flag clear register 2 (GTZC1_TZIC_FCR2) . . . . . 164
- 5.7.11 GTZC1 TZIC flag clear register 3 (GTZC1_TZIC_FCR3) . . . . . 166
- 5.7.12 GTZC1 TZIC flag clear register 4 (GTZC1_TZIC_FCR4) . . . . . 167
- 5.7.13 GTZC1 TZIC register map . . . . . 170
- 5.8 GTZC1 MPCBB registers . . . . . 171
- 5.8.1 GTZC1 MPCBB control register (GTZC1_MPCBB_CR) . . . . . 171
- 5.8.2 GTZC1 MPCBB configuration lock register
(GTZC1_MPCBB_CFGLOCK) . . . . . 172
| 5.8.3 | GTZC1 MPCBB security configuration for superblock n register (GTZC1_MPCBB_SECCFGGRn) ..... | 173 |
| 5.8.4 | GTZC1 MPCBB privileged configuration for superblock n register (GTZC1_MPCBB_PRIVCFGGRn) ..... | 173 |
| 5.8.5 | GTZC1 MPCBB1 and MPCBB2 register map ..... | 175 |
| 5.8.6 | GTZC1 MPCBB6 register map ..... | 177 |
| 6 | RAMs configuration controller (RAMCFG) ..... | 178 |
| 6.1 | Introduction ..... | 178 |
| 6.2 | RAMCFG main features ..... | 178 |
| 6.3 | RAMCFG functional description ..... | 178 |
| 6.3.1 | Internal SRAMs features ..... | 178 |
| 6.3.2 | Internal SRAM parity ..... | 179 |
| 6.3.3 | Internal SRAM write protection ..... | 180 |
| 6.3.4 | Internal SRAM read access latency ..... | 180 |
| 6.3.5 | Internal SRAM erase ..... | 181 |
| 6.4 | RAMCFG low-power modes ..... | 181 |
| 6.5 | RAMCFG interrupts ..... | 181 |
| 6.6 | RAMCFG registers ..... | 182 |
| 6.6.1 | RAMCFG SRAM1 control register (RAMCFG_M1CR) ..... | 182 |
| 6.6.2 | RAMCFG SRAM1 interrupt status register (RAMCFG_M1ISR) ..... | 182 |
| 6.6.3 | RAMCFG SRAMx erase key register (RAMCFG_MxERKEYR) ..... | 183 |
| 6.6.4 | RAMCFG SRAM2 control register (RAMCFG_M2CR) ..... | 183 |
| 6.6.5 | RAMCFG SRAM2 interrupt enable register (RAMCFG_M2IER) ..... | 184 |
| 6.6.6 | RAMCFG SRAM2 interrupt status register (RAMCFG_M2ISR) ..... | 185 |
| 6.6.7 | RAMCFG SRAM2 parity error address register (RAMCFG_M2PEAR) ..... | 185 |
| 6.6.8 | RAMCFG SRAM2 interrupt clear register (RAMCFG_M2ICR) ..... | 186 |
| 6.6.9 | RAMCFG SRAM2 write protection register 1 (RAMCFG_M2WPR1) ..... | 186 |
| 6.6.10 | RAMCFG SRAM2 write protection register 2 (RAMCFG_M2WPR2) ..... | 187 |
| 6.6.11 | RAMCFG register map ..... | 188 |
| 7 | Embedded flash memory (FLASH) ..... | 189 |
| 7.1 | Introduction ..... | 189 |
| 7.2 | FLASH main features ..... | 189 |
| 7.3 | FLASH functional description ..... | 190 |
- 7.3.1 Flash memory organization . . . . . 190
- 7.3.2 Error code correction (ECC) . . . . . 192
- 7.3.3 Read access latency . . . . . 193
- 7.3.4 Bank power-down mode . . . . . 195
- 7.3.5 Flash memory program and erase operations . . . . . 195
- 7.3.6 Flash memory erase sequences . . . . . 197
- 7.3.7 Flash memory programming sequences . . . . . 198
- 7.3.8 Flash memory programming erase suspend . . . . . 201
- 7.3.9 Flash memory endurance . . . . . 202
- 7.3.10 Flash memory errors flags . . . . . 202
- 7.3.11 Read-while-write (RWW) . . . . . 204
- 7.3.12 Power-down during programming or erase operations . . . . . 205
- 7.3.13 Reset during programming or erase operations . . . . . 205
- 7.4 FLASH option bytes . . . . . 206
- 7.4.1 Option bytes description . . . . . 206
- 7.4.2 Option bytes programming . . . . . 207
- 7.5 FLASH TrustZone security and privilege protections . . . . . 209
- 7.5.1 Trustzone security protection . . . . . 209
- 7.5.2 Watermark-based secure flash memory area protection . . . . . 210
- 7.5.3 Secure hide protection (HDP) . . . . . 210
- 7.5.4 Block-based secure flash memory area protection . . . . . 211
- 7.5.5 Flash security attribute state . . . . . 212
- 7.5.6 Block-based privileged flash memory area protection . . . . . 212
- 7.5.7 Flash memory registers privileged and unprivileged modes . . . . . 213
- 7.5.8 Flash memory bank attributes in case of bank swap . . . . . 213
- 7.6 Flash memory protection . . . . . 215
- 7.6.1 Write protection (WRP) . . . . . 215
- 7.6.2 Readout protection (RDP) . . . . . 216
- 7.7 Summary of flash memory and registers access control . . . . . 225
- 7.8 FLASH interrupts . . . . . 228
- 7.9 FLASH registers . . . . . 229
- 7.9.1 FLASH access control register (FLASH_ACR) . . . . . 229
- 7.9.2 FLASH key register (FLASH_NSKEYR) . . . . . 231
- 7.9.3 FLASH secure key register (FLASH_SECKEYR) . . . . . 231
- 7.9.4 FLASH option key register (FLASH_OPTKEYR) . . . . . 232
- 7.9.5 FLASH bank 1 power-down key register (FLASH_PDKEY1R) . . . . . 232
| 7.9.6 | FLASH bank 2 power-down key register (FLASH_PDKEY2R) . . . . . | 233 |
| 7.9.7 | FLASH status register (FLASH_NSSR) . . . . . | 233 |
| 7.9.8 | FLASH secure status register (FLASH_SECSR) . . . . . | 235 |
| 7.9.9 | FLASH control register (FLASH_NSCR1) . . . . . | 236 |
| 7.9.10 | FLASH secure control register (FLASH_SECCR1) . . . . . | 238 |
| 7.9.11 | FLASH ECC register (FLASH_ECCR) . . . . . | 239 |
| 7.9.12 | FLASH operation status register (FLASH_OPSR) . . . . . | 240 |
| 7.9.13 | FLASH control 2 register (FLASH_NSCR2) . . . . . | 242 |
| 7.9.14 | FLASH secure control 2 register (FLASH_SECCR2) . . . . . | 242 |
| 7.9.15 | FLASH option register (FLASH_OPTR) . . . . . | 243 |
| 7.9.16 | FLASH boot address 0 register (FLASH_NSBOOTADD0R) . . . . . | 245 |
| 7.9.17 | FLASH boot address 1 register (FLASH_NSBOOTADD1R) . . . . . | 246 |
| 7.9.18 | FLASH secure boot address 0 register (FLASH_SECBOOTADD0R) . . . . . | 246 |
| 7.9.19 | FLASH bank 1 secure watermark register 1 (FLASH_SECWM1R1) . . . . . | 247 |
| 7.9.20 | FLASH bank 1 secure watermark register 2 (FLASH_SECWM1R2) . . . . . | 248 |
| 7.9.21 | FLASH WRP bank 1 area A address register (FLASH_WRP1AR) . . . . . | 248 |
| 7.9.22 | FLASH WRP bank 1 area B address register (FLASH_WRP1BR) . . . . . | 249 |
| 7.9.23 | FLASH bank 2 secure watermark register 1 (FLASH_SECWM2R1) . . . . . | 250 |
| 7.9.24 | FLASH bank 2 secure watermark register 2 (FLASH_SECWM2R2) . . . . . | 250 |
| 7.9.25 | FLASH WRP bank 2 area A address register (FLASH_WRP2AR) . . . . . | 251 |
| 7.9.26 | FLASH WRP bank 2 area B address register (FLASH_WRP2BR) . . . . . | 251 |
| 7.9.27 | FLASH OEM1 key register 1 (FLASH_OEM1KEYR1) . . . . . | 252 |
| 7.9.28 | FLASH OEM1 key register 2 (FLASH_OEM1KEYR2) . . . . . | 253 |
| 7.9.29 | FLASH OEM2 key register 1 (FLASH_OEM2KEYR1) . . . . . | 253 |
| 7.9.30 | FLASH OEM2 key register 2 (FLASH_OEM2KEYR2) . . . . . | 254 |
| 7.9.31 | FLASH bank 1 secure block based register x (FLASH_SECB1Rx) . . . . . | 254 |
| 7.9.32 | FLASH bank 2 secure block based register x (FLASH_SECB2Rx) . . . . . | 255 |
| 7.9.33 | FLASH secure HDP control register (FLASH_SECHDPCR) . . . . . | 255 |
| 7.9.34 | FLASH privilege configuration register (FLASH_PRIVCFGR) . . . . . | 256 |
| 7.9.35 | FLASH bank 1 privilege block based register x (FLASH_PRIVB1Rx) . . . . . | 257 |
| 7.9.36 | FLASH bank 2 privilege block based register x (FLASH_PRIVB2Rx) . . . . . | 257 |
| 7.9.37 | FLASH register map . . . . . | 258 |
| 8 | Instruction cache (ICACHE) . . . . . | 263 |
| 8.1 | ICACHE introduction . . . . . | 263 |
| 8.2 | ICACHE main features . . . . . | 263 |
| 8.3 | ICACHE implementation . . . . . | 264 |
| 8.4 | ICACHE functional description . . . . . | 264 |
| 8.4.1 | ICACHE block diagram . . . . . | 265 |
| 8.4.2 | ICACHE reset and clocks . . . . . | 265 |
| 8.4.3 | ICACHE TAG memory . . . . . | 266 |
| 8.4.4 | Direct-mapped ICACHE (1-way cache) . . . . . | 267 |
| 8.4.5 | ICACHE enable . . . . . | 268 |
| 8.4.6 | Cacheable and noncacheable traffic . . . . . | 268 |
| 8.4.7 | Address remapping . . . . . | 269 |
| 8.4.8 | Cacheable accesses . . . . . | 271 |
| 8.4.9 | Dual-master cache . . . . . | 272 |
| 8.4.10 | ICACHE security . . . . . | 272 |
| 8.4.11 | ICACHE maintenance . . . . . | 272 |
| 8.4.12 | ICACHE performance monitoring . . . . . | 273 |
| 8.4.13 | ICACHE boot . . . . . | 273 |
| 8.5 | ICACHE low-power modes . . . . . | 273 |
| 8.6 | ICACHE error management and interrupts . . . . . | 274 |
| 8.7 | ICACHE registers . . . . . | 274 |
| 8.7.1 | ICACHE control register (ICACHE_CR) . . . . . | 274 |
| 8.7.2 | ICACHE status register (ICACHE_SR) . . . . . | 275 |
| 8.7.3 | ICACHE interrupt enable register (ICACHE_IER) . . . . . | 276 |
| 8.7.4 | ICACHE flag clear register (ICACHE_FCR) . . . . . | 276 |
| 8.7.5 | ICACHE hit monitor register (ICACHE_HMONR) . . . . . | 277 |
| 8.7.6 | ICACHE miss monitor register (ICACHE_MMONR) . . . . . | 277 |
| 8.7.7 | ICACHE region x configuration register (ICACHE_CRRx) . . . . . | 277 |
| 8.7.8 | ICACHE register map . . . . . | 278 |
| 9 | Radio system . . . . . | 280 |
| 9.1 | Introduction . . . . . | 280 |
| 9.2 | Main features . . . . . | 280 |
| 9.3 | 2.4 GHz RADIO implementation . . . . . | 281 |
| 9.4 | Functional description . . . . . | 281 |
| 9.4.1 | Block diagram . . . . . | 281 |
| 9.4.2 | Pins and internal signals . . . . . | 281 |
| 9.4.3 | Transmit output power . . . . . | 282 |
| 9.4.4 | Bluetooth AoA and AoD ..... | 283 |
| 9.4.5 | RXTX data SRAM access ..... | 283 |
| 9.5 | Low-power modes ..... | 283 |
| 10 | PTA converter (PTACONV) ..... | 285 |
| 10.1 | PTACONV introduction ..... | 285 |
| 10.2 | PTACONV main features ..... | 285 |
| 10.3 | PTACONV functional description ..... | 285 |
| 10.3.1 | PTACONV block diagram ..... | 286 |
| 10.3.2 | PTACONV pins and internal signals ..... | 287 |
| 10.4 | PTACONV in low-power modes ..... | 287 |
| 10.5 | PTACONV protocols ..... | 288 |
| 10.5.1 | PTACONV interface with the 2.4 GHz RADIO ..... | 291 |
| 10.6 | PTACONV registers ..... | 292 |
| 10.6.1 | PTACONV active control register (PTACONV_ACTCR) ..... | 292 |
| 10.6.2 | PTACONV priority control register (PTACONV_PRICR) ..... | 293 |
| 10.6.3 | PTACONV control register (PTACONV_CR) ..... | 293 |
| 10.6.4 | PTACONV register map ..... | 295 |
| 11 | Power control (PWR) ..... | 296 |
| 11.1 | Introduction ..... | 296 |
| 11.2 | PWR main features ..... | 296 |
| 11.3 | PWR pins and internal signals ..... | 297 |
| 11.4 | PWR power supplies and supply domains ..... | 299 |
| 11.4.1 | External power supplies ..... | 300 |
| 11.4.2 | Application power supply schemes ..... | 301 |
| 11.4.3 | Power-up and power-down power sequences ..... | 302 |
| 11.4.4 | Independent analog peripherals supply ..... | 303 |
| 11.4.5 | Independent GPIOG[15:2] I/O supply ..... | 303 |
| 11.4.6 | Independent USB transceiver supply ..... | 303 |
| 11.4.7 | USB OTG power management ..... | 304 |
| 11.4.8 | Radio peripherals supply ..... | 304 |
| 11.4.9 | Backup domain ..... | 305 |
| 11.4.10 | Internal regulators ..... | 305 |
| 11.5 | PWR system supply voltage regulation ..... | 305 |
| 11.5.1 | SMPS and LDO embedded regulators ..... | 305 |
| 11.5.2 | LDO and SMPS versus reset, voltage scaling, and low-power modes | 306 |
| 11.5.3 | LDO and SMPS step-down converter fast startup | 306 |
| 11.5.4 | Dynamic voltage scaling management | 306 |
| 11.5.5 | Deep sleep 2.4 GHz RADIO PA regulator | 307 |
| 11.6 | PWR power supply supervision | 308 |
| 11.6.1 | Brownout reset (BOR) | 308 |
| 11.6.2 | Programmable voltage detector (PVD) | 309 |
| 11.7 | PWR power management | 311 |
| 11.7.1 | PWR power modes | 311 |
| 11.7.2 | PWR background autonomous mode (BAM) | 318 |
| 11.7.3 | PWR Run mode | 320 |
| 11.7.4 | PWR low-power modes | 321 |
| 11.7.5 | PWR Sleep mode | 322 |
| 11.7.6 | PWR Stop 0 mode | 323 |
| 11.7.7 | PWR Stop 1 mode | 327 |
| 11.7.8 | PWR Stop 2 mode | 328 |
| 11.7.9 | PWR Standby mode | 330 |
| 11.7.10 | Power modes output pins | 333 |
| 11.8 | PWR security and privileged protection | 333 |
| 11.8.1 | PWR security protection | 333 |
| 11.8.2 | PWR privileged protection | 335 |
| 11.9 | PWR interrupts | 336 |
| 11.10 | PWR registers | 337 |
| 11.10.1 | PWR control register 1 (PWR_CR1) | 337 |
| 11.10.2 | PWR control register 2 (PWR_CR2) | 338 |
| 11.10.3 | PWR control register 3 (PWR_CR3) | 339 |
| 11.10.4 | PWR voltage scaling register (PWR_VOSR) | 340 |
| 11.10.5 | PWR supply voltage monitoring control register (PWR_SVMCR) | 342 |
| 11.10.6 | PWR wake-up control register 1 (PWR_WUCR1) | 343 |
| 11.10.7 | PWR wake-up control register 2 (PWR_WUCR2) | 344 |
| 11.10.8 | PWR wake-up control register 3 (PWR_WUCR3) | 345 |
| 11.10.9 | PWR disable Backup domain register (PWR_DBPR) | 347 |
| 11.10.10 | PWR security configuration register (PWR_SECCFGR) | 348 |
| 11.10.11 | PWR privilege control register (PWR_PRIVCFGR) | 349 |
| 11.10.12 | PWR status register (PWR_SR) | 350 |
| 11.10.13 | PWR supply voltage monitoring status register (PWR_SVMSR) | 351 |
| 11.10.14 | PWR wake-up status register (PWR_WUSR) . . . . . | 351 |
| 11.10.15 | PWR wake-up status clear register (PWR_WUSCR) . . . . . | 353 |
| 11.10.16 | PWR port A Standby IO retention enable register (PWR_IORETENRA) . . . . . | 354 |
| 11.10.17 | PWR port A Standby IO retention status register (PWR_IORETRA) . . . | 354 |
| 11.10.18 | PWR port B Standby IO retention enable register (PWR_IORETENRB) . . . . . | 355 |
| 11.10.19 | PWR port B Standby IO retention status register (PWR_IORETRB) . . . | 355 |
| 11.10.20 | PWR port C Standby IO retention enable register (PWR_IORETENRC) . . . . . | 356 |
| 11.10.21 | PWR port C Standby IO retention status register (PWR_IORETRC) . . . | 356 |
| 11.10.22 | PWR port D Standby IO retention enable register (PWR_IORETENRD) . . . . . | 357 |
| 11.10.23 | PWR port D Standby IO retention status register . . . (PWR_IORETRD) | 358 |
| 11.10.24 | PWR port E Standby IO retention enable register (PWR_IORETENRE) . . . . . | 358 |
| 11.10.25 | PWR port E Standby IO retention status register (PWR_IORETRE) . . . | 359 |
| 11.10.26 | PWR port G Standby IO retention enable register (PWR_IORETENRG) . . . . . | 359 |
| 11.10.27 | PWR port G Standby IO retention status register (PWR_IORETRG) . . . | 360 |
| 11.10.28 | PWR port H Standby IO retention enable register (PWR_IORETENRH) . . . . . | 360 |
| 11.10.29 | PWR port H Standby IO retention status register (PWR_IORETRH) . . . | 361 |
| 11.10.30 | PWR 2.4 GHz RADIO status and control register (PWR_RADIOSCR) . . . . . | 361 |
| 11.10.31 | PWR Stop 2 peripheral IOs retention register (PWR_S2RETR) . . . . . | 363 |
| 11.10.32 | PWR register map . . . . . | 364 |
| 12 | Reset and clock control (RCC) . . . . . | 367 |
| 12.1 | Introduction . . . . . | 367 |
| 12.2 | RCC pins and internal signals . . . . . | 367 |
| 12.3 | RCC reset functional description . . . . . | 367 |
| 12.3.1 | Power reset . . . . . | 367 |
| 12.3.2 | System reset . . . . . | 368 |
| 12.3.3 | Backup domain reset . . . . . | 369 |
| 12.3.4 | Individual peripheral reset . . . . . | 369 |
| 12.3.5 | CPU reset . . . . . | 369 |
| 12.4 | RCC clocks functional description . . . . . | 369 |
| 12.4.1 | HSE32 clock with trimming . . . . . | 371 |
| 12.4.2 | HSI16 clock . . . . . | 373 |
| 12.4.3 | PLL1 . . . . . | 374 |
| 12.4.4 | LSE clock . . . . . | 375 |
| 12.4.5 | LSI clock . . . . . | 377 |
| 12.4.6 | System clock (SYSCLK) selection . . . . . | 378 |
| 12.4.7 | Clock source frequency versus voltage scaling . . . . . | 380 |
| 12.4.8 | HSE32 clock security system (HSECSS) . . . . . | 380 |
| 12.4.9 | LSE clock security system on (LSECSS) . . . . . | 380 |
| 12.4.10 | ADC kernel clock . . . . . | 381 |
| 12.4.11 | RTC and TAMP kernel clock . . . . . | 381 |
| 12.4.12 | 2.4 GHz RADIO bus clock . . . . . | 382 |
| 12.4.13 | 2.4 GHz RADIO kernel clocks . . . . . | 382 |
| 12.4.14 | Timer kernel clock . . . . . | 383 |
| 12.4.15 | Independent watchdog kernel clock . . . . . | 383 |
| 12.4.16 | USB OTG_HS clock . . . . . | 384 |
| 12.4.17 | SysTick calibration value register . . . . . | 384 |
| 12.4.18 | Clock-out capability . . . . . | 384 |
| 12.4.19 | Internal/external clock measurement . . . . . | 385 |
| 12.4.20 | Audio synchronization . . . . . | 386 |
| 12.4.21 | Peripherals clock gating and autonomous mode . . . . . | 388 |
| 12.5 | RCC security and privilege functional description . . . . . | 390 |
| 12.5.1 | RCC TrustZone® security protection modes . . . . . | 390 |
| 12.5.2 | RCC privilege protection modes . . . . . | 392 |
| 12.6 | RCC low-power modes . . . . . | 393 |
| 12.7 | RCC interrupts . . . . . | 394 |
| 12.8 | RCC registers . . . . . | 395 |
| 12.8.1 | RCC clock control register (RCC_CR) . . . . . | 395 |
| 12.8.2 | RCC internal clock sources calibration register 3 (RCC_ICSCR3) . . . . . | 397 |
| 12.8.3 | RCC clock configuration register 1 (RCC_CFGR1) . . . . . | 398 |
| 12.8.4 | RCC clock configuration register 2 (RCC_CFGR2) . . . . . | 399 |
| 12.8.5 | RCC clock configuration register 3 (RCC_CFGR3) . . . . . | 400 |
| 12.8.6 | RCC PLL1 configuration register (RCC_PLL1CFGR) . . . . . | 401 |
| 12.8.7 | RCC PLL1 dividers register (RCC_PLL1DIVR) . . . . . | 403 |
| 12.8.8 | RCC PLL1 fractional divider register (RCC_PLL1FRACR) . . . . . | 404 |
| 12.8.9 | RCC clock interrupt enable register (RCC_CIER) . . . . . | 405 |
| 12.8.10 | RCC clock interrupt flag register (RCC_CIFR) . . . . . | 406 |
| 12.8.11 | RCC clock interrupt clear register (RCC_CICR) . . . . . | 408 |
| 12.8.12 | RCC AHB1 peripheral reset register (RCC_AHB1RSTR) . . . . . | 410 |
| 12.8.13 | RCC AHB2 peripheral reset register (RCC_AHB2RSTR) . . . . . | 410 |
| 12.8.14 | RCC AHB4 peripheral reset register (RCC_AHB4RSTR) . . . . . | 413 |
| 12.8.15 | RCC AHB5 peripheral reset register (RCC_AHB5RSTR) . . . . . | 414 |
| 12.8.16 | RCC APB1 peripheral reset register 1 (RCC_APB1RSTR1) . . . . . | 414 |
| 12.8.17 | RCC APB1 peripheral reset register 2 (RCC_APB1RSTR2) . . . . . | 416 |
| 12.8.18 | RCC APB2 peripheral reset register (RCC_APB2RSTR) . . . . . | 417 |
| 12.8.19 | RCC APB7 peripheral reset register (RCC_APB7RSTR) . . . . . | 418 |
| 12.8.20 | RCC AHB1 peripheral clock enable register (RCC_AHB1ENR) . . . . . | 420 |
| 12.8.21 | RCC AHB2 peripheral clock enable register (RCC_AHB2ENR) . . . . . | 422 |
| 12.8.22 | RCC AHB4 peripheral clock enable register (RCC_AHB4ENR) . . . . . | 425 |
| 12.8.23 | RCC AHB5 peripheral clock enable register (RCC_AHB5ENR) . . . . . | 426 |
| 12.8.24 | RCC APB1 peripheral clock enable register 1 (RCC_APB1ENR1) . . . . . | 427 |
| 12.8.25 | RCC APB1 peripheral clock enable register 2 (RCC_APB1ENR2) . . . . . | 429 |
| 12.8.26 | RCC APB2 peripheral clock enable register (RCC_APB2ENR) . . . . . | 430 |
| 12.8.27 | RCC APB7 peripheral clock enable register (RCC_APB7ENR) . . . . . | 431 |
| 12.8.28 | RCC AHB1 peripheral clocks enable in Sleep and Stop modes register (RCC_AHB1SMENR) . . . . . | 433 |
| 12.8.29 | RCC AHB2 peripheral clocks enable in Sleep and Stop modes register (RCC_AHB2SMENR) . . . . . | 435 |
| 12.8.30 | RCC AHB4 peripheral clocks enable in Sleep and Stop modes register (RCC_AHB4SMENR) . . . . . | 439 |
| 12.8.31 | RCC AHB5 peripheral clocks enable in Sleep and Stop modes register (RCC_AHB5SMENR) . . . . . | 439 |
| 12.8.32 | RCC APB1 peripheral clocks enable in Sleep and Stop modes register 1 (RCC_APB1SMENR1) . . . . . | 440 |
| 12.8.33 | RCC APB1 peripheral clocks enable in Sleep and Stop modes register 2 (RCC_APB1SMENR2) . . . . . | 443 |
| 12.8.34 | RCC APB2 peripheral clocks enable in Sleep and Stop modes register (RCC_APB2SMENR) . . . . . | 444 |
| 12.8.35 | RCC APB7 peripheral clock enable in Sleep and Stop modes register (RCC_APB7SMENR) . . . . . | 445 |
| 12.8.36 | RCC peripherals independent clock configuration register 1 (RCC_CCIPR1) . . . . . | 448 |
| 12.8.37 | RCC peripherals independent clock configuration register 2 (RCC_CCIPR2) . . . . . | 451 |
| 12.8.38 | RCC peripherals independent clock configuration register 3 (RCC_CCIPR3) . . . . . | 452 |
| 12.8.39 | RCC Backup domain control register (RCC_BDCR1) . . . . . | 454 |
| 12.8.40 | RCC control/status register (RCC_CSR) . . . . . | 458 |
| 12.8.41 | RCC Backup domain control register (RCC_BDCR2) . . . . . | 460 |
| 12.8.42 | RCC secure configuration register (RCC_SECCFGR) . . . . . | 461 |
| 12.8.43 | RCC privilege configuration register (RCC_PRIVCFGR) . . . . . | 462 |
| 12.8.44 | RCC audio synchronization control register (RCC_ASCR) . . . . . | 463 |
| 12.8.45 | RCC audio synchronization interrupt enable register (RCC_ASIER) . . . . . | 464 |
| 12.8.46 | RCC audio synchronization status register (RCC_ASSR) . . . . . | 464 |
| 12.8.47 | RCC audio synchronization counter register (RCC_ASCNTR) . . . . . | 465 |
| 12.8.48 | RCC audio synchronization auto-reload register (RCC_ASARR) . . . . . | 465 |
| 12.8.49 | RCC audio synchronization capture register (RCC_ASCAR) . . . . . | 466 |
| 12.8.50 | RCC audio synchronization compare register (RCC_ASCOR) . . . . . | 466 |
| 12.8.51 | RCC clock configuration register 2 (RCC_CFGR4) . . . . . | 467 |
| 12.8.52 | RCC RADIO peripheral clock enable register (RCC_RADIOENR) . . . . . | 468 |
| 12.8.53 | RCC external clock sources calibration register 1(RCC_ECSCR1) . . . . . | 469 |
| 12.8.54 | RCC register map . . . . . | 470 |
| 13 | Hardware semaphore (HSEM) . . . . . | 476 |
| 13.1 | HSEM introduction . . . . . | 476 |
| 13.2 | HSEM main features . . . . . | 476 |
| 13.3 | Functional description . . . . . | 477 |
| 13.3.1 | HSEM block diagram . . . . . | 477 |
| 13.3.2 | HSEM internal signals . . . . . | 477 |
| 13.3.3 | HSEM lock procedures . . . . . | 477 |
| 13.3.4 | HSEM write/read/read lock register address . . . . . | 479 |
| 13.3.5 | HSEM unlock procedures . . . . . | 479 |
| 13.3.6 | HSEM LOCKID semaphore clear . . . . . | 480 |
| 13.3.7 | HSEM interrupts . . . . . | 480 |
| 13.3.8 | Semaphore attributes . . . . . | 482 |
| 13.4 | HSEM registers . . . . . | 484 |
| 13.4.1 | HSEM register semaphore x (HSEM_Rx) . . . . . | 484 |
| 13.4.2 | HSEM read lock register semaphore x (HSEM_RLRx) . . . . . | 486 |
| 13.4.3 | HSEM nonsecure interrupt enable register (HSEM_IER) . . . . . | 487 |
| 13.4.4 | HSEM nonsecure interrupt clear register (HSEM_ICR) . . . . . | 488 |
| 13.4.5 | HSEM nonsecure interrupt status register (HSEM_ISR) . . . . . | 488 |
| 13.4.6 | HSEM nonsecure interrupt status register (HSEM_MISR) . . . . . | 489 |
| 13.4.7 | HSEM secure interrupt enable register (HSEM_SIER) . . . . . | 490 |
| 13.4.8 | HSEM secure interrupt clear register (HSEM_SICR) . . . . . | 490 |
| 13.4.9 | HSEM secure interrupt status register (HSEM_SISR) . . . . . | 491 |
| 13.4.10 | HSEM secure masked interrupt status register (HSEM_SMISR) . . . . | 492 |
| 13.4.11 | HSEM security configuration register (HSEM_SECCFGR) . . . . . | 492 |
| 13.4.12 | HSEM privilege configuration register (HSEM_PRIVCFGR) . . . . . | 493 |
| 13.4.13 | HSEM clear register (HSEM_CR) . . . . . | 494 |
| 13.4.14 | HSEM clear semaphore key register (HSEM_KEYR) . . . . . | 494 |
| 13.4.15 | HSEM register map . . . . . | 496 |
| 14 | General-purpose I/Os (GPIO) . . . . . | 498 |
| 14.1 | GPIO introduction . . . . . | 498 |
| 14.2 | GPIO main features . . . . . | 498 |
| 14.3 | GPIO implementation . . . . . | 498 |
| 14.4 | GPIO functional description . . . . . | 499 |
| 14.4.1 | GPIO general-purpose I/O . . . . . | 500 |
| 14.4.2 | GPIO pin alternate function multiplexer and mapping . . . . . | 501 |
| 14.4.3 | GPIO port additional function multiplexer . . . . . | 501 |
| 14.4.4 | GPIO port control registers . . . . . | 502 |
| 14.4.5 | GPIO port data registers . . . . . | 502 |
| 14.4.6 | GPIO data bitwise handling . . . . . | 502 |
| 14.4.7 | GPIO locking mechanism . . . . . | 502 |
| 14.4.8 | GPIO alternate function input/output . . . . . | 503 |
| 14.4.9 | GPIO external interrupt/wake-up lines . . . . . | 503 |
| 14.4.10 | GPIO input configuration . . . . . | 503 |
| 14.4.11 | GPIO output configuration . . . . . | 504 |
| 14.4.12 | GPIO alternate function configuration . . . . . | 504 |
| 14.4.13 | GPIO analog configuration . . . . . | 505 |
| 14.4.14 | High-speed low-voltage mode (HSLV) . . . . . | 505 |
| 14.4.15 | GPIO compensation cell . . . . . | 506 |
| 14.4.16 | GPIO standby retention . . . . . | 506 |
| 14.4.17 | GPIO using the LSE oscillator pins as GPIOs . . . . . | 506 |
| 14.4.18 | GPIO using GPIO pins with RTC . . . . . | 506 |
| 14.4.19 | GPIO using PH3 as GPIO . . . . . | 506 |
| 14.4.20 | GPIO using PD6 and PD7 . . . . . | 506 |
| 14.4.21 | GPIO TrustZone ® security . . . . . | 507 |
| 14.4.22 | GPIO privileged and unprivileged modes . . . . . | 508 |
| 14.5 | GPIO port A to B registers . . . . . | 509 |
| 14.5.1 | GPIO port x mode register (GPIOx_MODER) (x = A to B) . . . . . | 509 |
| 14.5.2 | GPIO port x output type register (GPIOx_OTYPER) (x = A to B) . . . . . | 509 |
| 14.5.3 | GPIO port x output speed register (GPIOx_OSPEEDR) (x = A to B) . . . | 510 |
| 14.5.4 | GPIO port x pull-up/pull-down register (GPIOx_PUPDR) (x = A to B) . . . | 511 |
| 14.5.5 | GPIO port x input data register (GPIOx_IDR) (x = A to B) . . . . . | 512 |
| 14.5.6 | GPIO port x output data register (GPIOx_ODR) (x = A to B) . . . . . | 512 |
| 14.5.7 | GPIO port x bit set/reset register (GPIOx_BSRR) (x = A to B) . . . . . | 512 |
| 14.5.8 | GPIO port x configuration lock register (GPIOx_LCKR) (x = A to B) . . . | 513 |
| 14.5.9 | GPIO port x alternate function low register (GPIOx_AFRL) (x = A to B) . . . . . | 514 |
| 14.5.10 | GPIO port x alternate function high register (GPIOx_AFRH) (x = A to B) . . . . . | 515 |
| 14.5.11 | GPIO port x bit reset register (GPIOx_BRR) (x = A to B) . . . . . | 516 |
| 14.5.12 | GPIO port x secure configuration register (GPIOx_SECCFGR) (x = A to B) . . . . . | 517 |
| 14.5.13 | GPIOA to B register map . . . . . | 518 |
| 14.6 | GPIO port C registers . . . . . | 520 |
| 14.6.1 | GPIO port C mode register (GPIOC_MODER) . . . . . | 520 |
| 14.6.2 | GPIO port C output type register (GPIOC_OTYPER) . . . . . | 520 |
| 14.6.3 | GPIO port C output speed register (GPIOC_OSPEEDR) . . . . . | 521 |
| 14.6.4 | GPIO port C pull-up/pull-down register (GPIOC_PUPDR) . . . . . | 522 |
| 14.6.5 | GPIO port C input data register (GPIOC_IDR) . . . . . | 523 |
| 14.6.6 | GPIO port C output data register (GPIOC_ODR) . . . . . | 523 |
| 14.6.7 | GPIO port C bit set/reset register (GPIOC_BSRR) . . . . . | 523 |
| 14.6.8 | GPIO port C configuration lock register (GPIOC_LCKR) . . . . . | 524 |
| 14.6.9 | GPIO port C alternate function low register (GPIOC_AFRL) . . . . . | 525 |
| 14.6.10 | GPIO port C alternate function high register (GPIOC_AFRH) . . . . . | 526 |
| 14.6.11 | GPIO port C bit reset register (GPIOC_BRR) . . . . . | 527 |
| 14.6.12 | GPIO port C secure configuration register (GPIOC_SECCFGR) . . . . . | 528 |
| 14.6.13 | GPIOC register map . . . . . | 529 |
| 14.7 | GPIO port D registers . . . . . | 530 |
| 14.7.1 | GPIO port D mode register (GPIOD_MODER) . . . . . | 530 |
| 14.7.2 | GPIO port D output type register (GPIOD_OTYPER) . . . . . | 530 |
| 14.7.3 | GPIO port D output speed register (GPIOD_OSPEEDR) . . . . . | 531 |
| 14.7.4 | GPIO port D pull-up/pull-down register (GPIOD_PUPDR) . . . . . | 532 |
| 14.7.5 | GPIO port D input data register (GPIOD_IDR) . . . . . | 533 |
| 14.7.6 | GPIO port D output data register (GPIOD_ODR) . . . . . | 533 |
| 14.7.7 | GPIO port D bit set/reset register (GPIOD_BSRR) . . . . . | 533 |
| 14.7.8 | GPIO port D configuration lock register (GPIOD_LCKR) . . . . . | 534 |
| 14.7.9 | GPIO port D alternate function low register (GPIOD_AFRL) . . . . . | 535 |
| 14.7.10 | GPIO port D alternate function high register (GPIO_D_AFRH) . . . . . | 536 |
| 14.7.11 | GPIO port D bit reset register (GPIO_D_BRR) . . . . . | 537 |
| 14.7.12 | GPIO port D high-speed low-voltage register (GPIO_D_HSLVR) . . . . . | 538 |
| 14.7.13 | GPIO port D secure configuration register (GPIO_D_SECCFGR) . . . . . | 538 |
| 14.7.14 | GPIO_D register map . . . . . | 539 |
| 14.8 | GPIO port E registers . . . . . | 540 |
| 14.8.1 | GPIO port E mode register (GPIO_E_MODER) . . . . . | 540 |
| 14.8.2 | GPIO port E output type register (GPIO_E_OTYPER) . . . . . | 540 |
| 14.8.3 | GPIO port E output speed register (GPIO_E_OSPEEDR) . . . . . | 541 |
| 14.8.4 | GPIO port E pull-up/pull-down register (GPIO_E_PUPDR) . . . . . | 541 |
| 14.8.5 | GPIO port E input data register (GPIO_E_IDR) . . . . . | 542 |
| 14.8.6 | GPIO port E output data register (GPIO_E_ODR) . . . . . | 542 |
| 14.8.7 | GPIO port E bit set/reset register (GPIO_E_BSRR) . . . . . | 543 |
| 14.8.8 | GPIO port E configuration lock register (GPIO_E_LCKR) . . . . . | 543 |
| 14.8.9 | GPIO port E alternate function low register (GPIO_E_AFRL) . . . . . | 544 |
| 14.8.10 | GPIO port E bit reset register (GPIO_E_BRR) . . . . . | 545 |
| 14.8.11 | GPIO port E high-speed low-voltage register (GPIO_E_HSLVR) . . . . . | 546 |
| 14.8.12 | GPIO port E secure configuration register (GPIO_E_SECCFGR) . . . . . | 546 |
| 14.8.13 | GPIO_E register map . . . . . | 548 |
| 14.9 | GPIO port G registers . . . . . | 549 |
| 14.9.1 | GPIO port G mode register (GPIO_G_MODER) . . . . . | 549 |
| 14.9.2 | GPIO port G output type register (GPIO_G_OTYPER) . . . . . | 549 |
| 14.9.3 | GPIO port G output speed register (GPIO_G_OSPEEDR) . . . . . | 550 |
| 14.9.4 | GPIO port G pull-up/pull-down register (GPIO_G_PUPDR) . . . . . | 551 |
| 14.9.5 | GPIO port G input data register (GPIO_G_IDR) . . . . . | 552 |
| 14.9.6 | GPIO port G output data register (GPIO_G_ODR) . . . . . | 552 |
| 14.9.7 | GPIO port G bit set/reset register (GPIO_G_BSRR) . . . . . | 552 |
| 14.9.8 | GPIO port G configuration lock register (GPIO_G_LCKR) . . . . . | 553 |
| 14.9.9 | GPIO port G alternate function low register (GPIO_G_AFRL) . . . . . | 554 |
| 14.9.10 | GPIO port G alternate function high register (GPIO_G_AFRH) . . . . . | 555 |
| 14.9.11 | GPIO port G bit reset register (GPIO_G_BRR) . . . . . | 556 |
| 14.9.12 | GPIO port G high-speed low-voltage register (GPIO_G_HSLVR) . . . . . | 557 |
| 14.9.13 | GPIO port G secure configuration register (GPIO_G_SECCFGR) . . . . . | 557 |
| 14.9.14 | GPIO_G register map . . . . . | 559 |
| 14.10 | GPIO port H registers . . . . . | 560 |
| 14.10.1 | GPIO port H mode register (GPIO_H_MODER) . . . . . | 560 |
| 14.10.2 | GPIO port H output type register (GPIO_H_OTYPER) . . . . . | 560 |
| 14.10.3 | GPIO port H output speed register (GPIOH_OSPEEDR) | 560 |
| 14.10.4 | GPIO port H pull-up/pull-down register (GPIOH_PUPDR) | 561 |
| 14.10.5 | GPIO port H input data register (GPIOH_IDR) | 562 |
| 14.10.6 | GPIO port H output data register (GPIOH_ODR) | 562 |
| 14.10.7 | GPIO port H bit set/reset register (GPIOH_BSRR) | 563 |
| 14.10.8 | GPIO port H configuration lock register (GPIOH_LCKR) | 563 |
| 14.10.9 | GPIO port H alternate function low register (GPIOH_AFRL) | 564 |
| 14.10.10 | GPIO port H bit reset register (GPIOH_BRR) | 565 |
| 14.10.11 | GPIO port H secure configuration register (GPIOH_SECCFGR) | 566 |
| 14.10.12 | GPIOH register map | 567 |
| 15 | System configuration controller (SYSCFG) | 568 |
| 15.1 | SYSCFG main features | 568 |
| 15.2 | SYSCFG functional description | 568 |
| 15.2.1 | I/O compensation cell management | 568 |
| 15.2.2 | Configuring the USB OTG_HS PHY | 569 |
| 15.2.3 | SYSCFG TrustZone® security and privilege | 570 |
| 15.3 | SYSCFG registers | 572 |
| 15.3.1 | SYSCFG secure configuration register (SYSCFG_SECCFGR) | 572 |
| 15.3.2 | SYSCFG configuration register 1 (SYSCFG_CFGR1) | 572 |
| 15.3.3 | SYSCFG FPU interrupt mask register (SYSCFG_FPUIMR) | 574 |
| 15.3.4 | SYSCFG CPU nonsecure lock register (SYSCFG_CNSLCKR) | 575 |
| 15.3.5 | SYSCFG CPU secure lock register (SYSCFG_CSLCKR) | 575 |
| 15.3.6 | SYSCFG configuration register 2 (SYSCFG_CFGR2) | 576 |
| 15.3.7 | SYSCFG memory erase status register (SYSCFG MESR) | 577 |
| 15.3.8 | SYSCFG compensation cell control/status register (SYSCFG_CCCSR) | 578 |
| 15.3.9 | SYSCFG compensation cell value register (SYSCFG_CCVR) | 579 |
| 15.3.10 | SYSCFG compensation cell code register (SYSCFG_CCCR) | 580 |
| 15.3.11 | SYSCFG RSS command register (SYSCFG_RSSCMDR) | 581 |
| 15.3.12 | SYSCFG USB OTG_HS PHY control register (SYSCFG_OTGHSPHYCR) | 581 |
| 15.3.13 | SYSCFG USB OTG_HS PHY tune register 2 (SYSCFG_OTGHSPHYTUNER2) | 582 |
| 15.3.14 | SYSCFG register map | 584 |
| 16 | Peripherals interconnect matrix | 586 |
| 16.1 | Introduction | 586 |
| 16.2 | Connection summary . . . . . | 586 |
| 16.3 | Interconnection details . . . . . | 587 |
| 16.3.1 | Master to slave interconnection for timers . . . . . | 587 |
| 16.3.2 | Triggers to ADC4 . . . . . | 588 |
| 16.3.3 | ADC4 analog watchdog as trigger to timers . . . . . | 588 |
| 16.3.4 | Clock sources to timers . . . . . | 589 |
| 16.3.5 | Triggers to low-power timers . . . . . | 590 |
| 16.3.6 | USB OTG_HS trigger to timer . . . . . | 590 |
| 16.3.7 | Internal analog signals to analog peripheral . . . . . | 591 |
| 16.3.8 | System errors as break signals to timers . . . . . | 591 |
| 16.3.9 | Triggers to GPDMA1 . . . . . | 591 |
| 16.3.10 | Internal tamper sources . . . . . | 592 |
| 16.3.11 | Triggers to communication peripherals . . . . . | 592 |
| 16.3.12 | Output from tamper . . . . . | 593 |
| 16.3.13 | Timers generating IRTIM signal . . . . . | 593 |
| 16.3.14 | From encryption keys to AES/SAES . . . . . | 594 |
| 16.3.15 | Blanking sources to comparators . . . . . | 594 |
| 16.3.16 | Comparators as inputs, triggers or break signals to timers . . . . . | 594 |
| 17 | General purpose direct memory access controller (GPDMA) . . . . . | 596 |
| 17.1 | GPDMA introduction . . . . . | 596 |
| 17.2 | GPDMA main features . . . . . | 596 |
| 17.3 | GPDMA implementation . . . . . | 597 |
| 17.3.1 | GPDMA channels . . . . . | 597 |
| 17.3.2 | GPDMA autonomous mode in low-power modes . . . . . | 598 |
| 17.3.3 | GPDMA requests . . . . . | 598 |
| 17.3.4 | GPDMA block requests . . . . . | 600 |
| 17.3.5 | GPDMA triggers . . . . . | 601 |
| 17.4 | GPDMA functional description . . . . . | 602 |
| 17.4.1 | GPDMA block diagram . . . . . | 602 |
| 17.4.2 | GPDMA channel state and direct programming without any linked-list . . . . . | 602 |
| 17.4.3 | GPDMA channel suspend and resume . . . . . | 603 |
| 17.4.4 | GPDMA channel abort and restart . . . . . | 604 |
| 17.4.5 | GPDMA linked-list data structure . . . . . | 605 |
| 17.4.6 | Linked-list item transfer execution . . . . . | 608 |
| 17.4.7 | GPDMA channel state and linked-list programming in run-to-completion mode . . . . . | 608 |
- 17.4.8 GPDMA channel state and linked-list programming in link step mode 612
- 17.4.9 GPDMA channel state and linked-list programming . . . . . 619
- 17.4.10 GPDMA FIFO-based transfers . . . . . 621
- 17.4.11 GPDMA transfer request and arbitration . . . . . 626
- 17.4.12 GPDMA triggered transfer . . . . . 630
- 17.4.13 GPDMA circular buffering with linked-list programming . . . . . 631
- 17.4.14 GPDMA secure/nonsecure channel . . . . . 633
- 17.4.15 GPDMA privileged/unprivileged channel . . . . . 634
- 17.4.16 GPDMA error management . . . . . 634
- 17.4.17 GPDMA autonomous mode . . . . . 636
- 17.5 GPDMA in debug mode . . . . . 637
- 17.6 GPDMA in low-power modes . . . . . 637
- 17.7 GPDMA interrupts . . . . . 638
- 17.8 GPDMA registers . . . . . 639
- 17.8.1 GPDMA secure configuration register (GPDMA_SECCFGR) . . . . . 639
- 17.8.2 GPDMA privileged configuration register (GPDMA_PRIVCFGR) . . . . . 640
- 17.8.3 GPDMA configuration lock register (GPDMA_RCFGLOCKR) . . . . . 640
- 17.8.4 GPDMA nonsecure masked interrupt status register
(GPDMA_MISR) . . . . . 641 - 17.8.5 GPDMA secure masked interrupt status register (GPDMA_SMISR) . . . . . 642
- 17.8.6 GPDMA channel x linked-list base address register
(GPDMA_CxLBAR) . . . . . 642 - 17.8.7 GPDMA channel x flag clear register (GPDMA_CxFCR) . . . . . 643
- 17.8.8 GPDMA channel x status register (GPDMA_CxSR) . . . . . 644
- 17.8.9 GPDMA channel x control register (GPDMA_CxCR) . . . . . 645
- 17.8.10 GPDMA channel x transfer register 1 (GPDMA_CxTR1) . . . . . 647
- 17.8.11 GPDMA channel x transfer register 2 (GPDMA_CxTR2) . . . . . 651
- 17.8.12 GPDMA channel x block register 1 (GPDMA_CxBR1) . . . . . 654
- 17.8.13 GPDMA channel x source address register (GPDMA_CxSAR) . . . . . 655
- 17.8.14 GPDMA channel x destination address register (GPDMA_CxDAR) . . . . . 656
- 17.8.15 GPDMA channel x linked-list address register (GPDMA_CxLLR) . . . . . 657
- 17.8.16 GPDMA register map . . . . . 659
18 Nested vectored interrupt controller (NVIC) . . . . . 661
- 18.1 NVIC main features . . . . . 661
- 18.2 Interrupt and exception vectors . . . . . 661
| 19 | Extended interrupts and event controller (EXTI) . . . . . | 665 |
| 19.1 | EXTI main features . . . . . | 665 |
| 19.2 | EXTI block diagram . . . . . | 665 |
| 19.2.1 | EXTI connections between peripherals and CPU . . . . . | 667 |
| 19.2.2 | EXTI interrupt/event mapping . . . . . | 667 |
| 19.3 | EXTI functional description . . . . . | 668 |
| 19.3.1 | EXTI configurable event input wake-up . . . . . | 668 |
| 19.3.2 | EXTI mux selection . . . . . | 669 |
| 19.4 | EXTI functional behavior . . . . . | 670 |
| 19.5 | EXTI event protection . . . . . | 670 |
| 19.5.1 | EXTI security protection . . . . . | 671 |
| 19.5.2 | EXTI privilege protection . . . . . | 671 |
| 19.6 | EXTI registers . . . . . | 672 |
| 19.6.1 | EXTI rising trigger selection register (EXTI_RTSR1) . . . . . | 672 |
| 19.6.2 | EXTI falling trigger selection register (EXTI_FTSR1) . . . . . | 673 |
| 19.6.3 | EXTI software interrupt event register (EXTI_SWIER1) . . . . . | 673 |
| 19.6.4 | EXTI rising edge pending register (EXTI_RPR1) . . . . . | 674 |
| 19.6.5 | EXTI falling edge pending register (EXTI_FPR1) . . . . . | 675 |
| 19.6.6 | EXTI security configuration register (EXTI_SECCFGR1) . . . . . | 675 |
| 19.6.7 | EXTI privilege configuration register (EXTI_PRIVCFGR1) . . . . . | 676 |
| 19.6.8 | EXTI external interrupt selection register (EXTI_EXTICR1) . . . . . | 676 |
| 19.6.9 | EXTI external interrupt selection register (EXTI_EXTICR2) . . . . . | 678 |
| 19.6.10 | EXTI external interrupt selection register (EXTI_EXTICR3) . . . . . | 680 |
| 19.6.11 | EXTI external interrupt selection register (EXTI_EXTICR4) . . . . . | 681 |
| 19.6.12 | EXTI lock register (EXTI_LOCKR) . . . . . | 683 |
| 19.6.13 | EXTI CPU wake-up with interrupt mask register (EXTI_IMR1) . . . . . | 683 |
| 19.6.14 | EXTI CPU wake-up with event mask register (EXTI_EMR1) . . . . . | 684 |
| 19.6.15 | EXTI register map . . . . . | 685 |
| 20 | Cyclic redundancy check calculation unit (CRC) . . . . . | 687 |
| 20.1 | CRC introduction . . . . . | 687 |
| 20.2 | CRC main features . . . . . | 687 |
| 20.3 | CRC functional description . . . . . | 688 |
| 20.3.1 | CRC block diagram . . . . . | 688 |
| 20.3.2 | CRC internal signals . . . . . | 688 |
| 20.3.3 | CRC operation . . . . . | 688 |
| 20.4 | CRC in low-power modes . . . . . | 690 |
| 20.5 | CRC registers . . . . . | 690 |
| 20.5.1 | CRC data register (CRC_DR) . . . . . | 690 |
| 20.5.2 | CRC independent data register (CRC_IDR) . . . . . | 690 |
| 20.5.3 | CRC control register (CRC_CR) . . . . . | 691 |
| 20.5.4 | CRC initial value (CRC_INIT) . . . . . | 692 |
| 20.5.5 | CRC polynomial (CRC_POL) . . . . . | 692 |
| 20.5.6 | CRC register map . . . . . | 693 |
| 21 | Analog-to-digital converter (ADC4) . . . . . | 694 |
| 21.1 | ADC introduction . . . . . | 694 |
| 21.2 | ADC main features . . . . . | 694 |
| 21.3 | ADC implementation . . . . . | 695 |
| 21.4 | ADC functional description . . . . . | 697 |
| 21.4.1 | ADC block diagram . . . . . | 697 |
| 21.4.2 | ADC pins and internal signals . . . . . | 698 |
| 21.4.3 | ADC voltage regulator (ADVREGEN) . . . . . | 699 |
| 21.4.4 | Calibration (ADCAL) . . . . . | 699 |
| 21.4.5 | ADC on-off control (ADEN, ADDIS, ADRDY) . . . . . | 701 |
| 21.4.6 | ADC clock (PRESC[3:0]) . . . . . | 703 |
| 21.4.7 | ADC connectivity . . . . . | 704 |
| 21.4.8 | Configuring the ADC . . . . . | 705 |
| 21.4.9 | Channel selection (CHSEL, SCANDIR, CHSELRMOD) . . . . . | 705 |
| 21.4.10 | Programmable sampling time (SMPx[2:0]) . . . . . | 706 |
| 21.4.11 | Single conversion mode (CONT = 0) . . . . . | 707 |
| 21.4.12 | Continuous conversion mode (CONT = 1) . . . . . | 707 |
| 21.4.13 | Starting conversions (ADSTART) . . . . . | 708 |
| 21.4.14 | Timings . . . . . | 709 |
| 21.4.15 | Stopping an ongoing conversion (ADSTP) . . . . . | 710 |
| 21.4.16 | Conversion on external trigger and trigger polarity (EXTSEL, EXTEN) . . . . . | 710 |
| 21.4.17 | Discontinuous mode (DISCEN) . . . . . | 711 |
| 21.4.18 | Programmable resolution (RES) - fast conversion mode . . . . . | 711 |
| 21.4.19 | End of conversion, end of sampling phase (EOC, EOSMP flags) . . . . . | 712 |
| 21.4.20 | End of conversion sequence (EOS flag) . . . . . | 713 |
| 21.4.21 | Example timing diagrams (single/continuous modes hardware/software triggers) . . . . . | 713 |
| 21.4.22 | Low-frequency trigger mode . . . . . | 715 |
| 21.4.23 | Data management . . . . . | 715 |
| 21.4.24 | Low-power features . . . . . | 719 |
| 21.4.25 | Analog window watchdog . . . . . | 723 |
| 21.4.26 | Oversampler . . . . . | 727 |
| 21.4.27 | Temperature sensor and internal reference voltage . . . . . | 730 |
| 21.5 | ADC in low-power modes . . . . . | 733 |
| 21.6 | ADC interrupts . . . . . | 733 |
| 21.7 | ADC registers . . . . . | 735 |
| 21.7.1 | ADC interrupt and status register (ADC_ISR) . . . . . | 735 |
| 21.7.2 | ADC interrupt enable register (ADC_IER) . . . . . | 736 |
| 21.7.3 | ADC control register (ADC_CR) . . . . . | 739 |
| 21.7.4 | ADC configuration register 1 (ADC_CFGR1) . . . . . | 741 |
| 21.7.5 | ADC configuration register 2 (ADC_CFGR2) . . . . . | 744 |
| 21.7.6 | ADC sampling time register (ADC_SMPR) . . . . . | 745 |
| 21.7.7 | ADC watchdog threshold register (ADC_AWD1TR) . . . . . | 746 |
| 21.7.8 | ADC watchdog threshold register (ADC_AWD2TR) . . . . . | 747 |
| 21.7.9 | ADC channel selection register [alternate] (ADC_CHSELR) . . . . . | 748 |
| 21.7.10 | ADC channel selection register [alternate] (ADC_CHSELR) . . . . . | 748 |
| 21.7.11 | ADC watchdog threshold register (ADC_AWD3TR) . . . . . | 750 |
| 21.7.12 | ADC data register (ADC_DR) . . . . . | 751 |
| 21.7.13 | ADC power register (ADC_PWR) . . . . . | 751 |
| 21.7.14 | ADC Analog Watchdog 2 Configuration register (ADC_AWD2CR) . . . . . | 752 |
| 21.7.15 | ADC Analog Watchdog 3 Configuration register (ADC_AWD3CR) . . . . . | 752 |
| 21.7.16 | ADC Calibration factor (ADC_CALFACT) . . . . . | 753 |
| 21.7.17 | ADC common configuration register (ADC_CCR) . . . . . | 753 |
| 21.7.18 | ADC register map . . . . . | 754 |
| 22 | Voltage reference buffer (VREFBUF) . . . . . | 757 |
| 22.1 | VREFBUF introduction . . . . . | 757 |
| 22.2 | VREFBUF implementation . . . . . | 757 |
| 22.3 | VREFBUF functional description . . . . . | 757 |
| 22.4 | VREFBUF trimming . . . . . | 758 |
| 22.5 | VREFBUF registers . . . . . | 760 |
| 22.5.1 | VREFBUF control and status register (VREFBUF_CSR) . . . . . | 760 |
| 22.5.2 | VREFBUF calibration control register (VREFBUF_CCR) . . . . . | 761 |
| 22.5.3 | VREFBUF register map . . . . . | 761 |
| 23 | Comparator (COMP) . . . . . | 762 |
| 23.1 | COMP introduction . . . . . | 762 |
| 23.2 | COMP main features . . . . . | 762 |
| 23.3 | COMP implementation . . . . . | 762 |
| 23.4 | COMP functional description . . . . . | 763 |
| 23.4.1 | COMP block diagram . . . . . | 763 |
| 23.4.2 | COMP pins and internal signals . . . . . | 763 |
| 23.4.3 | Comparator LOCK mechanism . . . . . | 765 |
| 23.4.4 | Window comparator . . . . . | 765 |
| 23.4.5 | Hysteresis . . . . . | 766 |
| 23.4.6 | Comparator output-blanking function . . . . . | 766 |
| 23.4.7 | COMP power and speed modes . . . . . | 767 |
| 23.4.8 | Scaler function . . . . . | 767 |
| 23.5 | COMP low-power modes . . . . . | 768 |
| 23.6 | COMP interrupts . . . . . | 768 |
| 23.7 | COMP registers . . . . . | 769 |
| 23.7.1 | COMP1 control and status register (COMP1_CSR) . . . . . | 769 |
| 23.7.2 | COMP2 control and status register (COMP2_CSR) . . . . . | 770 |
| 23.7.3 | COMP register map . . . . . | 772 |
| 24 | Touch sensing controller (TSC) . . . . . | 773 |
| 24.1 | TSC introduction . . . . . | 773 |
| 24.2 | TSC main features . . . . . | 773 |
| 24.3 | TSC functional description . . . . . | 773 |
| 24.3.1 | TSC block diagram . . . . . | 773 |
| 24.3.2 | Surface charge transfer acquisition overview . . . . . | 774 |
| 24.3.3 | Reset and clocks . . . . . | 777 |
| 24.3.4 | Charge transfer acquisition sequence . . . . . | 777 |
| 24.3.5 | Spread spectrum feature . . . . . | 778 |
| 24.3.6 | Max count error . . . . . | 779 |
| 24.3.7 | Sampling capacitor I/O and channel I/O mode selection . . . . . | 779 |
| 24.3.8 | Acquisition mode . . . . . | 780 |
| 24.3.9 | I/O hysteresis and analog switch control . . . . . | 780 |
| 24.4 | TSC low-power modes . . . . . | 781 |
| 24.5 | TSC interrupts ..... | 781 |
| 24.6 | TSC registers ..... | 781 |
| 24.6.1 | TSC control register (TSC_CR) ..... | 781 |
| 24.6.2 | TSC interrupt enable register (TSC_IER) ..... | 784 |
| 24.6.3 | TSC interrupt clear register (TSC_ICR) ..... | 784 |
| 24.6.4 | TSC interrupt status register (TSC_ISR) ..... | 785 |
| 24.6.5 | TSC I/O hysteresis control register (TSC_IOHCR) ..... | 785 |
| 24.6.6 | TSC I/O analog switch control register (TSC_IOASCR) ..... | 786 |
| 24.6.7 | TSC I/O sampling control register (TSC_IOSCR) ..... | 786 |
| 24.6.8 | TSC I/O channel control register (TSC_IOCCR) ..... | 787 |
| 24.6.9 | TSC I/O group control status register (TSC_IOGCSR) ..... | 787 |
| 24.6.10 | TSC I/O group x counter register (TSC_IOGxCR) ..... | 788 |
| 24.6.11 | TSC register map ..... | 788 |
| 25 | True random number generator (RNG) ..... | 790 |
| 25.1 | RNG introduction ..... | 790 |
| 25.2 | RNG main features ..... | 790 |
| 25.3 | RNG functional description ..... | 791 |
| 25.3.1 | RNG block diagram ..... | 791 |
| 25.3.2 | RNG internal signals ..... | 791 |
| 25.3.3 | Random number generation ..... | 792 |
| 25.3.4 | RNG initialization ..... | 794 |
| 25.3.5 | RNG operation ..... | 795 |
| 25.3.6 | RNG clocking ..... | 797 |
| 25.3.7 | Error management ..... | 797 |
| 25.3.8 | RNG low-power use ..... | 798 |
| 25.4 | RNG interrupts ..... | 798 |
| 25.5 | RNG processing time ..... | 799 |
| 25.6 | RNG entropy source validation ..... | 799 |
| 25.6.1 | Introduction ..... | 799 |
| 25.6.2 | Validation conditions ..... | 799 |
| 25.7 | RNG registers ..... | 801 |
| 25.7.1 | RNG control register (RNG_CR) ..... | 801 |
| 25.7.2 | RNG status register (RNG_SR) ..... | 803 |
| 25.7.3 | RNG data register (RNG_DR) ..... | 804 |
| 25.7.4 | RNG noise source control register (RNG_NSCR) . . . . . | 804 |
| 25.7.5 | RNG health test control register x (RNG_HTCRx) . . . . . | 805 |
| 25.7.6 | RNG register map . . . . . | 806 |
| 26 | AES hardware accelerator (AES) . . . . . | 807 |
| 26.1 | AES introduction . . . . . | 807 |
| 26.2 | AES main features . . . . . | 807 |
| 26.3 | AES implementation . . . . . | 808 |
| 26.4 | AES functional description . . . . . | 808 |
| 26.4.1 | AES block diagram . . . . . | 808 |
| 26.4.2 | AES internal signals . . . . . | 809 |
| 26.4.3 | AES reset and clocks . . . . . | 809 |
| 26.4.4 | AES symmetric cipher implementation . . . . . | 809 |
| 26.4.5 | AES encryption or decryption typical usage . . . . . | 810 |
| 26.4.6 | AES authenticated encryption, decryption, and cipher-based message authentication . . . . . | 812 |
| 26.4.7 | AES ciphertext stealing and data padding . . . . . | 812 |
| 26.4.8 | AES suspend and resume operations . . . . . | 813 |
| 26.4.9 | AES basic chaining modes (ECB, CBC) . . . . . | 814 |
| 26.4.10 | AES counter (CTR) mode . . . . . | 817 |
| 26.4.11 | AES Galois/counter mode (GCM) . . . . . | 820 |
| 26.4.12 | AES Galois message authentication code (GMAC) . . . . . | 824 |
| 26.4.13 | AES counter with CBC-MAC (CCM) . . . . . | 825 |
| 26.4.14 | AES key sharing with secure AES co-processor . . . . . | 830 |
| 26.4.15 | AES data registers and data swapping . . . . . | 831 |
| 26.4.16 | AES key registers . . . . . | 833 |
| 26.4.17 | AES initialization vector registers . . . . . | 833 |
| 26.4.18 | AES error management . . . . . | 834 |
| 26.5 | AES in low-power modes . . . . . | 835 |
| 26.6 | AES interrupts . . . . . | 835 |
| 26.7 | AES DMA requests . . . . . | 836 |
| 26.8 | AES processing latency . . . . . | 837 |
| 26.9 | AES registers . . . . . | 838 |
| 26.9.1 | AES control register (AES_CR) . . . . . | 838 |
| 26.9.2 | AES status register (AES_SR) . . . . . | 840 |
| 26.9.3 | AES data input register (AES_DINR) . . . . . | 841 |
| 26.9.4 | AES data output register (AES_DOUTR) . . . . . | 842 |
| 26.9.5 | AES key register 0 (AES_KEYR0) . . . . . | 842 |
| 26.9.6 | AES key register 1 (AES_KEYR1) . . . . . | 843 |
| 26.9.7 | AES key register 2 (AES_KEYR2) . . . . . | 843 |
| 26.9.8 | AES key register 3 (AES_KEYR3) . . . . . | 843 |
| 26.9.9 | AES initialization vector register 0 (AES_IVR0) . . . . . | 844 |
| 26.9.10 | AES initialization vector register 1 (AES_IVR1) . . . . . | 844 |
| 26.9.11 | AES initialization vector register 2 (AES_IVR2) . . . . . | 844 |
| 26.9.12 | AES initialization vector register 3 (AES_IVR3) . . . . . | 845 |
| 26.9.13 | AES key register 4 (AES_KEYR4) . . . . . | 845 |
| 26.9.14 | AES key register 5 (AES_KEYR5) . . . . . | 845 |
| 26.9.15 | AES key register 6 (AES_KEYR6) . . . . . | 846 |
| 26.9.16 | AES key register 7 (AES_KEYR7) . . . . . | 846 |
| 26.9.17 | AES suspend registers (AES_SUSPRx) . . . . . | 846 |
| 26.9.18 | AES interrupt enable register (AES_IER) . . . . . | 847 |
| 26.9.19 | AES interrupt status register (AES_ISR) . . . . . | 848 |
| 26.9.20 | AES interrupt clear register (AES_ICR) . . . . . | 849 |
| 26.9.21 | AES register map . . . . . | 849 |
| 27 | Secure AES coprocessor (SAES) . . . . . | 852 |
| 27.1 | SAES introduction . . . . . | 852 |
| 27.2 | SAES main features . . . . . | 852 |
| 27.3 | SAES implementation . . . . . | 853 |
| 27.4 | SAES functional description . . . . . | 853 |
| 27.4.1 | SAES block diagram . . . . . | 853 |
| 27.4.2 | SAES internal signals . . . . . | 854 |
| 27.4.3 | SAES reset and clocks . . . . . | 855 |
| 27.4.4 | SAES symmetric cipher implementation . . . . . | 855 |
| 27.4.5 | SAES encryption or decryption typical usage . . . . . | 856 |
| 27.4.6 | SAES authenticated encryption, decryption, and cipher-based message authentication . . . . . | 858 |
| 27.4.7 | SAES ciphertext stealing and data padding . . . . . | 859 |
| 27.4.8 | SAES suspend and resume operations . . . . . | 859 |
| 27.4.9 | SAES basic chaining modes (ECB, CBC) . . . . . | 860 |
| 27.4.10 | SAES counter (CTR) mode . . . . . | 864 |
| 27.4.11 | SAES Galois/counter mode (GCM) . . . . . | 866 |
| 27.4.12 | SAES Galois message authentication code (GMAC) . . . . . | 870 |
- 27.4.13 SAES counter with CBC-MAC (CCM) . . . . . 872
- 27.4.14 SAES operation with wrapped keys . . . . . 877
- 27.4.15 SAES operation with shared keys . . . . . 881
- 27.4.16 SAES data registers and data swapping . . . . . 882
- 27.4.17 SAES key registers . . . . . 885
- 27.4.18 SAES initialization vector registers . . . . . 886
- 27.4.19 SAES error management . . . . . 887
- 27.5 SAES in low-power modes . . . . . 889
- 27.6 SAES interrupts . . . . . 889
- 27.7 SAES DMA requests . . . . . 890
- 27.8 SAES processing latency . . . . . 890
- 27.9 SAES registers . . . . . 892
- 27.9.1 SAES control register (SAES_CR) . . . . . 892
- 27.9.2 SAES status register (SAES_SR) . . . . . 895
- 27.9.3 SAES data input register (SAES_DINR) . . . . . 896
- 27.9.4 SAES data output register (SAES_DOUTR) . . . . . 897
- 27.9.5 SAES key register 0 (SAES_KEYR0) . . . . . 897
- 27.9.6 SAES key register 1 (SAES_KEYR1) . . . . . 898
- 27.9.7 SAES key register 2 (SAES_KEYR2) . . . . . 898
- 27.9.8 SAES key register 3 (SAES_KEYR3) . . . . . 898
- 27.9.9 SAES initialization vector register 0 (SAES_IVR0) . . . . . 899
- 27.9.10 SAES initialization vector register 1 (SAES_IVR1) . . . . . 899
- 27.9.11 SAES initialization vector register 2 (SAES_IVR2) . . . . . 899
- 27.9.12 SAES initialization vector register 3 (SAES_IVR3) . . . . . 900
- 27.9.13 SAES key register 4 (SAES_KEYR4) . . . . . 900
- 27.9.14 SAES key register 5 (SAES_KEYR5) . . . . . 900
- 27.9.15 SAES key register 6 (SAES_KEYR6) . . . . . 901
- 27.9.16 SAES key register 7 (SAES_KEYR7) . . . . . 901
- 27.9.17 SAES suspend registers (SAES_SUSPRx) . . . . . 901
- 27.9.18 SAES interrupt enable register (SAES_IER) . . . . . 902
- 27.9.19 SAES interrupt status register (SAES_ISR) . . . . . 903
- 27.9.20 SAES interrupt clear register (SAES_ICR) . . . . . 904
- 27.9.21 SAES register map . . . . . 905
- 28 Hash processor (HASH) . . . . . 907
- 28.1 Introduction . . . . . 907
| 28.2 | HASH main features . . . . . | 907 |
| 28.3 | HASH implementation . . . . . | 908 |
| 28.4 | HASH functional description . . . . . | 908 |
| 28.4.1 | HASH block diagram . . . . . | 908 |
| 28.4.2 | HASH internal signals . . . . . | 909 |
| 28.4.3 | About secure hash algorithms . . . . . | 909 |
| 28.4.4 | Message data feeding . . . . . | 909 |
| 28.4.5 | Message digest computing . . . . . | 911 |
| 28.4.6 | Message padding . . . . . | 912 |
| 28.4.7 | HMAC operation . . . . . | 914 |
| 28.4.8 | HASH suspend/resume operations . . . . . | 916 |
| 28.4.9 | HASH DMA interface . . . . . | 918 |
| 28.4.10 | HASH error management . . . . . | 918 |
| 28.4.11 | HASH processing time . . . . . | 918 |
| 28.5 | HASH in low-power modes . . . . . | 919 |
| 28.6 | HASH interrupts . . . . . | 919 |
| 28.7 | HASH registers . . . . . | 920 |
| 28.7.1 | HASH control register (HASH_CR) . . . . . | 920 |
| 28.7.2 | HASH data input register (HASH_DIN) . . . . . | 921 |
| 28.7.3 | HASH start register (HASH_STR) . . . . . | 922 |
| 28.7.4 | HASH digest registers . . . . . | 923 |
| 28.7.5 | HASH interrupt enable register (HASH_IMR) . . . . . | 924 |
| 28.7.6 | HASH status register (HASH_SR) . . . . . | 925 |
| 28.7.7 | HASH context swap registers . . . . . | 926 |
| 28.7.8 | HASH register map . . . . . | 927 |
| 29 | Public key accelerator (PKA) . . . . . | 929 |
| 29.1 | PKA introduction . . . . . | 929 |
| 29.2 | PKA main features . . . . . | 929 |
| 29.3 | PKA functional description . . . . . | 930 |
| 29.3.1 | PKA block diagram . . . . . | 930 |
| 29.3.2 | PKA internal signals . . . . . | 930 |
| 29.3.3 | PKA reset and clocks . . . . . | 930 |
| 29.3.4 | PKA public key acceleration . . . . . | 931 |
| 29.3.5 | Typical applications for PKA . . . . . | 933 |
| 29.3.6 | PKA procedure to perform an operation . . . . . | 935 |
- 29.3.7 PKA error management . . . . . 936
- 29.4 PKA operating modes . . . . . 937
- 29.4.1 Introduction . . . . . 937
- 29.4.2 Montgomery parameter computation . . . . . 938
- 29.4.3 Modular addition . . . . . 938
- 29.4.4 Modular subtraction . . . . . 939
- 29.4.5 Modular and Montgomery multiplication . . . . . 939
- 29.4.6 Modular exponentiation . . . . . 940
- 29.4.7 Modular inversion . . . . . 942
- 29.4.8 Modular reduction . . . . . 942
- 29.4.9 Arithmetic addition . . . . . 943
- 29.4.10 Arithmetic subtraction . . . . . 943
- 29.4.11 Arithmetic multiplication . . . . . 944
- 29.4.12 Arithmetic comparison . . . . . 944
- 29.4.13 RSA CRT exponentiation . . . . . 944
- 29.4.14 Point on elliptic curve Fp check . . . . . 945
- 29.4.15 ECC Fp scalar multiplication . . . . . 946
- 29.4.16 ECDSA sign . . . . . 947
- 29.4.17 ECDSA verification . . . . . 949
- 29.4.18 ECC complete addition . . . . . 950
- 29.4.19 ECC double base ladder . . . . . 950
- 29.4.20 ECC projective to affine . . . . . 951
- 29.5 Example of configurations and processing times . . . . . 952
- 29.5.1 Supported elliptic curves . . . . . 952
- 29.5.2 Computation times . . . . . 954
- 29.6 PKA in low-power modes . . . . . 956
- 29.7 PKA interrupts . . . . . 956
- 29.8 PKA registers . . . . . 957
- 29.8.1 PKA control register (PKA_CR) . . . . . 957
- 29.8.2 PKA status register (PKA_SR) . . . . . 959
- 29.8.3 PKA clear flag register (PKA_CLRFR) . . . . . 960
- 29.8.4 PKA RAM . . . . . 960
- 29.8.5 PKA register map . . . . . 961
30 Advanced-control timers (TIM1) . . . . . 962
- 30.1 TIM1 introduction . . . . . 962
| 30.2 | TIM1 main features . . . . . | 963 |
| 30.3 | TIM1 functional description . . . . . | 964 |
| 30.3.1 | Block diagram . . . . . | 964 |
| 30.3.2 | TIM1 pins and internal signals . . . . . | 965 |
| 30.3.3 | Time-base unit . . . . . | 969 |
| 30.3.4 | Counter modes . . . . . | 971 |
| 30.3.5 | Repetition counter . . . . . | 983 |
| 30.3.6 | External trigger input . . . . . | 984 |
| 30.3.7 | Clock selection . . . . . | 985 |
| 30.3.8 | Capture/compare channels . . . . . | 989 |
| 30.3.9 | Input capture mode . . . . . | 992 |
| 30.3.10 | PWM input mode . . . . . | 993 |
| 30.3.11 | Forced output mode . . . . . | 994 |
| 30.3.12 | Output compare mode . . . . . | 994 |
| 30.3.13 | PWM mode . . . . . | 996 |
| 30.3.14 | Asymmetric PWM mode . . . . . | 1004 |
| 30.3.15 | Combined PWM mode . . . . . | 1005 |
| 30.3.16 | Combined 3-phase PWM mode . . . . . | 1006 |
| 30.3.17 | Complementary outputs and dead-time insertion . . . . . | 1007 |
| 30.3.18 | Using the break function . . . . . | 1010 |
| 30.3.19 | Bidirectional break inputs . . . . . | 1016 |
| 30.3.20 | Clearing the tim_ocxref signal on an external event . . . . . | 1017 |
| 30.3.21 | 6-step PWM generation . . . . . | 1019 |
| 30.3.22 | One-pulse mode . . . . . | 1020 |
| 30.3.23 | Retriggerable One-pulse mode . . . . . | 1022 |
| 30.3.24 | Pulse on compare mode . . . . . | 1023 |
| 30.3.25 | Encoder interface mode . . . . . | 1025 |
| 30.3.26 | Direction bit output . . . . . | 1042 |
| 30.3.27 | Clock drift measurement . . . . . | 1043 |
| 30.3.28 | UIF bit remapping . . . . . | 1043 |
| 30.3.29 | Timer input XOR function . . . . . | 1044 |
| 30.3.30 | Interfacing with Hall sensors . . . . . | 1044 |
| 30.3.31 | Timer synchronization . . . . . | 1046 |
| 30.3.32 | ADC triggers . . . . . | 1051 |
| 30.3.33 | ADC synchronization . . . . . | 1051 |
| 30.3.34 | DMA burst mode . . . . . | 1052 |
| 30.3.35 | TIM1 DMA requests . . . . . | 1053 |
| 30.3.36 | Debug mode | 1053 |
| 30.4 | TIM1 low-power modes | 1054 |
| 30.5 | TIM1 interrupts | 1054 |
| 30.6 | TIM1 registers | 1055 |
| 30.6.1 | TIM1 control register 1 (TIM1_CR1) | 1055 |
| 30.6.2 | TIM1 control register 2 (TIM1_CR2) | 1056 |
| 30.6.3 | TIM1 slave mode control register (TIM1_SMCR) | 1060 |
| 30.6.4 | TIM1 DMA/interrupt enable register (TIM1_DIER) | 1064 |
| 30.6.5 | TIM1 status register (TIM1_SR) | 1065 |
| 30.6.6 | TIM1 event generation register (TIM1_EGR) | 1068 |
| 30.6.7 | TIM1 capture/compare mode register 1 (TIM1_CCMR1) | 1069 |
| 30.6.8 | TIM1 capture/compare mode register 1 [alternate] (TIM1_CCMR1) | 1071 |
| 30.6.9 | TIM1 capture/compare mode register 2 (TIM1_CCMR2) | 1074 |
| 30.6.10 | TIM1 capture/compare mode register 2 [alternate] (TIM1_CCMR2) | 1075 |
| 30.6.11 | TIM1 capture/compare enable register (TIM1_CCER) | 1078 |
| 30.6.12 | TIM1 counter (TIM1_CNT) | 1082 |
| 30.6.13 | TIM1 prescaler (TIM1_PSC) | 1082 |
| 30.6.14 | TIM1 autoreload register (TIM1_ARR) | 1083 |
| 30.6.15 | TIM1 repetition counter register (TIM1_RCR) | 1083 |
| 30.6.16 | TIM1 capture/compare register 1 (TIM1_CCR1) | 1084 |
| 30.6.17 | TIM1 capture/compare register 2 (TIM1_CCR2) | 1084 |
| 30.6.18 | TIM1 capture/compare register 3 (TIM1_CCR3) | 1085 |
| 30.6.19 | TIM1 capture/compare register 4 (TIM1_CCR4) | 1086 |
| 30.6.20 | TIM1 break and dead-time register (TIM1_BDTR) | 1087 |
| 30.6.21 | TIM1 capture/compare register 5 (TIM1_CCR5) | 1091 |
| 30.6.22 | TIM1 capture/compare register 6 (TIM1_CCR6) | 1092 |
| 30.6.23 | TIM1 capture/compare mode register 3 (TIM1_CCMR3) | 1093 |
| 30.6.24 | TIM1 timer deadtime register 2 (TIM1_DTR2) | 1094 |
| 30.6.25 | TIM1 timer encoder control register (TIM1_ECR) | 1095 |
| 30.6.26 | TIM1 timer input selection register (TIM1_TISEL) | 1096 |
| 30.6.27 | TIM1 alternate function option register 1 (TIM1_AF1) | 1097 |
| 30.6.28 | TIM1 alternate function register 2 (TIM1_AF2) | 1100 |
| 30.6.29 | TIM1 DMA control register (TIM1_DCR) | 1102 |
| 30.6.30 | TIM1 DMA address for full transfer (TIM1_DMAR) | 1104 |
| 30.6.31 | TIM1 register map | 1104 |
| 31 | General-purpose timers (TIM2/TIM3/TIM4) . . . . . | 1107 |
| 31.1 | TIM2/TIM3/TIM4 introduction . . . . . | 1107 |
| 31.2 | TIM2/TIM3/TIM4 main features . . . . . | 1107 |
| 31.3 | TIM2/TIM3/TIM4 implementation . . . . . | 1108 |
| 31.4 | TIM2/TIM3/TIM4 functional description . . . . . | 1109 |
| 31.4.1 | Block diagram . . . . . | 1109 |
| 31.4.2 | TIM2/TIM3/TIM4 pins and internal signals . . . . . | 1110 |
| 31.4.3 | Time-base unit . . . . . | 1113 |
| 31.4.4 | Counter modes . . . . . | 1115 |
| 31.4.5 | Clock selection . . . . . | 1127 |
| 31.4.6 | Capture/compare channels . . . . . | 1131 |
| 31.4.7 | Input capture mode . . . . . | 1133 |
| 31.4.8 | PWM input mode . . . . . | 1134 |
| 31.4.9 | Forced output mode . . . . . | 1135 |
| 31.4.10 | Output compare mode . . . . . | 1135 |
| 31.4.11 | PWM mode . . . . . | 1137 |
| 31.4.12 | Asymmetric PWM mode . . . . . | 1145 |
| 31.4.13 | Combined PWM mode . . . . . | 1146 |
| 31.4.14 | Clearing the tim_ocxref signal on an external event . . . . . | 1147 |
| 31.4.15 | One-pulse mode . . . . . | 1149 |
| 31.4.16 | Retriggerable one-pulse mode . . . . . | 1150 |
| 31.4.17 | Pulse on compare mode . . . . . | 1151 |
| 31.4.18 | Encoder interface mode . . . . . | 1153 |
| 31.4.19 | Direction bit output . . . . . | 1171 |
| 31.4.20 | Clock drift measurement . . . . . | 1172 |
| 31.4.21 | UIF bit remapping . . . . . | 1172 |
| 31.4.22 | Timer input XOR function . . . . . | 1173 |
| 31.4.23 | Timers and external trigger synchronization . . . . . | 1173 |
| 31.4.24 | Timer synchronization . . . . . | 1177 |
| 31.4.25 | ADC triggers . . . . . | 1182 |
| 31.4.26 | ADC synchronization . . . . . | 1183 |
| 31.4.27 | DMA burst mode . . . . . | 1184 |
| 31.4.28 | TIM2/TIM3/TIM4 DMA requests . . . . . | 1185 |
| 31.4.29 | Debug mode . . . . . | 1185 |
| 31.4.30 | TIM2/TIM3/TIM4 low-power modes . . . . . | 1185 |
| 31.4.31 | TIM2/TIM3/TIM4 interrupts . . . . . | 1186 |
| 31.5 | TIM2/TIM3/TIM4 registers . . . . . | 1187 |
| 31.5.1 | TIMx control register 1 (TIMx_CR1)(x = 2 to 4) . . . . . | 1187 |
| 31.5.2 | TIMx control register 2 (TIMx_CR2)(x = 2 to 4) . . . . . | 1188 |
| 31.5.3 | TIMx slave mode control register (TIMx_SMCR)(x = 2 to 4) . . . . . | 1190 |
| 31.5.4 | TIMx DMA/Interrupt enable register (TIMx_DIER)(x = 2 to 4) . . . . . | 1194 |
| 31.5.5 | TIMx status register (TIMx_SR)(x = 2 to 4) . . . . . | 1195 |
| 31.5.6 | TIMx event generation register (TIMx_EGR)(x = 2 to 4) . . . . . | 1197 |
| 31.5.7 | TIMx capture/compare mode register 1 (TIMx_CCMR1)(x = 2 to 4) . . . . . | 1198 |
| 31.5.8 | TIMx capture/compare mode register 1 [alternate] (TIMx_CCMR1)(x = 2 to 4) . . . . . | 1200 |
| 31.5.9 | TIMx capture/compare mode register 2 (TIMx_CCMR2)(x = 2 to 4) . . . . . | 1202 |
| 31.5.10 | TIMx capture/compare mode register 2 [alternate] (TIMx_CCMR2)(x = 2 to 4) . . . . . | 1203 |
| 31.5.11 | TIMx capture/compare enable register (TIMx_CCER)(x = 2 to 4) . . . . . | 1206 |
| 31.5.12 | TIM3 counter (TIM3_CNT) . . . . . | 1207 |
| 31.5.13 | TIMx counter (TIMx_CNT)(x = 2, 4) . . . . . | 1208 |
| 31.5.14 | TIMx prescaler (TIMx_PSC)(x = 2 to 4) . . . . . | 1208 |
| 31.5.15 | TIM3 autoreload register (TIM3_ARR) . . . . . | 1209 |
| 31.5.16 | TIMx autoreload register (TIMx_ARR)(x = 2, 4) . . . . . | 1209 |
| 31.5.17 | TIM3 capture/compare register 1 (TIM3_CCR1) . . . . . | 1210 |
| 31.5.18 | TIMx capture/compare register 1 (TIMx_CCR1)(x = 2, 4) . . . . . | 1211 |
| 31.5.19 | TIM3 capture/compare register 2 (TIM3_CCR2) . . . . . | 1211 |
| 31.5.20 | TIMx capture/compare register 2 (TIMx_CCR2)(x = 2, 4) . . . . . | 1212 |
| 31.5.21 | TIM3 capture/compare register 3 (TIM3_CCR3) . . . . . | 1213 |
| 31.5.22 | TIMx capture/compare register 3 (TIMx_CCR3)(x = 2, 4) . . . . . | 1214 |
| 31.5.23 | TIM3 capture/compare register 4 (TIM3_CCR4) . . . . . | 1215 |
| 31.5.24 | TIMx capture/compare register 4 (TIMx_CCR4)(x = 2, 4) . . . . . | 1216 |
| 31.5.25 | TIMx timer encoder control register (TIMx_ECR)(x = 2 to 4) . . . . . | 1217 |
| 31.5.26 | TIMx timer input selection register (TIMx_TISEL)(x = 2 to 4) . . . . . | 1218 |
| 31.5.27 | TIMx alternate function register 1 (TIMx_AF1)(x = 2 to 4) . . . . . | 1219 |
| 31.5.28 | TIMx alternate function register 2 (TIMx_AF2)(x = 2 to 4) . . . . . | 1220 |
| 31.5.29 | TIMx DMA control register (TIMx_DCR)(x = 2 to 4) . . . . . | 1221 |
| 31.5.30 | TIMx DMA address for full transfer (TIMx_DMAR)(x = 2 to 4) . . . . . | 1222 |
| 31.5.31 | TIMx register map . . . . . | 1223 |
| 32 | General purpose timers (TIM16/TIM17) . . . . . | 1226 |
| 32.1 | TIM16/TIM17 introduction . . . . . | 1226 |
| 32.2 | TIM16/TIM17 main features . . . . . | 1226 |
| 32.3 | TIM16/TIM17 functional description . . . . . | 1227 |
| 32.3.1 | Block diagram . . . . . | 1227 |
| 32.3.2 | TIM16/TIM17 pins and internal signals . . . . . | 1227 |
| 32.3.3 | Time-base unit . . . . . | 1230 |
| 32.3.4 | Counter modes . . . . . | 1232 |
| 32.3.5 | Repetition counter . . . . . | 1236 |
| 32.3.6 | Clock selection . . . . . | 1237 |
| 32.3.7 | Capture/compare channels . . . . . | 1239 |
| 32.3.8 | Input capture mode . . . . . | 1241 |
| 32.3.9 | Forced output mode . . . . . | 1242 |
| 32.3.10 | Output compare mode . . . . . | 1242 |
| 32.3.11 | PWM mode . . . . . | 1244 |
| 32.3.12 | Complementary outputs and dead-time insertion . . . . . | 1249 |
| 32.3.13 | Using the break function . . . . . | 1251 |
| 32.3.14 | Bidirectional break input . . . . . | 1256 |
| 32.3.15 | Clearing the tim_ocxref signal on an external event . . . . . | 1257 |
| 32.3.16 | 6-step PWM generation . . . . . | 1258 |
| 32.3.17 | One-pulse mode . . . . . | 1260 |
| 32.3.18 | UIF bit remapping . . . . . | 1261 |
| 32.3.19 | Using timer output as trigger for other timers (TIM16/TIM17 only) . . . . . | 1261 |
| 32.3.20 | DMA burst mode . . . . . | 1262 |
| 32.3.21 | TIM16/TIM17 DMA requests . . . . . | 1263 |
| 32.3.22 | Debug mode . . . . . | 1263 |
| 32.4 | TIM16/TIM17 low-power modes . . . . . | 1263 |
| 32.5 | TIM16/TIM17 interrupts . . . . . | 1263 |
| 32.6 | TIM16/TIM17 registers . . . . . | 1265 |
| 32.6.1 | TIMx control register 1 (TIMx_CR1)(x = 16 to 17) . . . . . | 1265 |
| 32.6.2 | TIMx control register 2 (TIMx_CR2)(x = 16 to 17) . . . . . | 1266 |
| 32.6.3 | TIMx DMA/interrupt enable register (TIMx_DIER)(x = 16 to 17) . . . . . | 1267 |
| 32.6.4 | TIMx status register (TIMx_SR)(x = 16 to 17) . . . . . | 1268 |
| 32.6.5 | TIMx event generation register (TIMx_EGR)(x = 16 to 17) . . . . . | 1269 |
| 32.6.6 | TIMx capture/compare mode register 1 (TIMx_CCMR1) (x = 16 to 17) . . . . . | 1270 |
| 32.6.7 | TIMx capture/compare mode register 1 [alternate] (TIMx_CCMR1)(x = 16 to 17) . . . . . | 1271 |
| 32.6.8 | TIMx capture/compare enable register (TIMx_CCER)(x = 16 to 17) . . . . . | 1273 |
| 32.6.9 | TIMx counter (TIMx_CNT)(x = 16 to 17) . . . . . | 1276 |
| 32.6.10 | TIMx prescaler (TIMx_PSC)(x = 16 to 17) . . . . . | 1276 |
| 32.6.11 | TIMx auto-reautoreload register (TIMx_ARR)(x = 16 to 17) . . . . . | 1277 |
| 32.6.12 | TIMx repetition counter register (TIMx_RCR)(x = 16 to 17) . . . . . | 1277 |
| 32.6.13 | TIMx capture/compare register 1 (TIMx_CCR1)(x = 16 to 17) . . . . . | 1278 |
| 32.6.14 | TIMx break and dead-time register (TIMx_BDTR)(x = 16 to 17) . . . . . | 1279 |
| 32.6.15 | TIMx timer deadtime register 2 (TIMx_DTR2)(x = 16 to 17) . . . . . | 1282 |
| 32.6.16 | TIMx input selection register (TIMx_TISEL)(x = 16 to 17) . . . . . | 1283 |
| 32.6.17 | TIMx alternate function register 1 (TIMx_AF1)(x = 16 to 17) . . . . . | 1283 |
| 32.6.18 | TIMx alternate function register 2 (TIMx_AF2)(x = 16 to 17) . . . . . | 1286 |
| 32.6.19 | TIMx option register 1 (TIMx_OR1)(x = 16 to 17) . . . . . | 1286 |
| 32.6.20 | TIMx DMA control register (TIMx_DCR)(x = 16 to 17) . . . . . | 1287 |
| 32.6.21 | TIM16/TIM17 DMA address for full transfer (TIMx_DMAR)(x = 16 to 17) . . . . . | 1288 |
| 32.6.22 | TIM16/TIM17 register map . . . . . | 1289 |
| 33 | Low-power timer (LPTIM) . . . . . | 1291 |
| 33.1 | LPTIM introduction . . . . . | 1291 |
| 33.2 | LPTIM main features . . . . . | 1291 |
| 33.3 | LPTIM implementation . . . . . | 1292 |
| 33.4 | LPTIM functional description . . . . . | 1293 |
| 33.4.1 | LPTIM block diagram . . . . . | 1293 |
| 33.4.2 | LPTIM pins and internal signals . . . . . | 1293 |
| 33.4.3 | LPTIM input and trigger mapping . . . . . | 1295 |
| 33.4.4 | LPTIM reset and clocks . . . . . | 1296 |
| 33.4.5 | Glitch filter . . . . . | 1296 |
| 33.4.6 | Prescaler . . . . . | 1297 |
| 33.4.7 | Trigger multiplexer . . . . . | 1297 |
| 33.4.8 | Operating mode . . . . . | 1298 |
| 33.4.9 | Timeout function . . . . . | 1300 |
| 33.4.10 | Waveform generation . . . . . | 1300 |
| 33.4.11 | Register update . . . . . | 1301 |
| 33.4.12 | Counter mode . . . . . | 1302 |
| 33.4.13 | Timer enable . . . . . | 1303 |
| 33.4.14 | Timer counter reset . . . . . | 1303 |
| 33.4.15 | Encoder mode . . . . . | 1304 |
| 33.4.16 | Repetition counter . . . . . | 1305 |
| 33.4.17 | Capture/compare channels . . . . . | 1306 |
| 33.4.18 | Input capture mode . . . . . | 1307 |
| 33.4.19 | PWM mode . . . . . | 1309 |
| 33.4.20 | Autonomous mode . . . . . | 1311 |
| 33.4.21 | DMA requests . . . . . | 1312 |
| 33.4.22 | Debug mode . . . . . | 1313 |
| 33.5 | LPTIM low-power modes . . . . . | 1313 |
| 33.6 | LPTIM interrupts . . . . . | 1313 |
| 33.7 | LPTIM registers . . . . . | 1314 |
| 33.7.1 | LPTIMx interrupt and status register [alternate] (LPTIMx_ISR) (x = 1, 2) . . . . . | 1315 |
| 33.7.2 | LPTIMx interrupt and status register [alternate] (LPTIMx_ISR) (x = 1, 2) . . . . . | 1317 |
| 33.7.3 | LPTIMx interrupt clear register [alternate] (LPTIMx_ICR) (x = 1, 2) . . . . . | 1319 |
| 33.7.4 | LPTIMx interrupt clear register [alternate] (LPTIMx_ICR) (x = 1, 2) . . . . . | 1320 |
| 33.7.5 | LPTIMx interrupt enable register [alternate] (LPTIMx_DIER) (x = 1, 2) . . . . . | 1322 |
| 33.7.6 | LPTIMx interrupt enable register [alternate] (LPTIMx_DIER) (x = 1, 2) . . . . . | 1323 |
| 33.7.7 | LPTIM configuration register (LPTIM_CFGR) . . . . . | 1325 |
| 33.7.8 | LPTIM control register (LPTIM_CR) . . . . . | 1328 |
| 33.7.9 | LPTIM compare register 1 (LPTIM_CCR1) . . . . . | 1329 |
| 33.7.10 | LPTIM autoreload register (LPTIM_ARR) . . . . . | 1329 |
| 33.7.11 | LPTIM counter register (LPTIM_CNT) . . . . . | 1330 |
| 33.7.12 | LPTIM configuration register 2 (LPTIM_CFGR2) . . . . . | 1330 |
| 33.7.13 | LPTIM repetition register (LPTIM_RCR) . . . . . | 1331 |
| 33.7.14 | LPTIM capture/compare mode register 1 (LPTIM_CCMR1) . . . . . | 1332 |
| 33.7.15 | LPTIM compare register 2 (LPTIM_CCR2) . . . . . | 1334 |
| 33.7.16 | LPTIM register map . . . . . | 1335 |
| 34 | Infrared interface (IRTIM) . . . . . | 1337 |
| 35 | Independent watchdog (IWDG) . . . . . | 1338 |
| 35.1 | IWDG introduction . . . . . | 1338 |
| 35.2 | IWDG main features . . . . . | 1338 |
| 35.3 | IWDG implementation . . . . . | 1338 |
| 35.4 | IWDG functional description . . . . . | 1339 |
| 35.4.1 | IWDG block diagram . . . . . | 1339 |
| 35.4.2 | IWDG internal signals . . . . . | 1340 |
| 35.4.3 | Software and hardware watchdog modes . . . . . | 1340 |
| 35.4.4 | Window option . . . . . | 1341 |
| 35.4.5 | Debug . . . . . | 1344 |
| 35.4.6 | Register access protection . . . . . | 1344 |
| 35.5 | IWDG low power modes . . . . . | 1345 |
| 35.6 | IWDG interrupts . . . . . | 1345 |
| 35.7 | IWDG registers . . . . . | 1347 |
| 35.7.1 | IWDG key register (IWDG_KR) . . . . . | 1348 |
| 35.7.2 | IWDG prescaler register (IWDG_PR) . . . . . | 1348 |
| 35.7.3 | IWDG reload register (IWDG_RLR) . . . . . | 1349 |
| 35.7.4 | IWDG status register (IWDG_SR) . . . . . | 1349 |
| 35.7.5 | IWDG window register (IWDG_WINR) . . . . . | 1351 |
| 35.7.6 | IWDG early wake-up interrupt register (IWDG_EWCR) . . . . . | 1351 |
| 35.7.7 | IWDG register map . . . . . | 1353 |
| 36 | System window watchdog (WWDG) . . . . . | 1354 |
| 36.1 | WWDG introduction . . . . . | 1354 |
| 36.2 | WWDG main features . . . . . | 1354 |
| 36.3 | WWDG implementation . . . . . | 1354 |
| 36.4 | WWDG functional description . . . . . | 1355 |
| 36.4.1 | WWDG block diagram . . . . . | 1355 |
| 36.4.2 | WWDG internal signals . . . . . | 1355 |
| 36.4.3 | Enabling the watchdog . . . . . | 1355 |
| 36.4.4 | Controlling the down-counter . . . . . | 1356 |
| 36.4.5 | How to program the watchdog timeout . . . . . | 1356 |
| 36.4.6 | Debug mode . . . . . | 1357 |
| 36.5 | WWDG low-power modes . . . . . | 1358 |
| 36.6 | WWDG interrupts . . . . . | 1358 |
| 36.7 | WWDG registers . . . . . | 1358 |
| 36.7.1 | WWDG control register (WWDG_CR) . . . . . | 1359 |
| 36.7.2 | WWDG configuration register (WWDG_CFR) . . . . . | 1359 |
| 36.7.3 | WWDG status register (WWDG_SR) . . . . . | 1360 |
| 36.7.4 | WWDG register map . . . . . | 1360 |
| 37 | Real-time clock (RTC) . . . . . | 1361 |
| 37.1 | RTC introduction . . . . . | 1361 |
| 37.2 | RTC main features . . . . . | 1361 |
| 37.3 | RTC functional description . . . . . | 1361 |
| 37.3.1 | RTC block diagram . . . . . | 1361 |
| 37.3.2 | RTC pins and internal signals . . . . . | 1363 |
| 37.3.3 | GPIOs controlled by the RTC and TAMP . . . . . | 1364 |
| 37.3.4 | RTC secure protection modes . . . . . | 1366 |
| 37.3.5 | RTC privilege protection modes . . . . . | 1368 |
| 37.3.6 | Clock and prescalers . . . . . | 1369 |
| 37.3.7 | Real-time clock and calendar . . . . . | 1370 |
| 37.3.8 | Calendar ultra-low power mode . . . . . | 1371 |
| 37.3.9 | Programmable alarms . . . . . | 1371 |
| 37.3.10 | Periodic auto-wake-up . . . . . | 1371 |
| 37.3.11 | RTC initialization and configuration . . . . . | 1372 |
| 37.3.12 | Reading the calendar . . . . . | 1375 |
| 37.3.13 | Resetting the RTC . . . . . | 1376 |
| 37.3.14 | RTC synchronization . . . . . | 1377 |
| 37.3.15 | RTC reference clock detection . . . . . | 1377 |
| 37.3.16 | RTC smooth digital calibration . . . . . | 1378 |
| 37.3.17 | Timestamp function . . . . . | 1380 |
| 37.3.18 | Calibration clock output . . . . . | 1381 |
| 37.3.19 | Tamper and alarm output . . . . . | 1381 |
| 37.4 | RTC low-power modes . . . . . | 1382 |
| 37.5 | RTC interrupts . . . . . | 1382 |
| 37.6 | RTC registers . . . . . | 1384 |
| 37.6.1 | RTC time register (RTC_TR) . . . . . | 1384 |
| 37.6.2 | RTC date register (RTC_DR) . . . . . | 1385 |
| 37.6.3 | RTC subsecond register (RTC_SSR) . . . . . | 1386 |
| 37.6.4 | RTC initialization control and status register (RTC_ICSR) . . . . . | 1387 |
| 37.6.5 | RTC prescaler register (RTC_PRER) . . . . . | 1389 |
| 37.6.6 | RTC wake-up timer register (RTC_WUTR) . . . . . | 1390 |
| 37.6.7 | RTC control register (RTC_CR) . . . . . | 1390 |
| 37.6.8 | RTC privilege mode control register (RTC_PRIVCFGR) . . . . . | 1394 |
| 37.6.9 | RTC secure configuration register (RTC_SECCFGR) . . . . . | 1396 |
| 37.6.10 | RTC write protection register (RTC_WPR) . . . . . | 1397 |
| 37.6.11 | RTC calibration register (RTC_CALR) . . . . . | 1398 |
| 37.6.12 | RTC shift control register (RTC_SHIFTR) . . . . . | 1399 |
| 37.6.13 | RTC timestamp time register (RTC_TSTR) . . . . . | 1400 |
| 37.6.14 | RTC timestamp date register (RTC_TSDR) . . . . . | 1401 |
| 37.6.15 | RTC timestamp subsecond register (RTC_TSSSR) . . . . . | 1402 |
| 37.6.16 | RTC alarm A register (RTC_ALRMAR) . . . . . | 1402 |
| 37.6.17 | RTC alarm A subsecond register (RTC_ALRMASSR) . . . . . | 1404 |
| 37.6.18 | RTC alarm B register (RTC_ALRMBR) . . . . . | 1405 |
| 37.6.19 | RTC alarm B subsecond register (RTC_ALRMBSSR) . . . . . | 1406 |
| 37.6.20 | RTC status register (RTC_SR) . . . . . | 1407 |
| 37.6.21 | RTC nonsecure masked interrupt status register (RTC_MISR) . . . . . | 1408 |
| 37.6.22 | RTC secure masked interrupt status register (RTC_SMISR) . . . . . | 1409 |
| 37.6.23 | RTC status clear register (RTC_SCR) . . . . . | 1410 |
| 37.6.24 | RTC alarm A binary mode register (RTC_ALRABINR) . . . . . | 1411 |
| 37.6.25 | RTC alarm B binary mode register (RTC_ALRBBINR) . . . . . | 1412 |
| 37.6.26 | RTC register map . . . . . | 1413 |
| 38 | Tamper and backup registers (TAMP) . . . . . | 1415 |
| 38.1 | TAMP introduction . . . . . | 1415 |
| 38.2 | TAMP main features . . . . . | 1415 |
| 38.3 | TAMP functional description . . . . . | 1416 |
| 38.3.1 | TAMP block diagram . . . . . | 1416 |
| 38.3.2 | TAMP pins and internal signals . . . . . | 1417 |
| 38.3.3 | GPIOs controlled by the RTC and TAMP . . . . . | 1420 |
| 38.3.4 | TAMP register write protection . . . . . | 1420 |
| 38.3.5 | TAMP secure protection modes . . . . . | 1420 |
| 38.3.6 | Backup registers protection zones . . . . . | 1421 |
| 38.3.7 | TAMP privilege protection modes . . . . . | 1421 |
| 38.3.8 | Boot hardware key (BHK) . . . . . | 1422 |
| 38.3.9 | Tamper detection . . . . . | 1422 |
| 38.3.10 | TAMP backup registers and other device secrets erase . . . . . | 1422 |
| 38.3.11 | Tamper detection configuration and initialization . . . . . | 1424 |
| 38.4 | TAMP low-power modes . . . . . | 1430 |
| 38.5 | TAMP interrupts . . . . . | 1431 |
| 38.6 | TAMP registers . . . . . | 1431 |
| 38.6.1 | TAMP control register 1 (TAMP_CR1) . . . . . | 1431 |
| 38.6.2 | TAMP control register 2 (TAMP_CR2) . . . . . | 1433 |
| 38.6.3 | TAMP control register 3 (TAMP_CR3) . . . . . | 1436 |
| 38.6.4 | TAMP filter control register (TAMP_FLTCR) . . . . . | 1437 |
| 38.6.5 | TAMP active tamper control register 1 (TAMP_ATCR1) . . . . . | 1438 |
| 38.6.6 | TAMP active tamper seed register (TAMP_ATSEEDR) . . . . . | 1441 |
| 38.6.7 | TAMP active tamper output register (TAMP_ATOR) . . . . . | 1442 |
| 38.6.8 | TAMP active tamper control register 2 (TAMP_ATCR2) . . . . . | 1442 |
| 38.6.9 | TAMP secure configuration register (TAMP_SECCFGR) . . . . . | 1445 |
| 38.6.10 | TAMP privilege configuration register (TAMP_PRIVCFGR) . . . . . | 1446 |
| 38.6.11 | TAMP interrupt enable register (TAMP_IER) . . . . . | 1447 |
| 38.6.12 | TAMP status register (TAMP_SR) . . . . . | 1449 |
| 38.6.13 | TAMP nonsecure masked interrupt status register (TAMP_MISR) . . . . . | 1451 |
| 38.6.14 | TAMP secure masked interrupt status register (TAMP_SMISR) . . . . . | 1452 |
| 38.6.15 | TAMP status clear register (TAMP_SCR) . . . . . | 1454 |
| 38.6.16 | TAMP monotonic counter 1 register (TAMP_COUNT1R) . . . . . | 1456 |
| 38.6.17 | TAMP resources protection configuration register (TAMP_RPCFGR) . . . . . | 1456 |
| 38.6.18 | TAMP backup x register (TAMP_BKPxR) . . . . . | 1457 |
| 38.6.19 | TAMP register map . . . . . | 1459 |
| 39 | Inter-integrated circuit interface (I2C) . . . . . | 1461 |
| 39.1 | I2C introduction . . . . . | 1461 |
| 39.2 | I2C main features . . . . . | 1461 |
| 39.3 | I2C implementation . . . . . | 1462 |
| 39.4 | I2C functional description . . . . . | 1462 |
| 39.4.1 | I2C block diagram . . . . . | 1463 |
| 39.4.2 | I2C pins and internal signals . . . . . | 1463 |
| 39.4.3 | I2C clock requirements . . . . . | 1465 |
| 39.4.4 | I2C mode selection . . . . . | 1465 |
| 39.4.5 | I2C initialization . . . . . | 1466 |
| 39.4.6 | I2C reset . . . . . | 1470 |
| 39.4.7 | I2C data transfer . . . . . | 1471 |
| 39.4.8 | I2C target mode . . . . . | 1473 |
| 39.4.9 | I2C controller mode . . . . . | 1482 |
| 39.4.10 | I2C_TIMINGR register configuration examples . . . . . | 1493 |
| 39.4.11 | SMBus specific features . . . . . | 1495 |
| 39.4.12 | SMBus initialization . . . . . | 1497 |
| 39.4.13 | SMBus I2C_TIMEOUTR register configuration examples . . . . . | 1499 |
| 39.4.14 | SMBus target mode . . . . . | 1500 |
| 39.4.15 | SMBus controller mode . . . . . | 1503 |
| 39.4.16 | Autonomous mode . . . . . | 1506 |
| 39.4.17 | Error conditions . . . . . | 1508 |
| 39.5 | I2C in low-power modes . . . . . | 1509 |
| 39.6 | I2C interrupts . . . . . | 1510 |
| 39.7 | I2C DMA requests . . . . . | 1510 |
| 39.7.1 | Transmission using DMA . . . . . | 1510 |
| 39.7.2 | Reception using DMA . . . . . | 1511 |
| 39.7.3 | Controller event control using DMA . . . . . | 1511 |
| 39.8 | I2C debug modes . . . . . | 1512 |
| 39.9 | I2C registers . . . . . | 1512 |
| 39.9.1 | I2C control register 1 (I2C_CR1) . . . . . | 1512 |
| 39.9.2 | I2C control register 2 (I2C_CR2) . . . . . | 1515 |
| 39.9.3 | I2C own address 1 register (I2C_OAR1) . . . . . | 1517 |
| 39.9.4 | I2C own address 2 register (I2C_OAR2) . . . . . | 1517 |
| 39.9.5 | I2C timing register (I2C_TIMINGR) . . . . . | 1518 |
| 39.9.6 | I2C timeout register (I2C_TIMEOUTR) . . . . . | 1519 |
| 39.9.7 | I2C interrupt and status register (I2C_ISR) . . . . . | 1520 |
| 39.9.8 | I2C interrupt clear register (I2C_ICR) . . . . . | 1523 |
| 39.9.9 | I2C PEC register (I2C_PECR) . . . . . | 1524 |
| 39.9.10 | I2C receive data register (I2C_RXDR) . . . . . | 1524 |
| 39.9.11 | I2C transmit data register (I2C_TXDR) . . . . . | 1525 |
| 39.9.12 | I2C autonomous mode control register (I2C_AUTOCR) . . . . . | 1525 |
| 39.9.13 | I2C register map . . . . . | 1527 |
| 40 | Universal synchronous/asynchronous receiver transmitter (USART/UART) . . . . . | 1529 |
| 40.1 | USART introduction . . . . . | 1529 |
| 40.2 | USART main features . . . . . | 1529 |
| 40.3 | USART extended features . . . . . | 1530 |
| 40.4 | USART implementation . . . . . | 1530 |
| 40.5 | USART functional description . . . . . | 1532 |
| 40.5.1 | USART block diagram . . . . . | 1532 |
| 40.5.2 | USART pins and internal signals . . . . . | 1532 |
| 40.5.3 | USART clocks . . . . . | 1535 |
| 40.5.4 | USART character description . . . . . | 1535 |
| 40.5.5 | USART FIFOs and thresholds . . . . . | 1537 |
| 40.5.6 | USART transmitter . . . . . | 1537 |
| 40.5.7 | USART receiver . . . . . | 1540 |
| 40.5.8 | USART baud rate generation . . . . . | 1547 |
| 40.5.9 | Tolerance of the USART receiver to clock deviation . . . . . | 1549 |
| 40.5.10 | USART auto baud rate detection . . . . . | 1550 |
| 40.5.11 | USART multiprocessor communication . . . . . | 1552 |
| 40.5.12 | USART Modbus communication . . . . . | 1554 |
| 40.5.13 | USART parity control . . . . . | 1555 |
| 40.5.14 | USART LIN (local interconnection network) mode . . . . . | 1556 |
| 40.5.15 | USART synchronous mode . . . . . | 1558 |
| 40.5.16 | USART single-wire half-duplex communication . . . . . | 1562 |
| 40.5.17 | USART receiver timeout . . . . . | 1562 |
| 40.5.18 | USART smartcard mode . . . . . | 1563 |
| 40.5.19 | USART IrDA SIR ENDEC block . . . . . | 1567 |
| 40.5.20 | Continuous communication using USART and DMA . . . . . | 1570 |
| 40.5.21 | RS232 hardware flow control and RS485 driver enable . . . . . | 1572 |
| 40.5.22 | USART autonomous mode . . . . . | 1574 |
| 40.6 | USART in low-power modes . . . . . | 1576 |
| 40.7 | USART interrupts . . . . . | 1577 |
| 40.8 | USART registers . . . . . | 1579 |
| 40.8.1 | USART control register 1 (USART_CR1) . . . . . | 1579 |
| 40.8.2 | USART control register 1 [alternate] (USART_CR1) . . . . . | 1583 |
| 40.8.3 | USART control register 2 (USART_CR2) . . . . . | 1586 |
| 40.8.4 | USART control register 3 (USART_CR3) . . . . . | 1590 |
| 40.8.5 | USART control register 3 [alternate] (USART_CR3) . . . . . | 1594 |
| 40.8.6 | USART baud rate register (USART_BRR) . . . . . | 1597 |
| 40.8.7 | USART guard time and prescaler register (USART_GTPR) . . . . . | 1598 |
| 40.8.8 | USART receiver timeout register (USART_RTOR) . . . . . | 1599 |
| 40.8.9 | USART request register (USART_RQR) . . . . . | 1600 |
| 40.8.10 | USART interrupt and status register (USART_ISR) . . . . . | 1601 |
| 40.8.11 | USART interrupt and status register [alternate] (USART_ISR) . . . . . | 1607 |
| 40.8.12 | USART interrupt flag clear register (USART_ICR) . . . . . | 1612 |
| 40.8.13 | USART receive data register (USART_RDR) . . . . . | 1613 |
| 40.8.14 | USART transmit data register (USART_TDR) . . . . . | 1614 |
| 40.8.15 | USART prescaler register (USART_PRESC) . . . . . | 1614 |
| 40.8.16 | USART autonomous mode control register (USART_AUTOCR) . . . . | 1615 |
| 40.8.17 | USART register map . . . . . | 1616 |
| 41 | Low-power universal asynchronous receiver transmitter (LPUART) . . . . . | 1618 |
| 41.1 | LPUART introduction . . . . . | 1618 |
| 41.2 | LPUART main features . . . . . | 1618 |
| 41.3 | LPUART implementation . . . . . | 1619 |
| 41.4 | LPUART functional description . . . . . | 1621 |
| 41.4.1 | LPUART block diagram . . . . . | 1621 |
| 41.4.2 | LPUART pins and internal signals . . . . . | 1622 |
| 41.4.3 | LPUART clocks . . . . . | 1624 |
| 41.4.4 | LPUART character description . . . . . | 1624 |
| 41.4.5 | LPUART FIFOs and thresholds . . . . . | 1626 |
| 41.4.6 | LPUART transmitter . . . . . | 1626 |
| 41.4.7 | LPUART receiver . . . . . | 1630 |
| 41.4.8 | LPUART baud rate generation . . . . . | 1634 |
| 41.4.9 | Tolerance of the LPUART receiver to clock deviation . . . . . | 1635 |
| 41.4.10 | LPUART multiprocessor communication . . . . . | 1636 |
| 41.4.11 | LPUART parity control . . . . . | 1638 |
| 41.4.12 | LPUART single-wire half-duplex communication . . . . . | 1639 |
| 41.4.13 | Continuous communication using DMA and LPUART . . . . . | 1639 |
| 41.4.14 | RS232 hardware flow control and RS485 driver enable . . . . . | 1642 |
| 41.4.15 | LPUART autonomous mode . . . . . | 1644 |
| 41.5 | LPUART in low-power modes . . . . . | 1646 |
| 41.6 | LPUART interrupts . . . . . | 1647 |
| 41.7 | LPUART registers . . . . . | 1648 |
| 41.7.1 | LPUART control register 1 (LPUART_CR1) . . . . . | 1648 |
| 41.7.2 | LPUART control register 1 [alternate] (LPUART_CR1) . . . . . | 1651 |
| 41.7.3 | LPUART control register 2 (LPUART_CR2) . . . . . | 1654 |
| 41.7.4 | LPUART control register 3 (LPUART_CR3) . . . . . | 1656 |
| 41.7.5 | LPUART control register 3 [alternate] (LPUART_CR3) . . . . . | 1658 |
| 41.7.6 | LPUART baud rate register (LPUART_BRR) . . . . . | 1660 |
| 41.7.7 | LPUART request register (LPUART_RQR) . . . . . | 1660 |
| 41.7.8 | LPUART interrupt and status register (LPUART_ISR) . . . . . | 1661 |
| 41.7.9 | LPUART interrupt and status register [alternate] (LPUART_ISR) . . . . . | 1666 |
| 41.7.10 | LPUART interrupt flag clear register (LPUART_ICR) . . . . . | 1669 |
| 41.7.11 | LPUART receive data register (LPUART_RDR) . . . . . | 1670 |
| 41.7.12 | LPUART transmit data register (LPUART_TDR) . . . . . | 1670 |
| 41.7.13 | LPUART prescaler register (LPUART_PRESC) . . . . . | 1671 |
| 41.7.14 | LPUART autonomous mode control register (LPUART_AUTOCR) . . . . . | 1672 |
| 41.7.15 | LPUART register map . . . . . | 1672 |
| 42 | Serial peripheral interface (SPI) . . . . . | 1675 |
| 42.1 | SPI introduction . . . . . | 1675 |
| 42.2 | SPI main features . . . . . | 1675 |
| 42.3 | SPI implementation . . . . . | 1676 |
| 42.4 | SPI functional description . . . . . | 1677 |
| 42.4.1 | SPI block diagram . . . . . | 1677 |
| 42.4.2 | SPI pins and internal signals . . . . . | 1678 |
| 42.4.3 | SPI communication general aspects . . . . . | 1680 |
| 42.4.4 | Communications between one master and one slave . . . . . | 1680 |
| 42.4.5 | Standard multislave communication . . . . . | 1683 |
| 42.4.6 | Multimaster communication . . . . . | 1686 |
| 42.4.7 | Slave select (NSS pin) management . . . . . | 1687 |
| 42.4.8 | Ready pin (RDY) management . . . . . | 1691 |
| 42.4.9 | Communication formats . . . . . | 1691 |
| 42.4.10 | Configuring the SPI . . . . . | 1693 |
| 42.4.11 | Enabling the SPI . . . . . | 1694 |
| 42.4.12 | SPI data transmission and reception procedures . . . . . | 1695 |
| 42.4.13 | Disabling the SPI . . . . . | 1699 |
| 42.4.14 | Communication using DMA (direct memory addressing) . . . . . | 1700 |
| 42.4.15 | Autonomous mode . . . . . | 1701 |
| 42.5 | SPI specific modes and control . . . . . | 1703 |
| 42.5.1 | TI mode . . . . . | 1703 |
| 42.5.2 | SPI error flags . . . . . | 1704 |
| 42.5.3 | CRC computation . . . . . | 1707 |
| 42.6 | SPI in low-power modes . . . . . | 1708 |
| 42.7 | SPI interrupts . . . . . | 1709 |
| 42.8 | SPI registers . . . . . | 1710 |
| 42.8.1 | SPI control register 1 (SPI_CR1) . . . . . | 1710 |
| 42.8.2 | SPI control register 2 (SPI_CR2) . . . . . | 1712 |
- 42.8.3 SPI configuration register 1 (SPI_CFG1) . . . . . 1713
- 42.8.4 SPI configuration register 2 (SPI_CFG2) . . . . . 1716
- 42.8.5 SPI interrupt enable register (SPI_IER) . . . . . 1718
- 42.8.6 SPI status register (SPI_SR) . . . . . 1719
- 42.8.7 SPI interrupt/status flags clear register (SPI_IFCR) . . . . . 1722
- 42.8.8 SPI autonomous mode control register (SPI_AUTOCR) . . . . . 1723
- 42.8.9 SPI transmit data register (SPI_TXDR) . . . . . 1723
- 42.8.10 SPI receive data register (SPI_RXDR) . . . . . 1724
- 42.8.11 SPI polynomial register (SPI_CRCPOLY) . . . . . 1724
- 42.8.12 SPI transmitter CRC register (SPI_TXCRC) . . . . . 1725
- 42.8.13 SPI receiver CRC register (SPI_RXCRC) . . . . . 1726
- 42.8.14 SPI underrun data register (SPI_UDRDR) . . . . . 1726
- 42.8.15 SPI register map . . . . . 1727
43 Serial audio interface (SAI) . . . . . 1728
- 43.1 SAI introduction . . . . . 1728
- 43.2 SAI main features . . . . . 1728
- 43.3 SAI implementation . . . . . 1729
- 43.4 SAI functional description . . . . . 1730
- 43.4.1 SAI block diagram . . . . . 1730
- 43.4.2 SAI pins and internal signals . . . . . 1731
- 43.4.3 Main SAI modes . . . . . 1732
- 43.4.4 SAI synchronization mode . . . . . 1733
- 43.4.5 Audio data size . . . . . 1733
- 43.4.6 Frame synchronization . . . . . 1733
- 43.4.7 Slot configuration . . . . . 1737
- 43.4.8 SAI clock generator . . . . . 1739
- 43.4.9 Internal FIFOs . . . . . 1742
- 43.4.10 PDM interface . . . . . 1744
- 43.4.11 AC'97 link controller . . . . . 1752
- 43.4.12 SPDIF output . . . . . 1753
- 43.4.13 Specific features . . . . . 1756
- 43.4.14 Error flags . . . . . 1760
- 43.4.15 Disabling the SAI . . . . . 1763
- 43.4.16 SAI DMA interface . . . . . 1763
- 43.5 SAI low-power modes . . . . . 1764
| 43.6 | SAI interrupts . . . . . | 1765 |
| 43.7 | SAI registers . . . . . | 1766 |
| 43.7.1 | SAI configuration register 1 (SAI_ACR1) . . . . . | 1766 |
| 43.7.2 | SAI configuration register 2 (SAI_ACR2) . . . . . | 1768 |
| 43.7.3 | SAI frame configuration register (SAI_AFRCR) . . . . . | 1770 |
| 43.7.4 | SAI slot register (SAI_ASLOTR) . . . . . | 1771 |
| 43.7.5 | SAI interrupt mask register (SAI_AIM) . . . . . | 1772 |
| 43.7.6 | SAI status register (SAI_ASR) . . . . . | 1774 |
| 43.7.7 | SAI clear flag register (SAI_ACLRFR) . . . . . | 1776 |
| 43.7.8 | SAI data register (SAI_ADR) . . . . . | 1777 |
| 43.7.9 | SAI configuration register 1 (SAI_BCR1) . . . . . | 1777 |
| 43.7.10 | SAI configuration register 2 (SAI_BCR2) . . . . . | 1780 |
| 43.7.11 | SAI frame configuration register (SAI_BFRCR) . . . . . | 1782 |
| 43.7.12 | SAI slot register (SAI_BSLOTR) . . . . . | 1783 |
| 43.7.13 | SAI interrupt mask register (SAI_BIM) . . . . . | 1784 |
| 43.7.14 | SAI status register (SAI_BSR) . . . . . | 1785 |
| 43.7.15 | SAI clear flag register (SAI_BCLRFR) . . . . . | 1787 |
| 43.7.16 | SAI data register (SAI_BDR) . . . . . | 1788 |
| 43.7.17 | SAI PDM control register (SAI_PDMCR) . . . . . | 1789 |
| 43.7.18 | SAI PDM delay register (SAI_PDMPLY) . . . . . | 1790 |
| 43.7.19 | SAI register map . . . . . | 1792 |
| 44 | USB on-the-go high-speed (OTG) . . . . . | 1794 |
| 44.1 | OTG introduction . . . . . | 1794 |
| 44.2 | OTG main features . . . . . | 1795 |
| 44.2.1 | General features . . . . . | 1795 |
| 44.2.2 | Host-mode features . . . . . | 1796 |
| 44.2.3 | Peripheral-mode features . . . . . | 1796 |
| 44.3 | OTG implementation . . . . . | 1796 |
| 44.4 | OTG functional description . . . . . | 1797 |
| 44.4.1 | OTG block diagram . . . . . | 1797 |
| 44.4.2 | OTG pin and internal signals . . . . . | 1797 |
| 44.4.3 | OTG core . . . . . | 1798 |
| 44.4.4 | OTG detections . . . . . | 1798 |
| 44.4.5 | High-speed OTG PHY connected to OTG . . . . . | 1798 |
| 44.4.6 | Battery charging detection . . . . . | 1798 |
- 44.5 OTG dual role device (DRD) . . . . . 1799
- 44.5.1 ID line detection . . . . . 1799
- 44.6 OTG as a USB peripheral . . . . . 1800
- 44.6.1 Peripheral states . . . . . 1800
- 44.6.2 Peripheral endpoints . . . . . 1801
- 44.7 OTG as a USB host . . . . . 1803
- 44.7.1 USB host states . . . . . 1804
- 44.7.2 Host channels . . . . . 1805
- 44.7.3 Host scheduler . . . . . 1807
- 44.8 OTG SOF trigger . . . . . 1808
- 44.8.1 Host SOFs . . . . . 1808
- 44.8.2 Peripheral SOFs . . . . . 1808
- 44.9 OTG low-power modes . . . . . 1809
- 44.10 OTG Dynamic update of the OTG_HFIR register . . . . . 1810
- 44.11 OTG data FIFOs . . . . . 1810
- 44.11.1 Peripheral FIFO architecture . . . . . 1811
- 44.11.2 Host FIFO architecture . . . . . 1812
- 44.11.3 FIFO RAM allocation . . . . . 1813
- 44.12 OTG interrupts . . . . . 1815
- 44.13
OTG control and status registers
. . . . . 1817
- 44.13.1 CSR memory map . . . . . 1817
- 44.14
OTG registers
. . . . . 1822
- 44.14.1 OTG control and status register (OTG_GOTGCTL) . . . . . 1822
- 44.14.2 OTG interrupt register (OTG_GOTGINT) . . . . . 1824
- 44.14.3 OTG AHB configuration register (OTG_GAHBCFG) . . . . . 1825
- 44.14.4 OTG USB configuration register (OTG_GUSBCFG) . . . . . 1826
- 44.14.5 OTG reset register (OTG_GRSTCTL) . . . . . 1828
- 44.14.6 OTG core interrupt register [alternate] (OTG_GINTSTS) . . . . . 1831
- 44.14.7 OTG core interrupt register [alternate] (OTG_GINTSTS) . . . . . 1835
- 44.14.8 OTG interrupt mask register [alternate] (OTG_GINTMSK) . . . . . 1840
- 44.14.9 OTG interrupt mask register [alternate] (OTG_GINTMSK) . . . . . 1841
- 44.14.10 OTG receive status debug read register [alternate]
(OTG_GRXSTSR) . . . . . 1843 - 44.14.11 OTG receive status debug read register [alternate]
(OTG_GRXSTSR) . . . . . 1844 - 44.14.12 OTG status read and pop registers (OTG_GRXSTSP) . . . . . 1845
| 44.14.13 | OTG status read and pop registers [alternate] (OTG_GRXSTSP) . . . | 1846 |
| 44.14.14 | OTG receive FIFO size register (OTG_GRXFSIZ) . . . . . | 1847 |
| 44.14.15 | OTG host non-periodic transmit FIFO size register [alternate] (OTG_HNPTXFSIZ) . . . . . | 1848 |
| 44.14.16 | Endpoint 0 transmit FIFO size [alternate] (OTG_DIEPTXF0) . . . . . | 1848 |
| 44.14.17 | OTG non-periodic transmit FIFO/queue status register (OTG_HNPTXSTS) . . . . . | 1849 |
| 44.14.18 | OTG general core configuration register (OTG_GCCFG) . . . . . | 1850 |
| 44.14.19 | OTG core ID register (OTG_CID) . . . . . | 1851 |
| 44.14.20 | OTG core LPM configuration register (OTG_GLPMCFG) . . . . . | 1852 |
| 44.14.21 | OTG host periodic transmit FIFO size register (OTG_HPTXFSIZ) . . . . . | 1856 |
| 44.14.22 | OTG device IN endpoint transmit FIFO x size register (OTG_DIEPTXFx) . . . . . | 1856 |
| 44.14.23 | Host-mode registers . . . . . | 1856 |
| 44.14.24 | OTG host configuration register (OTG_HCFG) . . . . . | 1857 |
| 44.14.25 | OTG host frame interval register (OTG_HFIR) . . . . . | 1857 |
| 44.14.26 | OTG host frame number/frame time remaining register (OTG_HFNUM) . . . . . | 1858 |
| 44.14.27 | OTG_Host periodic transmit FIFO/queue status register (OTG_HPTXSTS) . . . . . | 1859 |
| 44.14.28 | OTG host all channels interrupt register (OTG_HAINT) . . . . . | 1860 |
| 44.14.29 | OTG host all channels interrupt mask register (OTG_HAINTMSK) . . . . . | 1860 |
| 44.14.30 | OTG host port control and status register (OTG_HPRT) . . . . . | 1861 |
| 44.14.31 | OTG host channel x characteristics register (OTG_HCCHARx) . . . . . | 1863 |
| 44.14.32 | OTG host channel x split control register (OTG_HCSPLTx) . . . . . | 1864 |
| 44.14.33 | OTG host channel x interrupt register (OTG_HCINTx) . . . . . | 1865 |
| 44.14.34 | OTG host channel x interrupt mask register (OTG_HCINTMSKx) . . . . . | 1866 |
| 44.14.35 | OTG host channel x transfer size register (OTG_HCTSIZx) . . . . . | 1867 |
| 44.14.36 | OTG host channel x DMA address register(OTG_HCDMAx) . . . . . | 1868 |
| 44.14.37 | Device-mode registers . . . . . | 1868 |
| 44.14.38 | OTG device configuration register (OTG_DCFG) . . . . . | 1868 |
| 44.14.39 | OTG device control register (OTG_DCTL) . . . . . | 1870 |
| 44.14.40 | OTG device status register (OTG_DSTS) . . . . . | 1872 |
| 44.14.41 | OTG device IN endpoint common interrupt mask register (OTG_DIEPMSK) . . . . . | 1873 |
| 44.14.42 | OTG device OUT endpoint common interrupt mask register (OTG_DOEPMSK) . . . . . | 1874 |
| 44.14.43 | OTG device all endpoints interrupt register (OTG_DAIN) . . . . . | 1875 |
| 44.14.44 | OTG all endpoints interrupt mask register (OTG_DAINTEMSK) ..... | 1876 |
| 44.14.45 | OTG device threshold control register (OTG_DTHRCTL) ..... | 1876 |
| 44.14.46 | OTG device IN endpoint FIFO empty interrupt mask register (OTG_DIEPEMPMSK) ..... | 1877 |
| 44.14.47 | OTG device IN endpoint x control register [alternate] (OTG_DIEPCTLx) ..... | 1878 |
| 44.14.48 | OTG device IN endpoint x control register [alternate] (OTG_DIEPCTLx) ..... | 1880 |
| 44.14.49 | OTG device IN endpoint x interrupt register (OTG_DIEPINTx) ..... | 1882 |
| 44.14.50 | OTG device IN endpoint 0 transfer size register (OTG_DIEPTSIZ0) ..... | 1883 |
| 44.14.51 | OTG device IN endpoint x DMA address register (OTG_DIEPDMAx) ..... | 1884 |
| 44.14.52 | OTG device IN endpoint transmit FIFO status register (OTG_DTXFSTSx) ..... | 1884 |
| 44.14.53 | OTG device IN endpoint x transfer size register (OTG_DIEPTSIZx) . | 1885 |
| 44.14.54 | OTG device control OUT endpoint 0 control register (OTG_DOEPCTL0) ..... | 1885 |
| 44.14.55 | OTG device OUT endpoint x interrupt register (OTG_DOEPINTx) .. | 1887 |
| 44.14.56 | OTG device OUT endpoint 0 transfer size register (OTG_DOEPTSIZ0) ..... | 1889 |
| 44.14.57 | OTG device OUT endpoint x DMA address register (OTG_DOEPDMAx) ..... | 1890 |
| 44.14.58 | OTG device OUT endpoint x control register [alternate] (OTG_DOEPCTLx) ..... | 1890 |
| 44.14.59 | OTG device OUT endpoint x control register [alternate] (OTG_DOEPCTLx) ..... | 1892 |
| 44.14.60 | OTG device OUT endpoint x transfer size register (OTG_DOEPTSIZx) ..... | 1894 |
| 44.14.61 | OTG power and clock gating control register (OTG_PCGCCTL) .. | 1895 |
| 44.14.62 | OTG power and clock gating control register 1 (OTG_PCGCCTL1) . | 1896 |
| 44.14.63 | OTG register map ..... | 1897 |
| 44.15 | OTG programming model ..... | 1904 |
| 44.15.1 | Core initialization ..... | 1904 |
| 44.15.2 | Host initialization ..... | 1905 |
| 44.15.3 | Device initialization ..... | 1906 |
| 44.15.4 | DMA mode ..... | 1906 |
| 44.15.5 | Host programming model ..... | 1906 |
| 44.15.6 | Device programming model ..... | 1939 |
| 44.15.7 | Worst case response time ..... | 1959 |
| 44.15.8 | OTG programming model ..... | 1961 |
| 45 | Debug support (DBG) ..... | 1962 |
| 45.1 | DBG introduction and main features ..... | 1962 |
| 45.2 | DBG functional description ..... | 1963 |
| 45.2.1 | DBG block diagram ..... | 1963 |
| 45.2.2 | DBG pins and internal signals ..... | 1963 |
| 45.2.3 | DBG reset and clocks ..... | 1963 |
| 45.2.4 | DBG power domains ..... | 1964 |
| 45.2.5 | DBG low-power modes ..... | 1964 |
| 45.2.6 | DBG security ..... | 1964 |
| 45.2.7 | Serial-wire and JTAG debug port ..... | 1966 |
| 45.2.8 | JTAG debug port ..... | 1967 |
| 45.2.9 | Serial-wire debug port ..... | 1969 |
| 45.3 | Debug port registers ..... | 1970 |
| 45.3.1 | DP identification register [alternate] (DP_PIDR) ..... | 1971 |
| 45.3.2 | DP abort register [alternate] (DP_ABORTR) ..... | 1972 |
| 45.3.3 | DP control and status register (DP_CTRLSTATR) ..... | 1972 |
| 45.3.4 | DP data link control register (DP_DLCR) ..... | 1974 |
| 45.3.5 | DP target identification register (DP_TARGETIDR) ..... | 1974 |
| 45.3.6 | DP data link protocol identification register (DP_DLPIDR) ..... | 1975 |
| 45.3.7 | DP resend register (DP_EVENSTATR) ..... | 1975 |
| 45.3.8 | DP resend register (DP_RESENR) ..... | 1976 |
| 45.3.9 | DP access port select register (DP_SELECTR) ..... | 1976 |
| 45.3.10 | DP read buffer register (DP_BUFFR) ..... | 1977 |
| 45.3.11 | DP register map and reset values ..... | 1977 |
| 45.4 | Access port ..... | 1979 |
| 45.4.1 | Access port registers ..... | 1979 |
| 45.4.2 | AP control/status word register (APx_CSWR) (x = 0 to 1) ..... | 1980 |
| 45.4.3 | AP transfer address register (APx_TAR) (x = 0 to 1) ..... | 1981 |
| 45.4.4 | AP data read/write register (APx_DRWR) (x = 0 to 1) ..... | 1981 |
| 45.4.5 | AP banked data registers y (APx_BDyR) (x = 0 to 1) ..... | 1981 |
| 45.4.6 | AP configuration register (APx_CFGR) (x = 0 to 1) ..... | 1982 |
| 45.4.7 | AP base address register (APx_BASER) (x = 0 to 1) ..... | 1982 |
| 45.4.8 | AP identification register (APx_IDR) (x = 0 to 1) ..... | 1983 |
| 45.4.9 | Access port register map and reset values ..... | 1984 |
| 45.5 | System debug AP0 features ..... | 1985 |
| 45.5.1 | System debug ROM table . . . . . | 1985 |
| 45.5.2 | System debug memory type register (SYSROM_MEMTYPER) . . . . . | 1986 |
| 45.5.3 | System debug CoreSight peripheral identity register 4 (SYSROM_PIDR4) . . . . . | 1986 |
| 45.5.4 | System debug CoreSight peripheral identity register 0 (SYSROM_PIDR0) . . . . . | 1987 |
| 45.5.5 | System debug CoreSight peripheral identity register 1 (SYSROM_PIDR1) . . . . . | 1987 |
| 45.5.6 | System debug CoreSight peripheral identity register 2 (SYSROM_PIDR2) . . . . . | 1988 |
| 45.5.7 | System debug CoreSight peripheral identity register 3 (SYSROM_PIDR3) . . . . . | 1988 |
| 45.5.8 | System debug CoreSight component identity register 0 (SYSROM_CIDR0) . . . . . | 1989 |
| 45.5.9 | System debug CoreSight peripheral identity register 1 (SYSROM_CIDR1) . . . . . | 1989 |
| 45.5.10 | System debug CoreSight component identity register 2 (SYSROM_CIDR2) . . . . . | 1990 |
| 45.5.11 | System debug CoreSight component identity register 3 (SYSROM_CIDR3) . . . . . | 1990 |
| 45.5.12 | System debug ROM table register map and reset values . . . . . | 1991 |
| 45.6 | Cortex-M33 AP1 features . . . . . | 1992 |
| 45.6.1 | CPU ROM tables . . . . . | 1992 |
| 45.6.2 | MCU and processor ROM memory type register (ROM_MEMTYPER) . . . . . | 1994 |
| 45.6.3 | MCU and processor ROM CoreSight peripheral identity register 4 (ROM_PIDR4) . . . . . | 1995 |
| 45.6.4 | MCU and processor ROM CoreSight peripheral identity register 0 (ROM_PIDR0) . . . . . | 1995 |
| 45.6.5 | MCU and processor ROM CoreSight peripheral identity register 1 (ROM_PIDR1) . . . . . | 1996 |
| 45.6.6 | MCU and processor ROM CoreSight peripheral identity register 2 (ROM_PIDR2) . . . . . | 1996 |
| 45.6.7 | MCU and processor ROM CoreSight peripheral identity register 3 (ROM_PIDR3) . . . . . | 1997 |
| 45.6.8 | MCU and processor ROM CoreSight component identity register 0 (ROM_CIDR0) . . . . . | 1997 |
| 45.6.9 | MCU and processor ROM CoreSight peripheral identity register 1 (ROM_CIDR1) . . . . . | 1998 |
| 45.6.10 | MCU and processor ROM CoreSight component identity register 2 (ROM_CIDR2) . . . . . | 1998 |
| 45.6.11 | MCU and processor ROM CoreSight component identity register 3 (ROM_CIDR3) . . . . . | 1999 |
| 45.6.12 | MCU and processor ROM tables register map and reset values . . . . . | 2000 |
| 45.7 | Data watchpoint and trace unit (DWT) . . . . . | 2001 |
| 45.7.1 | DWT control register (DWT_CTRLR) . . . . . | 2002 |
| 45.7.2 | DWT cycle count register (DWT_CYCCNTR) . . . . . | 2003 |
| 45.7.3 | DWT CPI count register (DWT_CPICNTR) . . . . . | 2004 |
| 45.7.4 | DWT exception count register (DWT_EXCCNTR) . . . . . | 2004 |
| 45.7.5 | DWT sleep count register (DWT_SLP CNTR) . . . . . | 2004 |
| 45.7.6 | DWT LSU count register (DWT_LSUCNTR) . . . . . | 2005 |
| 45.7.7 | DWT fold count register (DWT_FOLDCNTR) . . . . . | 2005 |
| 45.7.8 | DWT program counter sample register (DWT_PCSR) . . . . . | 2006 |
| 45.7.9 | DWT comparator register x (DWT_COMPxR) . . . . . | 2006 |
| 45.7.10 | DWT function register 0(DWT_FUNCTR0) . . . . . | 2006 |
| 45.7.11 | DWT device type architecture register (DWT_DEVARCHR) . . . . . | 2010 |
| 45.7.12 | DWT device type register 4 (DWT_DEVTYPE) . . . . . | 2011 |
| 45.7.13 | DWT CoreSight peripheral identity register 4 (DWT_PIDR4) . . . . . | 2011 |
| 45.7.14 | DWT CoreSight peripheral identity register 0 (DWT_PIDR0) . . . . . | 2012 |
| 45.7.15 | DWT CoreSight peripheral identity register 1 (DWT_PIDR1) . . . . . | 2012 |
| 45.7.16 | DWT CoreSight peripheral identity register 2 (DWT_PIDR2) . . . . . | 2013 |
| 45.7.17 | DWT CoreSight peripheral identity register 3 (DWT_PIDR3) . . . . . | 2013 |
| 45.7.18 | DWT CoreSight component identity register 0 (DWT_CIDR0) . . . . . | 2014 |
| 45.7.19 | DWT CoreSight peripheral identity register 1 (DWT_CIDR1) . . . . . | 2014 |
| 45.7.20 | DWT CoreSight component identity register 2 (DWT_CIDR2) . . . . . | 2014 |
| 45.7.21 | DWT CoreSight component identity register 3 (DWT_CIDR3) . . . . . | 2015 |
| 45.7.22 | DWT register map and reset values . . . . . | 2016 |
| 45.8 | Instrumentation trace macrocell (ITM) . . . . . | 2019 |
| 45.8.1 | ITM registers . . . . . | 2019 |
| 45.8.2 | ITM stimulus register x (ITM_STIMRx) . . . . . | 2019 |
| 45.8.3 | ITM trace enable register (ITM_TER) . . . . . | 2020 |
| 45.8.4 | ITM trace privilege register (ITM_TPR) . . . . . | 2020 |
| 45.8.5 | ITM trace control register (ITM_TCR) . . . . . | 2021 |
| 45.8.6 | ITM device type architecture register (ITM_DEVARCHR) . . . . . | 2022 |
| 45.8.7 | ITM device type register 4 (ITM_DEVTYPE) . . . . . | 2022 |
| 45.8.8 | ITM CoreSight peripheral identity register 4 (ITM_PIDR4) . . . . . | 2023 |
| 45.8.9 | ITM CoreSight peripheral identity register 0 (ITM_PIDR0) . . . . . | 2023 |
| 45.8.10 | ITM CoreSight peripheral identity register 1 (ITM_PIDR1) . . . . . | 2023 |
| 45.8.11 | ITM CoreSight peripheral identity register 2 (ITM_PIDR2) . . . . . | 2024 |
| 45.8.12 | ITM CoreSight peripheral identity register 3 (ITM_PIDR3) . . . . . | 2024 |
| 45.8.13 | ITM CoreSight component identity register 0 (ITM_CIDR0) . . . . . | 2025 |
| 45.8.14 | ITM CoreSight peripheral identity register 1 (ITM_CIDR1) . . . . . | 2025 |
| 45.8.15 | ITM CoreSight component identity register 2 (ITM_CIDR2) . . . . . | 2025 |
| 45.8.16 | ITM CoreSight component identity register 3 (ITM_CIDR3) . . . . . | 2026 |
| 45.8.17 | ITM register map and reset values . . . . . | 2027 |
| 45.9 | Breakpoint unit (BPU) . . . . . | 2029 |
| 45.9.1 | BPU control register (BPU_CTRLR) . . . . . | 2029 |
| 45.9.2 | BPU comparator x register (BPU_COMPxR) . . . . . | 2029 |
| 45.9.3 | BPU device type architecture register (BPU_DEVARCHR) . . . . . | 2030 |
| 45.9.4 | BPU device type register 4 (BPU_DEVTYPER) . . . . . | 2030 |
| 45.9.5 | BPU CoreSight peripheral identity register 4 (BPU_PIDR4) . . . . . | 2031 |
| 45.9.6 | BPU CoreSight peripheral identity register 0 (BPU_PIDR0) . . . . . | 2031 |
| 45.9.7 | BPU CoreSight peripheral identity register 1 (BPU_PIDR1) . . . . . | 2031 |
| 45.9.8 | BPU CoreSight peripheral identity register 2 (BPU_PIDR2) . . . . . | 2032 |
| 45.9.9 | BPU CoreSight peripheral identity register 3 (BPU_PIDR3) . . . . . | 2032 |
| 45.9.10 | BPU CoreSight component identity register 0 (BPU_CIDR0) . . . . . | 2033 |
| 45.9.11 | BPU CoreSight peripheral identity register 1 (BPU_CIDR1) . . . . . | 2033 |
| 45.9.12 | BPU CoreSight component identity register 2 (BPU_CIDR2) . . . . . | 2033 |
| 45.9.13 | BPU CoreSight component identity register 3 (BPU_CIDR3) . . . . . | 2034 |
| 45.9.14 | BPU register map and reset values . . . . . | 2035 |
| 45.10 | Embedded Trace Macrocell (ETM) . . . . . | 2036 |
| 45.10.1 | ETM registers . . . . . | 2036 |
| 45.10.2 | ETM register map and reset values . . . . . | 2059 |
| 45.11 | Trace port interface unit (TPIU) . . . . . | 2062 |
| 45.11.1 | TPIU registers . . . . . | 2063 |
| 45.11.2 | TPIU supported port size register (TPIU_SSPSR) . . . . . | 2063 |
| 45.11.3 | TPIU current port size register (TPIU_CSPSR) . . . . . | 2064 |
| 45.11.4 | TPIU asynchronous clock prescaler register (TPIU_ACPR) . . . . . | 2064 |
| 45.11.5 | TPIU selected pin protocol register (TPIU_SPPR) . . . . . | 2064 |
| 45.11.6 | TPIU formatter and flush status register (TPIU_FFSR) . . . . . | 2065 |
| 45.11.7 | TPIU formatter and flush control register (TPIU_FFCR) . . . . . | 2065 |
| 45.11.8 | TPIU formatter synchronization counter register (TPIU_FSCR) . . . . . | 2066 |
| 45.11.9 | TPIU claim tag set register (TPIU_CLAIMSETR) . . . . . | 2067 |
| 45.11.10 | TPIU claim tag clear register (TPIU_CLAIMCLR) . . . . . | 2067 |
| 45.11.11 | TPIU device configuration register (TPIU_DEVIDR) . . . . . | 2068 |
| 45.11.12 | TPIU device type identifier register (TPIU_DEVTYPE) | 2068 |
| 45.11.13 | TPIU CoreSight peripheral identity register 4 (TPIU_PIDR4) | 2069 |
| 45.11.14 | TPIU CoreSight peripheral identity register 0 (TPIU_PIDR0) | 2069 |
| 45.11.15 | TPIU CoreSight peripheral identity register 1 (TPIU_PIDR1) | 2069 |
| 45.11.16 | TPIU CoreSight peripheral identity register 2 (TPIU_PIDR2) | 2070 |
| 45.11.17 | TPIU CoreSight peripheral identity register 3 (TPIU_PIDR3) | 2070 |
| 45.11.18 | TPIU CoreSight component identity register 0 (TPIU_CIDR0) | 2071 |
| 45.11.19 | TPIU CoreSight peripheral identity register 1 (TPIU_CIDR1) | 2071 |
| 45.11.20 | TPIU CoreSight component identity register 2 (TPIU_CIDR2) | 2071 |
| 45.11.21 | TPIU CoreSight component identity register 3 (TPIU_CIDR3) | 2072 |
| 45.11.22 | TPIU register map and reset values | 2073 |
| 45.12 | Cross trigger interface (CTI) | 2075 |
| 45.12.1 | CTI registers | 2076 |
| 45.12.2 | CTI register map and reset values | 2086 |
| 45.13 | Microcontroller debug unit (DBGMCU) | 2088 |
| 45.13.1 | DBGMCU access | 2088 |
| 45.13.2 | Device ID | 2088 |
| 45.13.3 | Part number codification | 2088 |
| 45.13.4 | Low-power mode emulation | 2088 |
| 45.13.5 | Low-power mode status | 2090 |
| 45.13.6 | Peripheral clock freeze | 2090 |
| 45.13.7 | DBGMCU registers | 2091 |
| 45.13.8 | DBGMCU register map and reset values | 2103 |
| 45.14 | References | 2105 |
| 46 | Device electronic signature (DESIG) | 2106 |
| 46.1 | Device electronic signature registers | 2106 |
| 46.1.1 | DESIG package data register (DESIG_PKGR) | 2106 |
| 46.1.2 | DESIG 96-bit unique device ID register 1 (DESIG_UIDR1) | 2106 |
| 46.1.3 | DESIG 96-bit unique device ID register 2 (DESIG_UIDR2) | 2107 |
| 46.1.4 | DESIG 96-bit unique device ID register 3 (DESIG_UIDR3) | 2107 |
| 46.1.5 | DESIG temperature calibration 1 register (DESIG_TSCAL1R) | 2107 |
| 46.1.6 | DESIG temperature calibration 2 register (DESIG_TSCAL2R) | 2108 |
| 46.1.7 | DESIG FLASH size data register (DESIG_FLASHSIZER) | 2108 |
| 46.1.8 | DESIG internal voltage reference calibration register (DESIG_VREFINTCALR) | 2109 |
46.1.9 DESIG voltage reference buffer calibration register
(DESIG_VREFBUFCALR) . . . . . 2109
46.1.10 DESIG resistor calibration register (DESIG_RCALR) . . . . . 2110
46.1.11 DESIG radio gain calibration register (DESIG_RFGAINCALR) . . . . . 2110
46.1.12 DESIG IEEE 64-bit unique device ID register 1 (DESIG_UID64R1) . 2110
46.1.13 DESIG IEEE 64-bit unique device ID register 2 (DESIG_UID64R2) . 2111
46.1.14 DESIG register map . . . . . 2112
47 Important security notice . . . . . 2113
48 Revision history . . . . . 2114
List of tables
| Table 1. | Bus matrix access arbitration . . . . . | 82 |
| Table 2. | Memory map security attribution example vs. SAU configuration regions . . . . . | 83 |
| Table 3. | Securable peripherals by TZSC . . . . . | 84 |
| Table 4. | TrustZone-aware peripherals . . . . . | 86 |
| Table 5. | Memory map and peripheral register boundary addresses . . . . . | 89 |
| Table 6. | Configuring security attributes with IDAU and SAU . . . . . | 99 |
| Table 7. | MPCBBx resources . . . . . | 101 |
| Table 8. | DMA channel use (security) . . . . . | 104 |
| Table 9. | Secure alternate function between peripherals and allocated I/Os . . . . . | 106 |
| Table 10. | Nonsecure peripheral functions not connected to secure I/Os . . . . . | 107 |
| Table 11. | Nonsecure peripheral functions that can be connected to secure I/Os . . . . . | 107 |
| Table 12. | TrustZone-aware DBGMCU accesses management . . . . . | 108 |
| Table 13. | DMA channel use (privilege). . . . . | 113 |
| Table 14. | Internal tampers in TAMP . . . . . | 116 |
| Table 15. | Effect of low-power modes on TAMP . . . . . | 118 |
| Table 16. | Accelerated cryptographic operations . . . . . | 120 |
| Table 17. | Main product life-cycle transitions. . . . . | 122 |
| Table 18. | Typical product life-cycle phases . . . . . | 122 |
| Table 19. | OEM key RDP unlocking methods . . . . . | 124 |
| Table 20. | Debug protection with RDP . . . . . | 125 |
| Table 21. | Software intellectual property protection with RDP. . . . . | 127 |
| Table 22. | Boot modes when TrustZone is disabled (TZEN = 0). . . . . | 128 |
| Table 23. | Boot modes when TrustZone is enabled (TZEN = 1) . . . . . | 128 |
| Table 24. | Boot space versus RDP protection. . . . . | 129 |
| Table 25. | GTZC features . . . . . | 132 |
| Table 26. | GTZC subblocks. . . . . | 132 |
| Table 27. | MPCBB resource assignment. . . . . | 133 |
| Table 28. | GTZC interrupt request. . . . . | 136 |
| Table 29. | GTZC1 TZSC register map and reset values . . . . . | 150 |
| Table 30. | GTZC1 TZIC register map and reset values. . . . . | 170 |
| Table 31. | GTZC1 MPCBB1 and MPCBB2 register map and reset values. . . . . | 175 |
| Table 32. | GTZC1 MPCBB6 register map and reset values . . . . . | 177 |
| Table 33. | SRAMs features . . . . . | 179 |
| Table 34. | SRAM parity access error. . . . . | 180 |
| Table 35. | SRAM parity error bus master ID . . . . . | 180 |
| Table 36. | Number of wait states versus hclk frequency and voltage range scaling . . . . . | 180 |
| Table 37. | Effect of low-power modes on RAMCFG . . . . . | 181 |
| Table 38. | RAMCFG interrupt requests . . . . . | 181 |
| Table 39. | RAMCFG register map and reset values . . . . . | 188 |
| Table 40. | Flash module 2-Mbyte dual bank organization. . . . . | 191 |
| Table 41. | Flash module 1-Mbyte dual bank organization. . . . . | 191 |
| Table 42. | Wait states according to CPU clock (HCLK1) frequency (LPM = 0). . . . . | 193 |
| Table 43. | Wait states according to CPU clock (HCLK1) frequency (LPM = 1). . . . . | 193 |
| Table 44. | Program and erase suspend control. . . . . | 202 |
| Table 45. | Flash operation interrupted by a system reset . . . . . | 205 |
| Table 46. | User option byte organization mapping . . . . . | 206 |
| Table 47. | Default secure option bytes after TZEN activation . . . . . | 209 |
| Table 48. | Secure watermark-based area . . . . . | 210 |
| Table 49. | Secure hide protection . . . . . | 211 |
| Table 50. | Flash security state . . . . . | 212 |
| Table 51. | WRP protection. . . . . | 216 |
| Table 52. | Flash memory readout protection status (TZEN=0) . . . . . | 216 |
| Table 53. | Access status vs. protection level and execution modes when TZEN = 0 . . . . . | 217 |
| Table 54. | Flash memory readout protection status (TZEN = 1) . . . . . | 218 |
| Table 55. | Access status vs. protection level and execution modes when TZEN = 1 . . . . . | 220 |
| Table 56. | Flash memory access vs. RDP level when TrustZone is active (TZEN = 1) . . . . . | 225 |
| Table 57. | Flash memory access vs. RDP level when TrustZone is disabled (TZEN = 0) . . . . . | 225 |
| Table 58. | Flash memory mass erase versus RDP level when TrustZone is active (TZEN = 1) . . . . . | 226 |
| Table 59. | Flash system memory, OTP and RSS accesses . . . . . | 226 |
| Table 60. | Flash registers access . . . . . | 227 |
| Table 61. | Flash page access versus privilege mode . . . . . | 227 |
| Table 62. | Flash bank erase versus privilege mode . . . . . | 227 |
| Table 63. | SECBBxRy registers access when TrustZone is active (TZEN = 1) . . . . . | 227 |
| Table 64. | PRIVBBxRy registers access when TrustZone is active (TZEN = 1) . . . . . | 228 |
| Table 65. | PRIVBBxRy registers access when TrustZone is disabled (TZEN = 0) . . . . . | 228 |
| Table 66. | Flash interrupt requests . . . . . | 228 |
| Table 67. | FLASH register map and reset values . . . . . | 258 |
| Table 68. | ICACHE features . . . . . | 264 |
| Table 69. | TAG memory dimensioning parameters for n-way set associative operating mode (default) . . . . . | 266 |
| Table 70. | TAG memory dimensioning parameters for direct-mapped cache mode . . . . . | 267 |
| Table 71. | ICACHE cacheability for AHB transaction . . . . . | 269 |
| Table 72. | Memory configurations . . . . . | 269 |
| Table 73. | ICACHE remap region size, base address, and remap address . . . . . | 270 |
| Table 74. | ICACHE interrupts . . . . . | 274 |
| Table 75. | ICACHE register map and reset values . . . . . | 278 |
| Table 76. | 2.4 GHz RADIO implementation . . . . . | 281 |
| Table 77. | Input/output pins . . . . . | 281 |
| Table 78. | PA output power table format . . . . . | 282 |
| Table 79. | 2.4 GHz RADIO supply configuration . . . . . | 283 |
| Table 80. | Effect of low-power modes on the 2.4 GHz RADIO . . . . . | 284 |
| Table 81. | 2.4 PTACONV input/output pins . . . . . | 287 |
| Table 82. | PTACONV internal input/output signals . . . . . | 287 |
| Table 83. | Effect of low-power modes on the PTACONV . . . . . | 287 |
| Table 84. | 2.4 PTACONV timing parameters . . . . . | 291 |
| Table 85. | PTACONV register map and reset values . . . . . | 295 |
| Table 86. | PWR input/output pins . . . . . | 297 |
| Table 87. | PWR internal input/output signals . . . . . | 297 |
| Table 88. | PWR wake-up source selection . . . . . | 298 |
| Table 89. | Low-power modes summary . . . . . | 315 |
| Table 90. | Functionalities depending on the working mode . . . . . | 316 |
| Table 91. | Sleep mode . . . . . | 323 |
| Table 92. | Stop 0 mode . . . . . | 325 |
| Table 93. | Stop 1 mode . . . . . | 327 |
| Table 94. | Stop 2 mode . . . . . | 329 |
| Table 95. | GPIO retention pin with pull-up and pull-down . . . . . | 331 |
| Table 96. | Standby mode . . . . . | 332 |
| Table 97. | Power modes output states versus MCU power modes . . . . . | 333 |
| Table 98. | PWR security configuration summary . . . . . | 334 |
| Table 99. | PWR interrupt requests . . . . . | 336 |
| Table 100. | PWR register map and reset values . . . . . | 364 |
| Table 101. | RCC input/output signals connected to package pins or balls . . . . . | 367 |
| Table 102. | LSI clock selection . . . . . | 377 |
| Table 103. | SYSCLK and bus maximum frequency . . . . . | 378 |
| Table 104. | Clock source maximum frequency . . . . . | 380 |
| Table 105. | 2.4 GHz RADIO bus clock control . . . . . | 382 |
| Table 106. | Autonomous peripherals . . . . . | 389 |
| Table 107. | RCC security configuration summary . . . . . | 391 |
| Table 108. | Interrupt sources and control . . . . . | 394 |
| Table 109. | RCC register map and reset values . . . . . | 470 |
| Table 110. | HSEM internal input/output signals . . . . . | 477 |
| Table 111. | Semaphore attributes . . . . . | 482 |
| Table 112. | Authorized AHB bus master ID . . . . . | 483 |
| Table 113. | HSEM register map and reset values . . . . . | 496 |
| Table 114. | GPIO implementation . . . . . | 498 |
| Table 115. | Port bit configuration . . . . . | 500 |
| Table 116. | GPIO secured bits . . . . . | 508 |
| Table 117. | GPIOA to B register map and reset values . . . . . | 518 |
| Table 118. | GPIOC register map and reset values . . . . . | 529 |
| Table 119. | GPIO D register map and reset values . . . . . | 539 |
| Table 120. | GPIOE register map and reset values . . . . . | 548 |
| Table 121. | GPIOG register map and reset values . . . . . | 559 |
| Table 122. | GPIOH register map and reset values . . . . . | 567 |
| Table 123. | Effect of low-power modes on I/O compensation . . . . . | 569 |
| Table 124. | TrustZone security and privilege register accesses . . . . . | 570 |
| Table 125. | BOOSTEN and ANASWVDD set/reset . . . . . | 574 |
| Table 126. | SYSCFG register map and reset values . . . . . | 584 |
| Table 127. | Peripherals interconnect matrix . . . . . | 586 |
| Table 128. | GPDMA1 channel implementation . . . . . | 598 |
| Table 129. | GPDMA1 autonomous mode and wake-up in low-power modes . . . . . | 598 |
| Table 130. | Programmed GPDMA1 request . . . . . | 598 |
| Table 131. | Programmed GPDMA1 request as a block request . . . . . | 600 |
| Table 132. | Programmed GPDMA1 trigger . . . . . | 601 |
| Table 133. | Programmed GPDMA source/destination burst . . . . . | 621 |
| Table 134. | Programmed data handling . . . . . | 624 |
| Table 135. | Effect of low-power modes on GPDMA . . . . . | 637 |
| Table 136. | GPDMA interrupt requests . . . . . | 638 |
| Table 137. | GPDMA register map and reset values . . . . . | 659 |
| Table 138. | STM32WBA6xxx vector table . . . . . | 661 |
| Table 139. | EXTI pin overview . . . . . | 666 |
| Table 140. | EVG pin overview . . . . . | 666 |
| Table 141. | EXTI line connections . . . . . | 667 |
| Table 142. | Masking functionality . . . . . | 670 |
| Table 143. | Register protection overview . . . . . | 670 |
| Table 144. | EXTI register map sections . . . . . | 672 |
| Table 145. | EXTI register map and reset values . . . . . | 685 |
| Table 146. | CRC internal input/output signals . . . . . | 688 |
| Table 147. | Effect of low-power modes on CRC . . . . . | 690 |
| Table 148. | CRC register map and reset values . . . . . | 693 |
| Table 149. | ADC features . . . . . | 695 |
| Table 150. | Memory location of the temperature sensor calibration values . . . . . | 696 |
| Table 151. | Memory location of the internal reference voltage sensor . . . . . | 696 |
| calibration value . . . . . | 696 |
| Table 152. ADC input/output pins . . . . . | 698 |
| Table 153. ADC internal input/output signals . . . . . | 698 |
| Table 154. ADC interconnection . . . . . | 698 |
| Table 155. Latency between trigger and start of conversion . . . . . | 703 |
| Table 156. Configuring the trigger polarity . . . . . | 710 |
| Table 157. \( t_{SAR} \) timings depending on resolution . . . . . | 712 |
| Table 158. Analog watchdog comparison . . . . . | 724 |
| Table 159. Analog watchdog 1 channel selection . . . . . | 724 |
| Table 160. Maximum output results vs N and M. Grayed values indicates truncation . . . . . | 728 |
| Table 161. Effect of low-power modes on the ADC . . . . . | 733 |
| Table 162. ADC wake-up and interrupt requests . . . . . | 734 |
| Table 163. ADC register map and reset values . . . . . | 754 |
| Table 164. VREFBUF typical values . . . . . | 757 |
| Table 165. VREF buffer modes . . . . . | 758 |
| Table 166. VREFBUF trimming data . . . . . | 759 |
| Table 167. VREFBUF register map and reset values . . . . . | 761 |
| Table 168. COMP instances on devices . . . . . | 762 |
| Table 169. COMP1 non-inverting input assignment . . . . . | 763 |
| Table 170. COMP1 inverting input assignment . . . . . | 764 |
| Table 171. COMP2 non-inverting input assignment . . . . . | 764 |
| Table 172. COMP2 inverting input assignment . . . . . | 764 |
| Table 173. COMP1 output-blanking PWM assignment . . . . . | 765 |
| Table 174. COMP2 output-blanking PWM assignment . . . . . | 765 |
| Table 175. Comparator behavior in the low-power modes . . . . . | 768 |
| Table 176. Interrupt control bits . . . . . | 769 |
| Table 177. COMP register map and reset values . . . . . | 772 |
| Table 178. Acquisition sequence summary . . . . . | 776 |
| Table 179. Spread spectrum deviation versus AHB clock frequency . . . . . | 778 |
| Table 180. I/O state depending on its mode and IODEF bit value . . . . . | 779 |
| Table 181. Effect of low-power modes on TSC . . . . . | 781 |
| Table 182. Interrupt control bits . . . . . | 781 |
| Table 183. TSC register map and reset values . . . . . | 788 |
| Table 184. RNG internal input/output signals . . . . . | 791 |
| Table 185. RNG interrupt requests . . . . . | 799 |
| Table 186. RNG configurations . . . . . | 800 |
| Table 187. Additional health test configurations . . . . . | 800 |
| Table 188. Configuration selection . . . . . | 800 |
| Table 189. RNG register map and reset map . . . . . | 806 |
| Table 190. AES versus SAES features . . . . . | 808 |
| Table 191. AES internal input/output signals . . . . . | 809 |
| Table 192. AES approved symmetric key functions . . . . . | 809 |
| Table 193. Counter mode initialization vector definition . . . . . | 819 |
| Table 194. Initialization of IV registers in GCM mode . . . . . | 821 |
| Table 195. GCM last block definition . . . . . | 821 |
| Table 196. Initialization of IV registers in CCM mode . . . . . | 828 |
| Table 197. AES data swapping example . . . . . | 831 |
| Table 198. Key endianness in AES_KEYRx registers (128/256-bit keys) . . . . . | 833 |
| Table 199. IVI bitfield spread over AES_IVRx registers . . . . . | 834 |
| Table 200. Effect of low-power modes on AES . . . . . | 835 |
| Table 201. AES interrupt requests . . . . . | 836 |
| Table 202. Processing latency for ECB, CBC and CTR . . . . . | 837 |
| Table 203. | Processing latency for GCM and CCM (in clock cycles) . . . . . | 837 |
| Table 204. | AES register map and reset values . . . . . | 849 |
| Table 205. | AES versus SAES features . . . . . | 853 |
| Table 206. | SAES internal input/output signals . . . . . | 854 |
| Table 207. | SAES approved symmetric key functions . . . . . | 855 |
| Table 208. | Counter mode initialization vector definition . . . . . | 865 |
| Table 209. | Initialization of IV registers in GCM mode . . . . . | 868 |
| Table 210. | GCM last block definition . . . . . | 868 |
| Table 211. | Initialization of IV registers in CCM mode . . . . . | 874 |
| Table 212. | AES data swapping example . . . . . | 883 |
| Table 213. | Key endianness in SAES_KEYRx registers (128/256-bit keys) . . . . . | 885 |
| Table 214. | IVI bitfield spread over SAES_IVRx registers . . . . . | 887 |
| Table 215. | Effect of low-power modes on SAES . . . . . | 889 |
| Table 216. | SAES interrupt requests . . . . . | 889 |
| Table 217. | Processing latency for ECB, CBC and CTR . . . . . | 890 |
| Table 218. | Processing latency for GCM and CCM (in SAES kernel clock cycles) . . . . . | 891 |
| Table 219. | SAES register map and reset values . . . . . | 905 |
| Table 220. | HASH internal input/output signals . . . . . | 909 |
| Table 221. | Hash processor outputs . . . . . | 912 |
| Table 222. | Processing time (in clock cycle) . . . . . | 918 |
| Table 223. | Effect of low-power modes on HASH . . . . . | 919 |
| Table 224. | HASH interrupt requests . . . . . | 919 |
| Table 225. | HASH register map and reset values . . . . . | 927 |
| Table 226. | Internal input/output signals . . . . . | 930 |
| Table 227. | PKA integer arithmetic functions list . . . . . | 931 |
| Table 228. | PKA prime field (Fp) elliptic curve functions list . . . . . | 932 |
| Table 229. | Example of 'a' curve coefficient for ECC Fp scalar . . . . . | 938 |
| Table 230. | Montgomery parameter computation . . . . . | 938 |
| Table 231. | Modular addition . . . . . | 939 |
| Table 232. | Modular subtraction . . . . . | 939 |
| Table 233. | Montgomery multiplication . . . . . | 940 |
| Table 234. | Modular exponentiation (normal mode) . . . . . | 941 |
| Table 235. | Modular exponentiation (fast mode) . . . . . | 941 |
| Table 236. | Modular exponentiation (protected mode) . . . . . | 942 |
| Table 237. | Modular inversion . . . . . | 942 |
| Table 238. | Modular reduction . . . . . | 943 |
| Table 239. | Arithmetic addition . . . . . | 943 |
| Table 240. | Arithmetic subtraction . . . . . | 943 |
| Table 241. | Arithmetic multiplication . . . . . | 944 |
| Table 242. | Arithmetic comparison . . . . . | 944 |
| Table 243. | CRT exponentiation . . . . . | 945 |
| Table 244. | Point on elliptic curve Fp check . . . . . | 946 |
| Table 245. | ECC Fp scalar multiplication . . . . . | 946 |
| Table 246. | ECDSA sign - Inputs . . . . . | 948 |
| Table 247. | ECDSA sign - Outputs . . . . . | 948 |
| Table 248. | Extended ECDSA sign - additional outputs . . . . . | 949 |
| Table 249. | ECDSA verification - inputs . . . . . | 949 |
| Table 250. | ECDSA verification - outputs . . . . . | 950 |
| Table 251. | ECC complete addition . . . . . | 950 |
| Table 252. | ECC double base ladder . . . . . | 951 |
| Table 253. | ECC projective to affine . . . . . | 952 |
| Table 254. | Family of supported curves for ECC operations . . . . . | 953 |
| Table 255. | Modular exponentiation . . . . . | 954 |
| Table 256. | ECC scalar multiplication . . . . . | 954 |
| Table 257. | ECDSA signature average computation time . . . . . | 955 |
| Table 258. | ECDSA verification average computation times . . . . . | 955 |
| Table 259. | ECC double base ladder average computation times . . . . . | 955 |
| Table 260. | ECC projective to affine average computation times . . . . . | 955 |
| Table 261. | ECC complete addition average computation times . . . . . | 955 |
| Table 262. | Point on elliptic curve Fp check average computation times . . . . . | 955 |
| Table 263. | Montgomery parameters average computation times . . . . . | 956 |
| Table 264. | Effect of low-power modes on PKA . . . . . | 956 |
| Table 265. | PKA interrupt requests . . . . . | 956 |
| Table 266. | PKA register map and reset values . . . . . | 961 |
| Table 267. | TIM input/output pins . . . . . | 965 |
| Table 268. | TIM internal input/output signals . . . . . | 965 |
| Table 269. | Interconnect to the tim_ti1 input multiplexer . . . . . | 967 |
| Table 270. | Interconnect to the tim_ti2 input multiplexer . . . . . | 967 |
| Table 271. | Interconnect to the tim_ti3 input multiplexer . . . . . | 967 |
| Table 272. | Interconnect to the tim_ti4 input multiplexer . . . . . | 967 |
| Table 273. | Internal trigger connection . . . . . | 967 |
| Table 274. | Interconnect to the tim_etr input multiplexer . . . . . | 968 |
| Table 275. | Timer break interconnect . . . . . | 968 |
| Table 276. | Timer break2 interconnect . . . . . | 969 |
| Table 277. | System break interconnect . . . . . | 969 |
| Table 278. | Interconnect to the ocref_clr input multiplexer . . . . . | 969 |
| Table 279. | CCR and ARR register change dithering pattern . . . . . | 1002 |
| Table 280. | CCR register change dithering pattern in center-aligned PWM mode . . . . . | 1003 |
| Table 281. | Behavior of timer outputs versus tim_brk/tim_brk2 inputs . . . . . | 1015 |
| Table 282. | Break protection disarming conditions . . . . . | 1017 |
| Table 283. | Counting direction versus encoder signals (CC1P = CC2P = 0) . . . . . | 1026 |
| Table 284. | Counting direction versus encoder signals and polarity settings . . . . . | 1030 |
| Table 285. | DMA request . . . . . | 1053 |
| Table 286. | Effect of low-power modes on TIM1 . . . . . | 1054 |
| Table 287. | Interrupt requests . . . . . | 1054 |
| Table 288. | Output control bits for complementary tim_ocx and tim_ocxn channels with break feature . . . . . | 1081 |
| Table 289. | TIM1 register map and reset values . . . . . | 1104 |
| Table 290. | General purpose timers . . . . . | 1108 |
| Table 291. | TIM input/output pins . . . . . | 1110 |
| Table 292. | TIM internal input/output signals . . . . . | 1110 |
| Table 293. | Interconnect to the tim_ti1 input multiplexer . . . . . | 1111 |
| Table 294. | Interconnect to the tim_ti2 input multiplexer . . . . . | 1111 |
| Table 295. | Interconnect to the tim_ti3 input multiplexer . . . . . | 1111 |
| Table 296. | Interconnect to the tim_ti4 input multiplexer . . . . . | 1112 |
| Table 297. | TIMx internal trigger connection . . . . . | 1112 |
| Table 298. | Interconnect to the tim_etr input multiplexer . . . . . | 1112 |
| Table 299. | Interconnect to the tim_ocref_clr input multiplexer . . . . . | 1113 |
| Table 300. | CCR and ARR register change dithering pattern . . . . . | 1144 |
| Table 301. | CCR register change dithering pattern in center-aligned PWM mode . . . . . | 1145 |
| Table 302. | Counting direction versus encoder signals(CC1P = CC2P = 0) . . . . . | 1154 |
| Table 303. | Counting direction versus encoder signals and polarity settings . . . . . | 1159 |
| Table 304. | DMA request . . . . . | 1185 |
| Table 305. | Effect of low-power modes on TIM2/TIM3/TIM4 . . . . . | 1185 |
| Table 306. | Interrupt requests . . . . . | 1186 |
| Table 307. | Output control bit for standard tim_ocx channels . . . . . | 1207 |
| Table 308. | TIM2/TIM3/TIM4 register map and reset values . . . . . | 1223 |
| Table 309. | TIM input/output pins . . . . . | 1227 |
| Table 310. | TIM internal input/output signals . . . . . | 1228 |
| Table 311. | Interconnect to the tim_ti1 input multiplexer . . . . . | 1229 |
| Table 312. | Timer break interconnect . . . . . | 1229 |
| Table 313. | System break interconnect . . . . . | 1229 |
| Table 314. | Interconnect to the ocref_clr input multiplexer . . . . . | 1230 |
| Table 315. | CCR and ARR register change dithering pattern . . . . . | 1248 |
| Table 316. | Break protection disarming conditions . . . . . | 1256 |
| Table 317. | DMA request . . . . . | 1263 |
| Table 318. | Effect of low-power modes on TIM16/TIM17 . . . . . | 1263 |
| Table 319. | Interrupt requests . . . . . | 1264 |
| Table 320. | Output control bits for complementary tim_oc1 and tim_oc1n channels with break feature (TIM16/TIM17) . . . . . | 1275 |
| Table 321. | TIM16/TIM17 register map and reset values . . . . . | 1289 |
| Table 322. | LPTIM features . . . . . | 1292 |
| Table 323. | LPTIM1/2 input/output pins . . . . . | 1293 |
| Table 324. | LPTIM1/2 internal signals . . . . . | 1294 |
| Table 325. | LPTIM1/2 external trigger connections . . . . . | 1295 |
| Table 326. | LPTIM1/2 input 1 connections . . . . . | 1295 |
| Table 327. | LPTIM1/2 input 2 connections . . . . . | 1295 |
| Table 328. | LPTIM1/2 input capture 1 connections . . . . . | 1295 |
| Table 329. | LPTIM1/2 input capture 2 connections . . . . . | 1296 |
| Table 330. | Prescaler division ratios . . . . . | 1297 |
| Table 331. | Encoder counting scenarios . . . . . | 1304 |
| Table 332. | Input capture Glitch filter latency (in counter step unit) . . . . . | 1308 |
| Table 333. | Effect of low-power modes on the LPTIM . . . . . | 1313 |
| Table 334. | Interrupt events . . . . . | 1314 |
| Table 335. | LPTIM register map and reset values . . . . . | 1335 |
| Table 336. | IWDG features . . . . . | 1338 |
| Table 337. | IWDG delays versus actions . . . . . | 1339 |
| Table 338. | IWDG internal input/output signals . . . . . | 1340 |
| Table 339. | Effect of low power modes on IWDG . . . . . | 1345 |
| Table 340. | IWDG interrupt request . . . . . | 1347 |
| Table 341. | IWDG register map and reset values . . . . . | 1353 |
| Table 342. | WWDG features . . . . . | 1354 |
| Table 343. | WWDG internal input/output signals . . . . . | 1355 |
| Table 344. | Low-power mode description . . . . . | 1358 |
| Table 345. | WWDG interrupt requests . . . . . | 1358 |
| Table 346. | WWDG register map and reset values . . . . . | 1360 |
| Table 347. | RTC input/output pins . . . . . | 1363 |
| Table 348. | RTC internal input/output signals . . . . . | 1363 |
| Table 349. | RTC interconnection . . . . . | 1364 |
| Table 350. | RTC pin PC13 configuration . . . . . | 1364 |
| Table 351. | RTC_OUT mapping . . . . . | 1366 |
| Table 352. | Effect of low-power modes on RTC . . . . . | 1382 |
| Table 353. | RTC pins functionality over modes . . . . . | 1382 |
| Table 354. | Nonsecure interrupt requests . . . . . | 1383 |
| Table 355. | Secure interrupt requests . . . . . | 1383 |
| Table 356. | RTC register map and reset values . . . . . | 1413 |
| Table 357. | TAMP input/output pins . . . . . | 1417 |
| Table 358. | TAMP internal input/output signals . . . . . | 1417 |
| Table 359. | TAMP interconnection . . . . . | 1418 |
| Table 360. | Device resource x tamper protection . . . . . | 1424 |
| Table 361. | Active tamper output change period . . . . . | 1427 |
| Table 362. | Minimum ATPER value . . . . . | 1428 |
| Table 363. | Active tamper filtered pulse duration . . . . . | 1429 |
| Table 364. | Effect of low-power modes on TAMP . . . . . | 1430 |
| Table 365. | TAMP pins functionality over modes . . . . . | 1431 |
| Table 366. | Interrupt requests . . . . . | 1431 |
| Table 367. | TAMP register map and reset values . . . . . | 1459 |
| Table 368. | I2C implementation . . . . . | 1462 |
| Table 369. | I2C input/output pins . . . . . | 1463 |
| Table 370. | I2C internal input/output signals . . . . . | 1464 |
| Table 371. | I2C1, I2C2, and I2C4 interconnection . . . . . | 1464 |
| Table 372. | I2C3 interconnection . . . . . | 1464 |
| Table 373. | Comparison of analog and digital filters . . . . . | 1467 |
| Table 374. | I 2 C-bus and SMBus specification data setup and hold times . . . . . | 1469 |
| Table 375. | I2C configuration . . . . . | 1473 |
| Table 376. | I 2 C-bus and SMBus specification clock timings . . . . . | 1484 |
| Table 377. | Timing settings for f I2CCLK of 8 MHz . . . . . | 1494 |
| Table 378. | Timing settings for f I2CCLK of 16 MHz . . . . . | 1494 |
| Table 379. | SMBus timeout specifications . . . . . | 1496 |
| Table 380. | SMBus with PEC configuration . . . . . | 1498 |
| Table 381. | TIMEOUTA[11:0] for maximum t TIMEOUT of 25 ms . . . . . | 1499 |
| Table 382. | TIMEOUTB[11:0] for maximum t LOW:SEXT and t LOW:MEXT of 8 ms . . . . . | 1499 |
| Table 383. | TIMEOUTA[11:0] for maximum t IDLE of 50 µs . . . . . | 1499 |
| Table 384. | Effect of low-power modes to I2C . . . . . | 1509 |
| Table 385. | I2C interrupt requests . . . . . | 1510 |
| Table 386. | I2C register map and reset values . . . . . | 1527 |
| Table 387. | Instance implementation on STM32WBA6xxx . . . . . | 1530 |
| Table 388. | USART/LPUART features . . . . . | 1530 |
| Table 389. | USART/UART input/output pins . . . . . | 1533 |
| Table 390. | USART internal input/output signals . . . . . | 1534 |
| Table 391. | USART interconnection (USART1/2) . . . . . | 1534 |
| Table 392. | Noise detection from sampled data . . . . . | 1546 |
| Table 393. | Tolerance of the USART receiver when BRR [3:0] = 0000 . . . . . | 1550 |
| Table 394. | Tolerance of the USART receiver when BRR[3:0] is different from 0000 . . . . . | 1550 |
| Table 395. | USART frame formats . . . . . | 1555 |
| Table 396. | Effect of low-power modes on the USART . . . . . | 1576 |
| Table 397. | USART interrupt requests . . . . . | 1577 |
| Table 398. | USART register map and reset values . . . . . | 1616 |
| Table 399. | Instance implementation on STM32WBA6xxx . . . . . | 1619 |
| Table 400. | USART/LPUART features . . . . . | 1619 |
| Table 401. | LPUART input/output pins . . . . . | 1622 |
| Table 402. | LPUART internal input/output signals . . . . . | 1622 |
| Table 403. | LPUART interconnections (LPUART1) . . . . . | 1623 |
| Table 404. | Error calculation for programmed baud rates at lpuart_ker_ck_pres= 32.768 kHz . . . . . | 1634 |
| Table 405. | Tolerance of the LPUART receiver . . . . . | 1635 |
| Table 407. | Effect of low-power modes on the LPUART . . . . . | 1646 |
| Table 408. | LPUART interrupt requests . . . . . | 1647 |
| Table 409. | LPUART register map and reset values . . . . . | 1672 |
| Table 410. | SPI features . . . . . | 1676 |
| Table 411. | SPI input/output pins. . . . . | 1678 |
| Table 412. | SPI internal input/output signals . . . . . | 1679 |
| Table 413. | SPI interconnection (SPI1 and SPI2) . . . . . | 1679 |
| Table 414. | SPI interconnection (SPI3) . . . . . | 1680 |
| Table 415. | Effect of low-power modes on the SPI . . . . . | 1708 |
| Table 416. | SPI wake-up and interrupt requests . . . . . | 1710 |
| Table 417. | SPI register map and reset values . . . . . | 1727 |
| Table 418. | SAI features . . . . . | 1729 |
| Table 419. | SAI internal input/output signals . . . . . | 1731 |
| Table 420. | SAI input/output pins. . . . . | 1731 |
| Table 421. | MCLK_x activation conditions. . . . . | 1739 |
| Table 422. | Clock generator programming examples . . . . . | 1742 |
| Table 423. | SAI_A configuration for TDM mode . . . . . | 1749 |
| Table 424. | TDM frame configuration examples . . . . . | 1751 |
| Table 425. | SOPD pattern . . . . . | 1754 |
| Table 426. | Parity bit calculation . . . . . | 1754 |
| Table 427. | Audio sampling frequency versus symbol rates . . . . . | 1755 |
| Table 428. | Effect of low-power modes on SAI . . . . . | 1764 |
| Table 429. | SAI interrupt sources . . . . . | 1765 |
| Table 430. | SAI register map and reset values . . . . . | 1792 |
| Table 431. | OTG speeds supported . . . . . | 1795 |
| Table 432. | OTG implementation. . . . . | 1796 |
| Table 433. | OTG input/output pins. . . . . | 1797 |
| Table 434. | OTG input/output signals . . . . . | 1798 |
| Table 435. | Compatibility of STM32 low power modes with the OTG . . . . . | 1809 |
| Table 436. | Core global control and status registers (CSRs). . . . . | 1817 |
| Table 437. | Host-mode control and status registers (CSRs) . . . . . | 1818 |
| Table 438. | Device-mode control and status registers . . . . . | 1819 |
| Table 439. | Data FIFO (DFIFO) access register map . . . . . | 1821 |
| Table 440. | Power and clock gating control and status registers . . . . . | 1822 |
| Table 441. | TRDT values. . . . . | 1828 |
| Table 442. | Minimum duration for soft disconnect. . . . . | 1871 |
| Table 443. | OTG register map and reset values . . . . . | 1897 |
| Table 444. | JTAG/Serial-wire debug port pins. . . . . | 1963 |
| Table 445. | Single-wire trace port pins . . . . . | 1963 |
| Table 446. | Debug features control . . . . . | 1965 |
| Table 447. | JTAG-DP data registers . . . . . | 1968 |
| Table 448. | Packet request . . . . . | 1970 |
| Table 449. | ACK response. . . . . | 1970 |
| Table 450. | Data transfer. . . . . | 1970 |
| Table 451. | DP register map and reset values . . . . . | 1977 |
| Table 452. | AP register map and reset values. . . . . | 1984 |
| Table 453. | System debug ROM table. . . . . | 1985 |
| Table 454. | System debug ROM register map and reset values . . . . . | 1991 |
| Table 455. | MCU ROM table . . . . . | 1992 |
| Table 456. | Processor ROM table . . . . . | 1993 |
| Table 457. | ROM table register map and reset values . . . . . | 2000 |
| Table 458. | DWT register map and reset values . . . . . | 2016 |
| Table 459. | ITM register map and reset values . . . . . | 2027 |
| Table 460. | BPU register map and reset values . . . . . | 2035 |
| Table 461. | ETM register map and reset values . . . . . | 2059 |
| Table 462. | TPIU register map and reset values . . . . . | 2073 |
| Table 463. | CTI inputs . . . . . | 2075 |
| Table 464. | CTI outputs . . . . . | 2075 |
| Table 465. | CTI register map and reset values . . . . . | 2086 |
| Table 466. | Low-power debug overview . . . . . | 2089 |
| Table 467. | Low-power mode status flags . . . . . | 2090 |
| Table 468. | Peripheral clock freeze control . . . . . | 2090 |
| Table 469. | Access to peripheral clock freeze control . . . . . | 2091 |
| Table 470. | DBGMCU register map and reset values . . . . . | 2103 |
| Table 471. | DESIG register map and reset values . . . . . | 2112 |
| Table 472. | Document revision history . . . . . | 2114 |
List of figures
| Figure 1. | System architecture . . . . . | 81 |
| Figure 2. | Memory map . . . . . | 88 |
| Figure 3. | Secure/nonsecure partitioning using TrustZone technology . . . . . | 97 |
| Figure 4. | Sharing memory map between CPU in secure and nonsecure state . . . . . | 98 |
| Figure 5. | Secure world transition and memory partitioning . . . . . | 99 |
| Figure 6. | Global TrustZone framework and TrustZone awareness . . . . . | 100 |
| Figure 7. | Flash memory TrustZone protections . . . . . | 103 |
| Figure 8. | Flash memory secure HDP area . . . . . | 110 |
| Figure 9. | Key management principle . . . . . | 118 |
| Figure 10. | Device life-cycle security . . . . . | 121 |
| Figure 11. | RDP level transition scheme . . . . . | 123 |
| Figure 12. | Collaborative development principle . . . . . | 126 |
| Figure 13. | GTZC block diagram . . . . . | 132 |
| Figure 14. | GTZC block diagram . . . . . | 134 |
| Figure 15. | MPCBB block diagram . . . . . | 135 |
| Figure 16. | Flash memory security attributes and protections in case of no bank swap (SWAP_BANK = 0) . . . . . | 214 |
| Figure 17. | Flash memory security attributes and protections in case of bank swap (SWAP_BANK = 1) . . . . . | 214 |
| Figure 18. | RDP level transition scheme when TrustZone is disabled (TZEN = 0) . . . . . | 221 |
| Figure 19. | RDP level transition scheme when TrustZone is enabled (TZEN = 1) . . . . . | 222 |
| Figure 20. | ICACHE block diagram . . . . . | 265 |
| Figure 21. | ICACHE TAG and data memories functional view . . . . . | 267 |
| Figure 22. | ICACHE remapping address mechanism . . . . . | 270 |
| Figure 23. | Radio system block diagram . . . . . | 281 |
| Figure 24. | Transmit path and output power control . . . . . | 282 |
| Figure 25. | Bluetooth AoA/AoD antennas control . . . . . | 283 |
| Figure 26. | PTACONV block diagram . . . . . | 286 |
| Figure 27. | 4-wire PTA grant protocol . . . . . | 288 |
| Figure 28. | 4-wire PTA deny protocol . . . . . | 289 |
| Figure 29. | 3-wire time-multiplexed PTA_STATUS . . . . . | 290 |
| Figure 30. | Power supply overview . . . . . | 299 |
| Figure 31. | Application power supply schemes . . . . . | 302 |
| Figure 32. | Brownout reset waveform . . . . . | 309 |
| Figure 33. | PVD thresholds . . . . . | 310 |
| Figure 34. | Operating modes . . . . . | 313 |
| Figure 35. | Simplified diagram of the reset circuit . . . . . | 368 |
| Figure 36. | Clock tree . . . . . | 371 |
| Figure 37. | HSE 32 clock sources . . . . . | 373 |
| Figure 38. | LSE 32 clock sources . . . . . | 376 |
| Figure 39. | Radio control . . . . . | 383 |
| Figure 40. | Audio synchronization counter block diagram . . . . . | 387 |
| Figure 41. | Audio synchronization timing example . . . . . | 387 |
| Figure 42. | HSEM block diagram . . . . . | 477 |
| Figure 43. | Procedure state diagram . . . . . | 478 |
| Figure 44. | Interrupt state diagram . . . . . | 481 |
| Figure 45. | Structure of 3 V- or 5 V-tolerant GPIO (TT or FT) . . . . . | 499 |
| Figure 46. | Input floating / pull-up / pull-down configurations . . . . . | 503 |
| Figure 47. | Output configuration . . . . . | 504 |
| Figure 48. | Alternate function configuration . . . . . | 505 |
| Figure 49. | High-impedance analog configuration . . . . . | 505 |
| Figure 50. | I/O compensation cell block diagram . . . . . | 569 |
| Figure 51. | GPDMA block diagram . . . . . | 602 |
| Figure 52. | GPDMA channel direct programming without linked-list (GPDMA_CxLLR = 0) . . . . . | 603 |
| Figure 53. | GPDMA channel suspend and resume sequence . . . . . | 604 |
| Figure 54. | GPDMA channel abort and restart sequence . . . . . | 605 |
| Figure 55. | Static linked-list data structure (all Uxx = 1) of a linear addressing channel x . . . . . | 607 |
| Figure 56. | GPDMA dynamic linked-list data structure of a linear addressing channel x . . . . . | 607 |
| Figure 57. | GPDMA channel execution and linked-list programming in run-to-completion mode (GPDMA_CxCR.LSM = 0) . . . . . | 610 |
| Figure 58. | Inserting a LLI n with an auxiliary GPDMA channel y . . . . . | 612 |
| Figure 59. | GPDMA channel execution and linked-list programming in link step mode (GPDMA_CxCR.LSM = 1) . . . . . | 614 |
| Figure 60. | Building LLI n+1 : GPDMA dynamic linked-lists in link step mode . . . . . | 615 |
| Figure 61. | Replace with a new LLI n in register file in link step mode . . . . . | 616 |
| Figure 62. | Replace with a new LLI n and LLI n+1 in memory in link step mode (option 1) . . . . . | 617 |
| Figure 63. | Replace with a new LLI n and LLI n+1 in memory in link step mode (option 2) . . . . . | 618 |
| Figure 64. | GPDMA channel execution and linked-list programming . . . . . | 620 |
| Figure 65. | GPDMA arbitration policy . . . . . | 628 |
| Figure 66. | Trigger hit, memorization, and overrun waveform . . . . . | 631 |
| Figure 67. | GPDMA circular buffer programming: update of the memory start address with a linear addressing channel . . . . . | 632 |
| Figure 68. | Shared GPDMA channel with circular buffering: update of the memory start address with a linear addressing channel . . . . . | 633 |
| Figure 69. | EXTI block diagram . . . . . | 666 |
| Figure 70. | Configurable event trigger logic CPU wake-up . . . . . | 668 |
| Figure 71. | EXTI mux GPIO selection . . . . . | 669 |
| Figure 72. | CRC calculation unit block diagram . . . . . | 688 |
| Figure 73. | ADC block diagram . . . . . | 697 |
| Figure 74. | ADC calibration . . . . . | 700 |
| Figure 75. | Calibration factor forcing . . . . . | 701 |
| Figure 76. | Enabling/disabling the ADC . . . . . | 702 |
| Figure 77. | ADC clock scheme . . . . . | 703 |
| Figure 78. | ADC4 connectivity . . . . . | 704 |
| Figure 79. | Analog-to-digital conversion time . . . . . | 709 |
| Figure 80. | ADC conversion timings . . . . . | 709 |
| Figure 81. | Stopping an ongoing conversion . . . . . | 710 |
| Figure 82. | Single conversions of a sequence, software trigger . . . . . | 713 |
| Figure 83. | Continuous conversion of a sequence, software trigger . . . . . | 714 |
| Figure 84. | Single conversions of a sequence, hardware trigger . . . . . | 714 |
| Figure 85. | Continuous conversions of a sequence, hardware trigger . . . . . | 715 |
| Figure 86. | Data alignment and resolution (oversampling disabled: OVSE = 0) . . . . . | 716 |
| Figure 87. | Example of overrun (OVR) . . . . . | 717 |
| Figure 88. | Wait conversion mode (continuous mode, software trigger) . . . . . | 719 |
| Figure 89. | Auto-off mode state diagram . . . . . | 721 |
| Figure 90. | ADC behavior with WAIT = 0 and AUTOFF = 1 . . . . . | 721 |
| Figure 91. | ADC behavior with WAIT = 1 and AUTOFF = 1 . . . . . | 722 |
| Figure 92. | Autonomous mode state diagram . . . . . | 723 |
| Figure 93. | Analog watchdog guarded area . . . . . | 724 |
| Figure 94. | ADC_AWDx_OUT signal generation . . . . . | 725 |
| Figure 95. | ADC_AWDx_OUT signal generation (AWDx flag not cleared by software) . . . . . | 726 |
| Figure 96. | ADC_AWDx_OUT signal generation (on a single channel) . . . . . | 726 |
| Figure 97. | Analog watchdog threshold update . . . . . | 727 |
| Figure 98. | 20-bit to 16-bit result truncation . . . . . | 727 |
| Figure 99. | Numerical example with 5-bits shift and rounding . . . . . | 728 |
| Figure 100. | Triggered oversampling mode (TOVS bit = 1) . . . . . | 730 |
| Figure 101. | Temperature sensor and VREFINT channel block diagram . . . . . | 731 |
| Figure 102. | VREFBUF block diagram . . . . . | 757 |
| Figure 103. | Comparator block diagrams . . . . . | 763 |
| Figure 104. | Window mode . . . . . | 766 |
| Figure 105. | Comparator hysteresis . . . . . | 766 |
| Figure 106. | Comparator output blanking . . . . . | 767 |
| Figure 107. | Scaler . . . . . | 768 |
| Figure 108. | TSC block diagram . . . . . | 774 |
| Figure 109. | Surface charge transfer analog I/O group structure . . . . . | 775 |
| Figure 110. | Sampling capacitor voltage variation . . . . . | 776 |
| Figure 111. | Charge transfer acquisition sequence . . . . . | 777 |
| Figure 112. | Spread spectrum variation principle . . . . . | 778 |
| Figure 113. | RNG block diagram . . . . . | 791 |
| Figure 114. | NIST SP800-90B entropy source model . . . . . | 792 |
| Figure 115. | RNG initialization overview . . . . . | 795 |
| Figure 116. | AES block diagram . . . . . | 808 |
| Figure 117. | Encryption/ decryption typical usage . . . . . | 810 |
| Figure 118. | Typical operation with authentication . . . . . | 812 |
| Figure 119. | Example of suspend mode management . . . . . | 813 |
| Figure 120. | ECB encryption . . . . . | 814 |
| Figure 121. | ECB decryption . . . . . | 814 |
| Figure 122. | CBC encryption . . . . . | 815 |
| Figure 123. | CBC decryption . . . . . | 815 |
| Figure 124. | Message construction in CTR mode . . . . . | 818 |
| Figure 125. | CTR encryption . . . . . | 818 |
| Figure 126. | Message construction in GCM . . . . . | 820 |
| Figure 127. | GCM authenticated encryption . . . . . | 821 |
| Figure 128. | Message construction in GMAC mode . . . . . | 824 |
| Figure 129. | GMAC authentication mode . . . . . | 825 |
| Figure 130. | Message construction in CCM mode . . . . . | 826 |
| Figure 131. | CCM mode authenticated encryption . . . . . | 827 |
| Figure 132. | 128-bit block construction according to the data type . . . . . | 832 |
| Figure 133. | SAES block diagram . . . . . | 854 |
| Figure 134. | Encryption/ decryption typical usage . . . . . | 856 |
| Figure 135. | Typical operation with authentication . . . . . | 858 |
| Figure 136. | Example of suspend mode management . . . . . | 859 |
| Figure 137. | ECB encryption . . . . . | 860 |
| Figure 138. | ECB decryption . . . . . | 860 |
| Figure 139. | CBC encryption . . . . . | 861 |
| Figure 140. | CBC decryption . . . . . | 861 |
| Figure 141. | Message construction in CTR mode . . . . . | 864 |
| Figure 142. | CTR encryption . . . . . | 865 |
| Figure 143. | Message construction in GCM . . . . . | 866 |
| Figure 144. | GCM authenticated encryption . . . . . | 868 |
| Figure 145. Message construction in GMAC mode . . . . . | 871 |
| Figure 146. GMAC authentication mode . . . . . | 871 |
| Figure 147. Message construction in CCM mode . . . . . | 872 |
| Figure 148. CCM mode authenticated encryption . . . . . | 874 |
| Figure 149. Operation with wrapped keys for SAES in ECB and CBC modes . . . . . | 877 |
| Figure 150. Operation with wrapped keys for SAES in CTR mode . . . . . | 880 |
| Figure 151. Usage of Shared-key mode . . . . . | 881 |
| Figure 152. 128-bit block construction according to the data type. . . . . | 884 |
| Figure 153. Key protection mechanisms . . . . . | 886 |
| Figure 154. HASH block diagram . . . . . | 908 |
| Figure 155. Message data swapping feature. . . . . | 910 |
| Figure 156. HASH suspend/resume mechanism. . . . . | 916 |
| Figure 157. PKA block diagram . . . . . | 930 |
| Figure 158. Advanced-control timer block diagram . . . . . | 964 |
| Figure 159. Counter timing diagram with prescaler division change from 1 to 2 . . . . . | 970 |
| Figure 160. Counter timing diagram with prescaler division change from 1 to 4 . . . . . | 971 |
| Figure 161. Counter timing diagram, internal clock divided by 1 . . . . . | 972 |
| Figure 162. Counter timing diagram, internal clock divided by 2 . . . . . | 973 |
| Figure 163. Counter timing diagram, internal clock divided by 4 . . . . . | 973 |
| Figure 164. Counter timing diagram, internal clock divided by N. . . . . | 974 |
| Figure 165. Counter timing diagram, update event when ARPE = 0 (TIMx_ARR not preloaded). . . . . | 974 |
| Figure 166. Counter timing diagram, update event when ARPE = 1 (TIMx_ARR preloaded). . . . . | 975 |
| Figure 167. Counter timing diagram, internal clock divided by 1 . . . . . | 976 |
| Figure 168. Counter timing diagram, internal clock divided by 2 . . . . . | 977 |
| Figure 169. Counter timing diagram, internal clock divided by 4 . . . . . | 977 |
| Figure 170. Counter timing diagram, internal clock divided by N. . . . . | 978 |
| Figure 171. Counter timing diagram, update event when repetition counter is not used. . . . . | 978 |
| Figure 172. Counter timing diagram, internal clock divided by 1, TIMx_ARR = 0x6 . . . . . | 980 |
| Figure 173. Counter timing diagram, internal clock divided by 2 . . . . . | 980 |
| Figure 174. Counter timing diagram, internal clock divided by 4, TIMx_ARR = 0x36 . . . . . | 981 |
| Figure 175. Counter timing diagram, internal clock divided by N. . . . . | 981 |
| Figure 176. Counter timing diagram, update event with ARPE = 1 (counter underflow) . . . . . | 982 |
| Figure 177. Counter timing diagram, Update event with ARPE = 1 (counter overflow) . . . . . | 983 |
| Figure 178. Update rate examples depending on mode and TIMx_RCR register settings . . . . . | 984 |
| Figure 180. Control circuit in normal mode, internal clock divided by 1 . . . . . | 986 |
| Figure 181. tim_ti2 external clock connection example . . . . . | 986 |
| Figure 182. Control circuit in external clock mode 1 . . . . . | 987 |
| Figure 183. External trigger input block . . . . . | 988 |
| Figure 184. Control circuit in external clock mode 2 . . . . . | 989 |
| Figure 185. Capture/compare channel (example: channel 1 input stage). . . . . | 989 |
| Figure 186. Capture/compare channel 1 main circuit . . . . . | 990 |
| Figure 187. Output stage of capture/compare channel (channel 1, idem ch. 2, 3 and 4) . . . . . | 991 |
| Figure 188. Output stage of capture/compare channel (channel 5, idem ch. 6) . . . . . | 991 |
| Figure 189. PWM input mode timing . . . . . | 994 |
| Figure 190. Output compare mode, toggle on tim_oc1 . . . . . | 996 |
| Figure 191. Edge-aligned PWM waveforms (ARR = 8) . . . . . | 997 |
| Figure 192. Center-aligned PWM waveforms (ARR = 8). . . . . | 998 |
| Figure 193. Dithering principle . . . . . | 999 |
| Figure 194. Data format and register coding in dithering mode. . . . . | 1000 |
| Figure 195. PWM resolution vs frequency . . . . . | 1001 |
| Figure 196. PWM dithering pattern . . . . . | 1002 |
| Figure 197. Dithering effect on duty cycle in center-aligned PWM mode . . . . . | 1003 |
| Figure 198. Generation of 2 phase-shifted PWM signals with 50% duty cycle . . . . . | 1005 |
| Figure 199. Combined PWM mode on channel 1 and 3 . . . . . | 1006 |
| Figure 200. 3-phase combined PWM signals with multiple trigger pulses per period . . . . . | 1007 |
| Figure 201. Complementary output with symmetrical dead-time insertion . . . . . | 1008 |
| Figure 202. Asymmetrical deadtime . . . . . | 1009 |
| Figure 203. Dead-time waveforms with delay greater than the negative pulse . . . . . | 1009 |
| Figure 204. Dead-time waveforms with delay greater than the positive pulse. . . . . | 1009 |
| Figure 205. Break and Break2 circuitry overview . . . . . | 1012 |
| Figure 206. Various output behavior in response to a break event on tim_brk (OSSI = 1) . . . . . | 1014 |
| Figure 207. PWM output state following tim_brk and tim_brk2 assertion (OSSI = 1) . . . . . | 1015 |
| Figure 208. PWM output state following tim_brk assertion (OSSI = 0) . . . . . | 1016 |
| Figure 209. Output redirection (tim_brk2 request not represented). . . . . | 1017 |
| Figure 210. tim_ocref_clr input selection multiplexer. . . . . | 1018 |
| Figure 211. Clearing TIMx tim_ocxref . . . . . | 1019 |
| Figure 212. 6-step generation, COM example (OSSR = 1) . . . . . | 1020 |
| Figure 213. Example of one pulse mode. . . . . | 1021 |
| Figure 214. Retriggerable one-pulse mode . . . . . | 1022 |
| Figure 215. Pulse generator circuitry. . . . . | 1023 |
| Figure 216. Pulse generation on compare event, for edge-aligned and encoder modes . . . . . | 1024 |
| Figure 217. Extended pulsewidth in case of concurrent triggers . . . . . | 1025 |
| Figure 218. Example of counter operation in encoder interface mode. . . . . | 1027 |
| Figure 219. Example of encoder interface mode with tim_ti1fp1 polarity inverted. . . . . | 1027 |
| Figure 220. Quadrature encoder counting modes . . . . . | 1028 |
| Figure 221. Direction plus clock encoder mode. . . . . | 1029 |
| Figure 222. Directional clock encoder mode (CC1P = CC2P = 0). . . . . | 1029 |
| Figure 223. Directional clock encoder mode (CC1P = CC2P = 1). . . . . | 1030 |
| Figure 224. Index gating options . . . . . | 1031 |
| Figure 225. Jittered Index signals . . . . . | 1031 |
| Figure 226. Index generation for IPOS[1:0] = 11 . . . . . | 1032 |
| Figure 227. Counter reading with index gated on channel A (IPOS[1:0] = 11) . . . . . | 1032 |
| Figure 228. Counter reading with index ungated (IPOS[1:0] = 00) . . . . . | 1033 |
| Figure 229. Counter reading with index gated on channel A and B. . . . . | 1033 |
| Figure 230. Encoder mode behavior in case of narrow index pulse (IPOS[1:0] = 11). . . . . | 1034 |
| Figure 231. Counter reset Narrow index pulse (closer view, ARR = 0x07) . . . . . | 1035 |
| Figure 232. Index behavior in x1 and x2 mode (IPOS[1:0] = 01). . . . . | 1036 |
| Figure 233. Directional index sensitivity. . . . . | 1036 |
| Figure 234. Counter reset as function of FIDX bit setting . . . . . | 1037 |
| Figure 235. Index blanking. . . . . | 1037 |
| Figure 236. Index behavior in clock + direction mode, IPOS[0] = 1. . . . . | 1038 |
| Figure 237. Index behavior in directional clock mode, IPOS[0] = 1 . . . . . | 1038 |
| Figure 238. State diagram for quadrature encoded signals. . . . . | 1039 |
| Figure 239. Up-counting encoder error detection . . . . . | 1040 |
| Figure 240. Down-counting encode error detection. . . . . | 1041 |
| Figure 241. Encoder mode change with preload transferred on update (SMSPS = 0) . . . . . | 1042 |
| Figure 242. Clock drift measure using directional clock mode. . . . . | 1043 |
| Figure 243. Measuring time interval between edges on three signals. . . . . | 1044 |
| Figure 244. Example of Hall sensor interface . . . . . | 1046 |
| Figure 245. Control circuit in reset mode . . . . . | 1047 |
| Figure 246. Control circuit in Gated mode . . . . . | 1048 |
| Figure 247. Control circuit in trigger mode . . . . . | 1049 |
| Figure 248. Control circuit in external clock mode 2 + trigger mode . . . . . | 1050 |
| Figure 249. General-purpose timer block diagram . . . . . | 1109 |
| Figure 250. Counter timing diagram with prescaler division change from 1 to 2 . . . . . | 1114 |
| Figure 251. Counter timing diagram with prescaler division change from 1 to 4 . . . . . | 1115 |
| Figure 252. Counter timing diagram, internal clock divided by 1 . . . . . | 1116 |
| Figure 253. Counter timing diagram, internal clock divided by 2 . . . . . | 1116 |
| Figure 254. Counter timing diagram, internal clock divided by 4 . . . . . | 1117 |
| Figure 255. Counter timing diagram, internal clock divided by N . . . . . | 1117 |
| Figure 256. Counter timing diagram, Update event when ARPE = 0 (TIMx_ARR not preloaded). . . . . | 1118 |
| Figure 257. Counter timing diagram, Update event when ARPE = 1 (TIMx_ARR preloaded). . . . . | 1119 |
| Figure 258. Counter timing diagram, internal clock divided by 1 . . . . . | 1120 |
| Figure 259. Counter timing diagram, internal clock divided by 2 . . . . . | 1121 |
| Figure 260. Counter timing diagram, internal clock divided by 4 . . . . . | 1121 |
| Figure 261. Counter timing diagram, internal clock divided by N . . . . . | 1122 |
| Figure 262. Counter timing diagram, Update event . . . . . | 1122 |
| Figure 263. Counter timing diagram, internal clock divided by 1, TIMx_ARR = 0x6 . . . . . | 1124 |
| Figure 264. Counter timing diagram, internal clock divided by 2 . . . . . | 1124 |
| Figure 265. Counter timing diagram, internal clock divided by 4, TIMx_ARR = 0x36 . . . . . | 1125 |
| Figure 266. Counter timing diagram, internal clock divided by N . . . . . | 1125 |
| Figure 267. Counter timing diagram, Update event with ARPE = 1 (counter underflow). . . . . | 1126 |
| Figure 268. Counter timing diagram, Update event with ARPE = 1 (counter overflow). . . . . | 1127 |
| Figure 269. Control circuit in normal mode, internal clock divided by 1 . . . . . | 1128 |
| Figure 270. tim_ti2 external clock connection example . . . . . | 1128 |
| Figure 271. Control circuit in external clock mode 1 . . . . . | 1129 |
| Figure 272. External trigger input block . . . . . | 1130 |
| Figure 273. Control circuit in external clock mode 2 . . . . . | 1131 |
| Figure 274. Capture/compare channel (example: channel 1 input stage). . . . . | 1131 |
| Figure 275. Capture/compare channel 1 main circuit . . . . . | 1132 |
| Figure 276. Output stage of capture/compare channel (channel 1, idem ch.2, 3 and 4). . . . . | 1132 |
| Figure 277. PWM input mode timing . . . . . | 1135 |
| Figure 278. Output compare mode, toggle on tim_oc1 . . . . . | 1137 |
| Figure 279. Edge-aligned PWM waveforms (ARR = 8). . . . . | 1138 |
| Figure 280. Center-aligned PWM waveforms (ARR = 8). . . . . | 1139 |
| Figure 281. Dithering principle . . . . . | 1140 |
| Figure 282. Data format and register coding in dithering mode . . . . . | 1141 |
| Figure 283. PWM resolution vs frequency (16-bit mode). . . . . | 1142 |
| Figure 284. PWM resolution vs frequency (32-bit mode). . . . . | 1142 |
| Figure 285. PWM dithering pattern . . . . . | 1143 |
| Figure 286. Dithering effect on duty cycle in center-aligned PWM mode . . . . . | 1144 |
| Figure 287. Generation of two phase-shifted PWM signals with 50% duty cycle . . . . . | 1146 |
| Figure 288. Combined PWM mode on channels 1 and 3 . . . . . | 1147 |
| Figure 289. OCREF_CLR input selection multiplexer . . . . . | 1148 |
| Figure 290. Clearing TIMx tim_ocxref . . . . . | 1148 |
| Figure 291. Example of One-pulse mode . . . . . | 1149 |
| Figure 292. Retriggerable one-pulse mode . . . . . | 1151 |
| Figure 293. Pulse generator circuitry . . . . . | 1152 |
| Figure 294. Pulse generation on compare event, for edge-aligned and encoder modes . . . . . | 1152 |
| Figure 295. Extended pulse width in case of concurrent triggers . . . . . | 1153 |
| Figure 296. Example of counter operation in encoder interface mode . . . . . | 1155 |
| Figure 297. Example of encoder interface mode with tim_ti1fp1 polarity inverted . . . . . | 1155 |
| Figure 298. Quadrature encoder counting modes . . . . . | 1156 |
| Figure 299. Direction plus clock encoder mode . . . . . | 1157 |
| Figure 300. Directional clock encoder mode (CC1P = CC2P = 0) . . . . . | 1158 |
| Figure 301. Directional clock encoder mode (CC1P = CC2P = 1) . . . . . | 1158 |
| Figure 302. Index gating options . . . . . | 1160 |
| Figure 303. Jittered Index signals . . . . . | 1160 |
| Figure 304. Index generation for IPOS[1:0] = 11 . . . . . | 1161 |
| Figure 305. Counter reading with index gated on channel A (IPOS[1:0] = 11) . . . . . | 1161 |
| Figure 306. Counter reading with index ungated (IPOS[1:0] = 00) . . . . . | 1162 |
| Figure 307. Counter reading with index gated on channel A and B. . . . . | 1162 |
| Figure 308. Encoder mode behavior in case of narrow index pulse (IPOS[1:0] = 11) . . . . . | 1163 |
| Figure 309. Counter reset Narrow index pulse (closer view, ARR = 0x07) . . . . . | 1164 |
| Figure 310. Index behavior in x1 and x2 mode (IPOS[1:0] = 01) . . . . . | 1165 |
| Figure 311. Directional index sensitivity . . . . . | 1165 |
| Figure 312. Counter reset as function of FIDX bit setting . . . . . | 1166 |
| Figure 313. Index blanking . . . . . | 1166 |
| Figure 314. Index behavior in clock + direction mode, IPOS[0] = 1 . . . . . | 1167 |
| Figure 315. Index behavior in directional clock mode, IPOS[0] = 1 . . . . . | 1167 |
| Figure 316. State diagram for quadrature encoded signals . . . . . | 1168 |
| Figure 317. Up-counting encoder error detection . . . . . | 1169 |
| Figure 318. Down-counting encode error detection . . . . . | 1170 |
| Figure 319. Encoder mode change with preload transferred on update (SMSPS = 0) . . . . . | 1171 |
| Figure 320. Clock drift measure using directional clock mode . . . . . | 1172 |
| Figure 321. Control circuit in reset mode . . . . . | 1174 |
| Figure 322. Control circuit in gated mode . . . . . | 1175 |
| Figure 323. Control circuit in trigger mode . . . . . | 1175 |
| Figure 324. Control circuit in external clock mode 2 + trigger mode . . . . . | 1177 |
| Figure 325. Master/Slave timer example . . . . . | 1177 |
| Figure 326. Master/slave connection example with 1 channel only timers . . . . . | 1178 |
| Figure 327. Gating TIM_slv with tim_oc1ref of TIM_mstr . . . . . | 1179 |
| Figure 328. Gating TIM_slv with Enable of TIM_mstr . . . . . | 1180 |
| Figure 329. Triggering TIM_slv with update of TIM_mstr . . . . . | 1181 |
| Figure 330. Triggering TIM_slv with Enable of TIM_mstr . . . . . | 1181 |
| Figure 331. Triggering TIM_mstr and TIM_slv with TIM_mstr tim_ti1 input . . . . . | 1182 |
| Figure 332. TIM16/TIM17 block diagram . . . . . | 1227 |
| Figure 333. Counter timing diagram with prescaler division change from 1 to 2 . . . . . | 1231 |
| Figure 334. Counter timing diagram with prescaler division change from 1 to 4 . . . . . | 1231 |
| Figure 335. Counter timing diagram, internal clock divided by 1 . . . . . | 1233 |
| Figure 336. Counter timing diagram, internal clock divided by 2 . . . . . | 1233 |
| Figure 337. Counter timing diagram, internal clock divided by 4 . . . . . | 1234 |
| Figure 338. Counter timing diagram, internal clock divided by N . . . . . | 1234 |
| Figure 339. Counter timing diagram, update event when ARPE = 0 (TIMx_ARR not preloaded) . . . . . | 1235 |
| Figure 340. Counter timing diagram, update event when ARPE = 1 (TIMx_ARR preloaded) . . . . . | 1236 |
| Figure 341. Update rate examples depending on mode and TIMx_RCR register settings . . . . . | 1237 |
| Figure 342. Control circuit in normal mode, internal clock divided by 1 . . . . . | 1238 |
| Figure 343. tim_ti2 external clock connection example . . . . . | 1238 |
| Figure 344. Control circuit in external clock mode 1 . . . . . | 1239 |
| Figure 345. Capture/compare channel (example: channel 1 input stage) . . . . . | 1240 |
| Figure 346. Capture/compare channel 1 main circuit . . . . . | 1240 |
| Figure 347. Output stage of capture/compare channel (channel 1) . . . . . | 1241 |
| Figure 348. Output compare mode, toggle on tim_oc1 . . . . . | 1244 |
| Figure 349. Edge-aligned PWM waveforms (ARR = 8) . . . . . | 1245 |
| Figure 350. Dithering principle . . . . . | 1246 |
| Figure 351. Data format and register coding in dithering mode . . . . . | 1246 |
| Figure 352. PWM resolution vs frequency . . . . . | 1247 |
| Figure 353. PWM dithering pattern . . . . . | 1248 |
| Figure 354. Complementary output with symmetrical dead-time insertion. . . . . | 1250 |
| Figure 355. Asymmetrical deadtime . . . . . | 1250 |
| Figure 356. Dead-time waveforms with delay greater than the negative pulse. . . . . | 1251 |
| Figure 357. Dead-time waveforms with delay greater than the positive pulse. . . . . | 1251 |
| Figure 358. Break circuitry overview . . . . . | 1253 |
| Figure 359. Output behavior in response to a break event on tim_brk . . . . . | 1255 |
| Figure 360. Output redirection . . . . . | 1257 |
| Figure 361. tim_ocref_clr input selection multiplexer. . . . . | 1258 |
| Figure 362. 6-step generation, COM example (OSSR = 1) . . . . . | 1259 |
| Figure 363. Example of one pulse mode. . . . . | 1260 |
| Figure 364. LPTIM block diagram (1) . . . . . | 1293 |
| Figure 365. Glitch filter timing diagram . . . . . | 1297 |
| Figure 366. LPTIM output waveform, single-counting mode configuration when repetition register content is different than zero (with PRELOAD = 1) . . . . . | 1299 |
| Figure 367. LPTIM output waveform, single-counting mode configuration and Set-once mode activated (WAVE bit is set). . . . . | 1299 |
| Figure 368. LPTIM output waveform, Continuous counting mode configuration . . . . . | 1300 |
| Figure 369. Waveform generation . . . . . | 1301 |
| Figure 370. Encoder mode counting sequence . . . . . | 1305 |
| Figure 371. Continuous counting mode when repetition register LPTIM_RCR different from zero (with PRELOAD = 1). . . . . | 1306 |
| Figure 372. Capture/compare input stage (channel 1) . . . . . | 1307 |
| Figure 373. Capture/compare output stage (channel 1) . . . . . | 1307 |
| Figure 374. Edge-aligned PWM mode (PRELOAD = 1) . . . . . | 1309 |
| Figure 375. Edge-aligned PWM waveforms (ARR=8 and CCxP = 0) . . . . . | 1310 |
| Figure 376. PWM mode with immediate update versus preloaded update . . . . . | 1311 |
| Figure 377. IRTIM internal hardware connections with TIM16 and TIM17 . . . . . | 1337 |
| Figure 378. Independent watchdog block diagram . . . . . | 1339 |
| Figure 379. Reset timing due to timeout . . . . . | 1341 |
| Figure 380. Reset timing due to refresh in the not allowed area . . . . . | 1342 |
| Figure 381. Changing PR, RL, and performing a refresh (1) . . . . . | 1343 |
| Figure 382. Window comparator update (1) . . . . . | 1344 |
| Figure 383. Independent watchdog interrupt timing diagram. . . . . | 1346 |
| Figure 384. Early wake-up comparator update (1) . . . . . | 1347 |
| Figure 385. Watchdog block diagram . . . . . | 1355 |
| Figure 386. Window watchdog timing diagram . . . . . | 1357 |
| Figure 387. RTC block diagram . . . . . | 1362 |
| Figure 388. TAMP block diagram . . . . . | 1416 |
| Figure 389. Backup registers protection zones . . . . . | 1421 |
| Figure 390. Tamper sampling with precharge pulse . . . . . | 1426 |
| Figure 391. Low level detection with precharge and filtering . . . . . | 1426 |
| Figure 392. Active tamper filtering . . . . . | 1428 |
| Figure 393. Block diagram . . . . . | 1463 |
| Figure 394. I 2 C-bus protocol . . . . . | 1466 |
| Figure 395. Setup and hold timings . . . . . | 1468 |
| Figure 396. I2C initialization flow . . . . . | 1470 |
| Figure 397. Data reception . . . . . | 1471 |
| Figure 398. Data transmission . . . . . | 1472 |
| Figure 399. | Target initialization flow . . . . . | 1475 |
| Figure 400. | Transfer sequence flow for I2C target transmitter, NOSTRETCH = 0 . . . . . | 1477 |
| Figure 401. | Transfer sequence flow for I2C target transmitter, NOSTRETCH = 1 . . . . . | 1478 |
| Figure 402. | Transfer bus diagrams for I2C target transmitter (mandatory events only) . . . . . | 1479 |
| Figure 403. | Transfer sequence flow for I2C target receiver, NOSTRETCH = 0 . . . . . | 1480 |
| Figure 404. | Transfer sequence flow for I2C target receiver, NOSTRETCH = 1 . . . . . | 1481 |
| Figure 405. | Transfer bus diagrams for I2C target receiver (mandatory events only) . . . . . | 1481 |
| Figure 406. | Controller clock generation . . . . . | 1483 |
| Figure 407. | Controller initialization flow . . . . . | 1485 |
| Figure 408. | 10-bit address read access with HEAD10R = 0 . . . . . | 1485 |
| Figure 409. | 10-bit address read access with HEAD10R = 1 . . . . . | 1486 |
| Figure 410. | Transfer sequence flow for I2C controller transmitter, N ≤ 255 bytes. . . . . | 1487 |
| Figure 411. | Transfer sequence flow for I2C controller transmitter, N > 255 bytes. . . . . | 1488 |
| Figure 412. | Transfer bus diagrams for I2C controller transmitter (mandatory events only) . . . . . | 1489 |
| Figure 413. | Transfer sequence flow for I2C controller receiver, N ≤ 255 bytes . . . . . | 1491 |
| Figure 414. | Transfer sequence flow for I2C controller receiver, N > 255 bytes. . . . . | 1492 |
| Figure 415. | Transfer bus diagrams for I2C controller receiver (mandatory events only) . . . . . | 1493 |
| Figure 416. | Timeout intervals for \( t_{LOW:SEXT} \) , \( t_{LOW:MEXT} \) . . . . . | 1497 |
| Figure 417. | Transfer sequence flow for SMBus target transmitter N bytes + PEC . . . . . | 1500 |
| Figure 418. | Transfer bus diagram for SMBus target transmitter (SBC = 1). . . . . | 1501 |
| Figure 419. | Transfer sequence flow for SMBus target receiver N bytes + PEC . . . . . | 1502 |
| Figure 420. | Bus transfer diagrams for SMBus target receiver (SBC = 1) . . . . . | 1503 |
| Figure 421. | Bus transfer diagrams for SMBus controller transmitter . . . . . | 1504 |
| Figure 422. | Bus transfer diagrams for SMBus controller receiver . . . . . | 1506 |
| Figure 423. | USART block diagram . . . . . | 1532 |
| Figure 424. | Word length programming . . . . . | 1536 |
| Figure 425. | Configurable stop bits . . . . . | 1538 |
| Figure 426. | TC/TXE behavior when transmitting . . . . . | 1540 |
| Figure 427. | Start bit detection when oversampling by 16 or 8. . . . . | 1541 |
| Figure 428. | usart_ker_ck clock divider block diagram. . . . . | 1544 |
| Figure 429. | Data sampling when oversampling by 16. . . . . | 1545 |
| Figure 430. | Data sampling when oversampling by 8. . . . . | 1546 |
| Figure 431. | Mute mode using Idle line detection . . . . . | 1553 |
| Figure 432. | Mute mode using address mark detection . . . . . | 1554 |
| Figure 433. | Break detection in LIN mode (11-bit break length - LBDL bit is set). . . . . | 1557 |
| Figure 434. | Break detection in LIN mode vs. Framing error detection. . . . . | 1558 |
| Figure 435. | USART example of synchronous master transmission. . . . . | 1559 |
| Figure 436. | USART data clock timing diagram in synchronous master mode (M bits = 00) . . . . . | 1559 |
| Figure 437. | USART data clock timing diagram in synchronous master mode (M bits = 01) . . . . . | 1560 |
| Figure 438. | USART data clock timing diagram in synchronous slave mode (M bits = 00) . . . . . | 1561 |
| Figure 439. | ISO 7816-3 asynchronous protocol . . . . . | 1563 |
| Figure 440. | Parity error detection using the 1.5 stop bits . . . . . | 1565 |
| Figure 441. | IrDA SIR ENDEC block diagram. . . . . | 1569 |
| Figure 442. | IrDA data modulation (3/16) - normal mode . . . . . | 1569 |
| Figure 443. | Transmission using DMA . . . . . | 1571 |
| Figure 444. | Reception using DMA. . . . . | 1572 |
| Figure 445. Hardware flow control between two USARTs . . . . . | 1572 |
| Figure 446. RS232 RTS flow control . . . . . | 1573 |
| Figure 447. RS232 CTS flow control . . . . . | 1574 |
| Figure 448. LPUART block diagram . . . . . | 1621 |
| Figure 449. LPUART word length programming . . . . . | 1625 |
| Figure 450. Configurable stop bits . . . . . | 1627 |
| Figure 451. TC/TXE behavior when transmitting . . . . . | 1629 |
| Figure 452. lpuart_ker_ck clock divider block diagram . . . . . | 1633 |
| Figure 453. Mute mode using Idle line detection . . . . . | 1637 |
| Figure 454. Mute mode using address mark detection . . . . . | 1638 |
| Figure 455. Transmission using DMA . . . . . | 1640 |
| Figure 456. Reception using DMA . . . . . | 1641 |
| Figure 457. Hardware flow control between two LPUARTs . . . . . | 1642 |
| Figure 458. RS232 RTS flow control . . . . . | 1642 |
| Figure 459. RS232 CTS flow control . . . . . | 1643 |
| Figure 460. SPI block diagram . . . . . | 1677 |
| Figure 461. Full-duplex single master/ single slave application . . . . . | 1681 |
| Figure 462. Half-duplex single master/ single slave application . . . . . | 1681 |
| Figure 463. Simplex single master / single slave application (master in transmit-only / slave in receive-only mode) . . . . . | 1683 |
| Figure 464. Master and three independent slaves connected in star topology . . . . . | 1684 |
| Figure 465. Master and three slaves connected in circular (daisy chain) topology . . . . . | 1686 |
| Figure 466. Multimaster application . . . . . | 1687 |
| Figure 467. Scheme of NSS control logic . . . . . | 1689 |
| Figure 468. Data flow timing control (SSOE = 1, SSOM = 0, SSM = 0) . . . . . | 1689 |
| Figure 469. NSS interleaving pulses between data (SSOE = 1, SSOM = 1, SSM = 0) . . . . . | 1690 |
| Figure 470. Data clock timing diagram . . . . . | 1692 |
| Figure 471. Data alignment when data size is not equal to 8, 16 or 32 bits . . . . . | 1693 |
| Figure 472. TI mode transfer . . . . . | 1703 |
| Figure 473. Optional configurations of the slave behavior when an underrun condition is detected . . . . . | 1705 |
| Figure 474. SAI functional block diagram . . . . . | 1730 |
| Figure 475. Audio frame . . . . . | 1733 |
| Figure 476. FS role is start of frame + channel side identification (FSDEF = TRIS = 1) . . . . . | 1736 |
| Figure 477. FS role is start of frame (FSDEF = 0) . . . . . | 1737 |
| Figure 478. Slot size configuration with FBOFF = 0 in SAI_xSLOTR . . . . . | 1738 |
| Figure 479. First bit offset . . . . . | 1738 |
| Figure 480. Audio block clock generator overview . . . . . | 1740 |
| Figure 481. PDM typical connection and timing . . . . . | 1744 |
| Figure 482. Detailed PDM interface block diagram . . . . . | 1745 |
| Figure 483. Start-up sequence . . . . . | 1746 |
| Figure 484. SAI_ADR format in TDM mode, 32-bit slot width . . . . . | 1747 |
| Figure 485. SAI_ADR format in TDM mode, 16-bit slot width . . . . . | 1748 |
| Figure 486. SAI_ADR format in TDM mode, 8-bit slot width . . . . . | 1749 |
| Figure 487. AC'97 audio frame . . . . . | 1752 |
| Figure 488. SPDIF format . . . . . | 1753 |
| Figure 489. SAI_xDR register ordering . . . . . | 1754 |
| Figure 490. Data companding hardware in an audio block in the SAI . . . . . | 1757 |
| Figure 491. Tristate strategy on SD output line on an inactive slot . . . . . | 1759 |
| Figure 492. Tristate on output data line in a protocol like I2S . . . . . | 1760 |
| Figure 493. Overrun detection error . . . . . | 1761 |
| Figure 494. FIFO underrun event . . . . . | 1761 |
| Figure 495. OTG high-speed block diagram . . . . . | 1797 |
| Figure 496. OTG A-B device connection . . . . . | 1799 |
| Figure 497. OTG peripheral-only connection . . . . . | 1800 |
| Figure 498. OTG host-only connection . . . . . | 1804 |
| Figure 499. SOF connectivity (SOF trigger output to TIM and ITR1 connection) . . . . . | 1808 |
| Figure 500. Updating OTG_HFIR dynamically (RLDCTRL = 1) . . . . . | 1810 |
| Figure 501. Device-mode FIFO address mapping and AHB FIFO access mapping . . . . . | 1811 |
| Figure 502. Host-mode FIFO address mapping and AHB FIFO access mapping . . . . . | 1812 |
| Figure 503. Interrupt hierarchy . . . . . | 1816 |
| Figure 504. Transmit FIFO write task . . . . . | 1909 |
| Figure 505. Receive FIFO read task . . . . . | 1910 |
| Figure 506. Normal bulk/control OUT/SETUP . . . . . | 1911 |
| Figure 507. Bulk/control IN transactions . . . . . | 1915 |
| Figure 508. Normal interrupt OUT . . . . . | 1918 |
| Figure 509. Normal interrupt IN . . . . . | 1923 |
| Figure 510. Isochronous OUT transactions . . . . . | 1925 |
| Figure 511. Isochronous IN transactions . . . . . | 1928 |
| Figure 512. Normal bulk/control OUT/SETUP transactions - DMA . . . . . | 1930 |
| Figure 513. Normal bulk/control IN transaction - DMA . . . . . | 1932 |
| Figure 514. Normal interrupt OUT transactions - DMA mode . . . . . | 1933 |
| Figure 515. Normal interrupt IN transactions - DMA mode . . . . . | 1934 |
| Figure 516. Normal isochronous OUT transaction - DMA mode . . . . . | 1935 |
| Figure 517. Normal isochronous IN transactions - DMA mode . . . . . | 1936 |
| Figure 518. Receive FIFO packet read . . . . . | 1942 |
| Figure 519. Processing a SETUP packet . . . . . | 1944 |
| Figure 520. Bulk OUT transaction . . . . . | 1951 |
| Figure 521. TRDT max timing case . . . . . | 1960 |
| Figure 522. Block diagram of debug support infrastructure . . . . . | 1963 |
| Figure 523. JTAG TAP state machine . . . . . | 1967 |
| Figure 524. AP0: CoreSight topology . . . . . | 1985 |
| Figure 525. CPU CoreSight topology . . . . . | 1994 |
| Figure 526. Trace port interface unit (TPIU) . . . . . | 2063 |
| Figure 527. Embedded cross trigger . . . . . | 2075 |
Chapters
- 1. Documentation conventions
- 2. Memory and bus architecture
- 3. System security
- 4. Boot modes
- 5. Global TrustZone controller (GTZC)
- 6. RAMs configuration controller (RAMCFG)
- 7. Embedded flash memory (FLASH)
- 8. Instruction cache (ICACHE)
- 9. Radio system
- 10. PTA converter (PTACONV)
- 11. Power control (PWR)
- 12. Reset and clock control (RCC)
- 13. Hardware semaphore (HSEM)
- 14. General-purpose I/Os (GPIO)
- 15. System configuration controller (SYSCFG)
- 16. Peripherals interconnect matrix
- 17. General purpose direct memory access controller (GPDMA)
- 18. Nested vectored interrupt controller (NVIC)
- 19. Extended interrupts and event controller (EXTI)
- 20. Cyclic redundancy check calculation unit (CRC)
- 21. Analog-to-digital converter (ADC4)
- 22. Voltage reference buffer (VREFBUF)
- 23. Comparator (COMP)
- 24. Touch sensing controller (TSC)
- 25. True random number generator (RNG)
- 26. AES hardware accelerator (AES)
- 27. Secure AES coprocessor (SAES)
- 28. Hash processor (HASH)
- 29. Public key accelerator (PKA)
- 30. Advanced-control timers (TIM1)
- 31. General-purpose timers (TIM2/TIM3/TIM4)
- 32. General purpose timers (TIM16/TIM17)
- 33. Low-power timer (LPTIM)
- 34. Infrared interface (IRTIM)
- 35. Independent watchdog (IWDG)
- 36. System window watchdog (WWDG)
- 37. Real-time clock (RTC)
- 38. Tamper and backup registers (TAMP)
- 39. Inter-integrated circuit interface (I2C)
- 40. Universal synchronous/asynchronous receiver transmitter (USART/UART)
- 41. Low-power universal asynchronous receiver transmitter (LPUART)
- 42. Serial peripheral interface (SPI)
- 43. Serial audio interface (SAI)
- 44. USB on-the-go high-speed (OTG)
- 45. Debug support (DBG)
- 46. Device electronic signature (DESIG)
- 47. Important security notice
- 48. Revision history