This reference manual targets application developers. It provides complete information on how to use the STM32H503xx microcontrollers memory and peripherals.
For ordering information, mechanical and electrical device characteristics, refer to the corresponding datasheets.
STM32H5 series microcontrollers include ST state-of-the-art patented technology.
| 1 | Documentation conventions | 65 |
| 1.1 | General information | 65 |
| 1.2 | List of abbreviations for registers | 65 |
| 1.3 | Register reset value | 65 |
| 1.4 | Glossary | 66 |
| 2 | Memory and bus architecture | 67 |
| 2.1 | System architecture | 67 |
| 2.1.1 | Fast C-bus | 68 |
| 2.1.2 | S-bus | 68 |
| 2.1.3 | GPDMA1 and GPDMA2 buses | 68 |
| 2.1.4 | Bus matrix | 69 |
| 2.1.5 | AHB/APB bridges | 69 |
| 2.2 | Memory organization | 70 |
| 2.2.1 | Introduction | 70 |
| 2.2.2 | Memory map and register boundary addresses | 71 |
| 2.2.3 | Embedded SRAM | 76 |
| 2.2.4 | Flash memory overview | 76 |
| 3 | System security | 77 |
| 3.1 | Key security features | 77 |
| 3.2 | Resource isolation | 77 |
| 3.2.1 | Temporal isolation using secure hide protection (HDP) | 77 |
| 3.2.2 | Resource isolation using Cortex privileged mode | 78 |
| 3.2.3 | Resource isolation using GTZC privilege control | 79 |
| 3.3 | Secure execution | 82 |
| 3.3.1 | Memory protection unit (MPU) | 82 |
| 3.3.2 | Embedded flash memory write protection | 82 |
| 3.3.3 | Tamper detection and response | 83 |
| 3.4 | Unique ID | 85 |
| 3.5 | Product life-cycle | 85 |
| 3.5.1 | Life-cycle management | 87 |
| 3.5.2 | Recommended product settings | 88 |
| 3.6 | Software intellectual property protection and collaborative development . . . . . | 89 |
| 3.6.1 | Software intellectual property protection . . . . . | 90 |
| 3.6.2 | Other software intellectual property protections . . . . . | 90 |
| 4 | Boot modes . . . . . | 91 |
| 4.1 | STM32H503 boot modes . . . . . | 91 |
| 5 | RAMs configuration controller (RAMCFG) . . . . . | 92 |
| 5.1 | Introduction . . . . . | 92 |
| 5.2 | RAMCFG main features . . . . . | 92 |
| 5.3 | RAMCFG functional description . . . . . | 92 |
| 5.3.1 | Internal SRAMs features . . . . . | 92 |
| 5.3.2 | Error code correction (SRAM1, SRAM2, BKPSRAM) . . . . . | 93 |
| 5.3.3 | Write protection (SRAM2) . . . . . | 95 |
| 5.3.4 | Software erase . . . . . | 95 |
| 5.4 | RAMCFG low-power modes . . . . . | 95 |
| 5.5 | RAMCFG interrupts . . . . . | 96 |
| 5.6 | RAMCFG registers . . . . . | 96 |
| 5.6.1 | RAMCFG memory x control register (RAMCFG_MxCR) . . . . . | 96 |
| 5.6.2 | RAMCFG memory x interrupt enable register (RAMCFG_MxIER) . . . . . | 97 |
| 5.6.3 | RAMCFG memory interrupt status register (RAMCFG_MxISR) . . . . . | 98 |
| 5.6.4 | RAMCFG memory x ECC single error address register (RAMCFG_MxSEAR) . . . . . | 98 |
| 5.6.5 | RAMCFG memory x ECC double error address register (RAMCFG_MxDEAR) . . . . . | 99 |
| 5.6.6 | RAMCFG memory x interrupt clear register x (RAMCFG_MxICR) . . . . . | 99 |
| 5.6.7 | RAMCFG memory 2 write protection register 1 (RAMCFG_M2WPR1) . . . . . | 100 |
| 5.6.8 | RAMCFG memory x ECC key register (RAMCFG_MxECCKEYR) . . . . . | 100 |
| 5.6.9 | RAMCFG memory x erase key register (RAMCFG_MxERKEYR) . . . . . | 101 |
| 5.6.10 | RAMCFG register map . . . . . | 101 |
| 6 | Global privilege controller (GTZC) . . . . . | 104 |
| 6.1 | Introduction . . . . . | 104 |
| 6.2 | GTZC main features . . . . . | 104 |
| 6.3 | GTZC implementation . . . . . | 105 |
| 6.4 | GTZC functional description | 107 |
| 6.4.1 | GTZC block diagram | 107 |
| 6.4.2 | Illegal unprivileged access | 107 |
| 6.4.3 | Privilege controller (TZSC) | 107 |
| 6.4.4 | Memory protection controller - block based (MPCBB) | 108 |
| 6.4.5 | Power-on/reset state | 108 |
| 6.5 | GTZC1 TZSC registers | 109 |
| 6.5.1 | GTZC1 TZSC privilege configuration register 1 (GTZC1_TZSC_PRIVCFGR1) | 109 |
| 6.5.2 | GTZC1 TZSC privilege configuration register 2 (GTZC1_TZSC_PRIVCFGR2) | 111 |
| 6.5.3 | GTZC1 TZSC privilege configuration register 3 (GTZC1_TZSC_PRIVCFGR3) | 112 |
| 6.5.4 | GTZC1 TZSC BKPSRAM subregion A watermark configuration register (GTZC1_TZSC_MPCWM4ACFGR) | 113 |
| 6.5.5 | GTZC1 TZSC BKPSRAM subregion A watermark register (GTZC1_TZSC_MPCWM4AR) | 114 |
| 6.5.6 | GTZC1 TZSC register map | 115 |
| 6.6 | GTZC1 MPCBBz registers (z = 1 to 2) | 116 |
| 6.6.1 | GTZC1 SRAMz MPCBB privileged configuration for super-block x register (GTZC1_MPCBBz_PRIVCFGRx) (z = 1 to 2) | 116 |
| 6.6.2 | GTZC1 MPCBBz register map (z = 1 to 2) | 116 |
| 7 | Embedded flash memory (FLASH) | 117 |
| 7.1 | Introduction | 117 |
| 7.2 | FLASH main features | 117 |
| 7.3 | FLASH functional description | 118 |
| 7.3.1 | FLASH block diagram | 118 |
| 7.3.2 | FLASH signals | 118 |
| 7.3.3 | Flash memory architecture and usage | 120 |
| 7.3.4 | FLASH read operations | 122 |
| 7.3.5 | FLASH program operations | 125 |
| 7.3.6 | FLASH erase operations | 127 |
| 7.3.7 | FLASH parallel operations | 129 |
| 7.3.8 | Flash memory error protections | 130 |
| 7.3.9 | OTP and RO memory access | 130 |
| 7.3.10 | Flash bank swapping | 132 |
| 7.3.11 | FLASH reset and clocks | 134 |
| 7.4 | FLASH option bytes ..... | 136 |
| 7.4.1 | About option bytes ..... | 136 |
| 7.4.2 | Option-byte loading ..... | 136 |
| 7.4.3 | Option-byte modification ..... | 137 |
| 7.4.4 | Option-byte overview ..... | 138 |
| 7.4.5 | Description of user and system option bytes ..... | 140 |
| 7.4.6 | Description of data protection option bytes ..... | 141 |
| 7.4.7 | Description of boot address option bytes ..... | 142 |
| 7.4.8 | Specific rules for modifying option bytes ..... | 142 |
| 7.5 | FLASH security and protections ..... | 143 |
| 7.5.1 | Hide protection (HDP) ..... | 144 |
| 7.5.2 | Privileged flash memory area protection ..... | 146 |
| 7.5.3 | Flash memory registers privileged and unprivileged modes ..... | 147 |
| 7.5.4 | Flash memory banks attributes in case of bank swap ..... | 148 |
| 7.5.5 | Flash memory configuration protection ..... | 149 |
| 7.5.6 | Write protection ..... | 150 |
| 7.5.7 | Life cycle management ..... | 150 |
| 7.5.8 | Product state transitions ..... | 151 |
| 7.5.9 | One-time-programmable and read-only memory protections ..... | 152 |
| 7.6 | System memory ..... | 153 |
| 7.6.1 | System memory introduction ..... | 153 |
| 7.6.2 | RSS user functions ..... | 153 |
| 7.7 | FLASH low-power modes ..... | 155 |
| 7.8 | FLASH error management ..... | 156 |
| 7.8.1 | Introduction ..... | 156 |
| 7.8.2 | Write protection error (WRPERR) ..... | 156 |
| 7.8.3 | Programming sequence error (PGSERR) ..... | 158 |
| 7.8.4 | Strobe error (STRBERR) ..... | 158 |
| 7.8.5 | Inconsistency error (INCERR) ..... | 159 |
| 7.8.6 | Error correction code error (ECCC/ECCD) ..... | 159 |
| 7.8.7 | Option byte change error (OPTCHANGEERR) ..... | 160 |
| 7.8.8 | Miscellaneous HardFault errors ..... | 161 |
| 7.9 | FLASH interrupts ..... | 161 |
| 7.10 | FLASH registers ..... | 162 |
| 7.10.1 | FLASH access control register (FLASH_ACR) ..... | 162 |
| 7.10.2 | FLASH key register (FLASH_NSKEYR) ..... | 163 |
| 7.10.3 | FLASH option key register (FLASH_OPTKEYR) . . . . . | 164 |
| 7.10.4 | FLASH operation status register (FLASH_OPSR) . . . . . | 165 |
| 7.10.5 | FLASH option control register (FLASH_OPTCR) . . . . . | 165 |
| 7.10.6 | FLASH status register (FLASH_NSSR) . . . . . | 167 |
| 7.10.7 | FLASH control register (FLASH_NSCR) . . . . . | 168 |
| 7.10.8 | FLASH clear control register (FLASH_NSCCR) . . . . . | 171 |
| 7.10.9 | FLASH privilege configuration register (FLASH_PRIVCFGR) . . . . . | 172 |
| 7.10.10 | FLASH HDP extension register (FLASH_HDPEXTR) . . . . . | 172 |
| 7.10.11 | FLASH option status register (FLASH_OPTSR_CUR) . . . . . | 173 |
| 7.10.12 | FLASH option status register (FLASH_OPTSR_PRG) . . . . . | 175 |
| 7.10.13 | FLASH option status register 2 (FLASH_OPTSR2_CUR) . . . . . | 176 |
| 7.10.14 | FLASH option status register 2 (FLASH_OPTSR2_PRG) . . . . . | 177 |
| 7.10.15 | FLASH unique boot entry register (FLASH_NSBOOTR_CUR) . . . . . | 178 |
| 7.10.16 | FLASH unique boot entry address (FLASH_NSBOOTR_PRG) . . . . . | 179 |
| 7.10.17 | FLASH OTP block lock (FLASH_OTPBLR_CUR) . . . . . | 179 |
| 7.10.18 | FLASH OTP block lock (FLASH_OTPBLR_PRG) . . . . . | 180 |
| 7.10.19 | FLASH privilege register for bank 1 (FLASH_PRIVBB1R1) . . . . . | 180 |
| 7.10.20 | FLASH write sector protection for Bank1 (FLASH_WRP1R_CUR) . . . . . | 181 |
| 7.10.21 | FLASH write sector protection for Bank1 (FLASH_WRP1R_PRG) . . . . . | 181 |
| 7.10.22 | FLASH HDP Bank1 register (FLASH_HDP1R_CUR) . . . . . | 182 |
| 7.10.23 | FLASH HDP Bank1 register (FLASH_HDP1R_PRG) . . . . . | 182 |
| 7.10.24 | FLASH ECC correction register (FLASH_ECCCORR) . . . . . | 183 |
| 7.10.25 | FLASH ECC detection register (FLASH_ECCDETR) . . . . . | 184 |
| 7.10.26 | FLASH ECC data (FLASH_ECCDR) . . . . . | 185 |
| 7.10.27 | FLASH privilege register for Bank2 (FLASH_PRIVBB2R1) . . . . . | 185 |
| 7.10.28 | FLASH write sector protection for Bank2 (FLASH_WRP2R_CUR) . . . . . | 185 |
| 7.10.29 | FLASH write sector protection for Bank2 (FLASH_WRP2R_PRG) . . . . . | 186 |
| 7.10.30 | FLASH HDP Bank2 register (FLASH_HDP2R_CUR) . . . . . | 187 |
| 7.10.31 | FLASH HDP Bank2 register (FLASH_HDP2R_PRG) . . . . . | 187 |
| 7.10.32 | FLASH register map . . . . . | 188 |
| 8 | Instruction cache (ICACHE) . . . . . | 192 |
| 8.1 | ICACHE introduction . . . . . | 192 |
| 8.2 | ICACHE main features . . . . . | 192 |
| 8.3 | ICACHE implementation . . . . . | 193 |
| 8.4 | ICACHE functional description . . . . . | 193 |
| 8.4.1 | ICACHE block diagram . . . . . | 194 |
| 8.4.2 | ICACHE reset and clocks | 194 |
| 8.4.3 | ICACHE TAG memory | 195 |
| 8.4.4 | Direct-mapped ICACHE (1-way cache) | 196 |
| 8.4.5 | ICACHE enable | 197 |
| 8.4.6 | Cacheable and noncacheable traffic | 197 |
| 8.4.7 | Cacheable accesses | 198 |
| 8.4.8 | ICACHE maintenance | 198 |
| 8.4.9 | ICACHE performance monitoring | 199 |
| 8.4.10 | ICACHE boot | 199 |
| 8.5 | ICACHE low-power modes | 199 |
| 8.6 | ICACHE error management and interrupts | 200 |
| 8.7 | ICACHE registers | 200 |
| 8.7.1 | ICACHE control register (ICACHE_CR) | 200 |
| 8.7.2 | ICACHE status register (ICACHE_SR) | 201 |
| 8.7.3 | ICACHE interrupt enable register (ICACHE_IER) | 202 |
| 8.7.4 | ICACHE flag clear register (ICACHE_FCR) | 202 |
| 8.7.5 | ICACHE hit monitor register (ICACHE_HMONR) | 203 |
| 8.7.6 | ICACHE miss monitor register (ICACHE_MMONR) | 203 |
| 8.7.7 | ICACHE register map | 204 |
| 9 | Power control (PWR) | 205 |
| 9.1 | Introduction | 205 |
| 9.2 | PWR main features | 205 |
| 9.3 | PWR pins and internal signals | 206 |
| 9.4 | PWR power supplies and supply domains | 207 |
| 9.4.1 | External power supplies | 207 |
| 9.4.2 | Internal regulator | 208 |
| 9.4.3 | Power-up and power-down power sequences | 209 |
| 9.4.4 | Independent analog peripherals supply | 209 |
| 9.4.5 | USB transceivers supply | 210 |
| 9.4.6 | Independent I/O supply rail | 210 |
| 9.4.7 | Backup domain | 210 |
| 9.5 | PWR system supply voltage regulation | 212 |
| 9.5.1 | LDO embedded regulator | 212 |
| 9.5.2 | VCORE supply versus reset, voltage scaling, and low-power modes | 212 |
| 9.5.3 | Embedded voltage regulator operating modes | 212 |
| 9.6 | PWR power supply and temperature supervision | 213 |
| 9.6.1 | Power-on reset (POR)/power-down reset (PDR)/ | 213 |
| 9.6.2 | Brownout reset (BOR) | 213 |
| 9.6.3 | Programmable voltage detector (PVD) | 214 |
| 9.6.4 | Analog voltage detector (AVD) | 216 |
| 9.6.5 | VDDIO2 voltage monitor (IO2VM) | 216 |
| 9.6.6 | Backup domain voltage monitoring | 217 |
| 9.6.7 | Temperature monitoring | 217 |
| 9.7 | PWR power management | 218 |
| 9.7.1 | Voltage scaling | 218 |
| 9.7.2 | Power management examples | 219 |
| 9.8 | Power modes | 220 |
| 9.8.1 | Slowing down system clocks | 223 |
| 9.8.2 | Peripheral clock gating | 223 |
| 9.8.3 | Low-power modes | 224 |
| 9.8.4 | Sleep mode | 225 |
| 9.8.5 | Stop mode | 226 |
| 9.8.6 | Standby mode | 228 |
| 9.8.7 | Power modes output pins | 230 |
| 9.9 | PWR privileged protection | 231 |
| 9.10 | PWR interrupts | 232 |
| 9.11 | PWR registers | 232 |
| 9.11.1 | PWR power mode control register (PWR_PMCR) | 232 |
| 9.11.2 | PWR status register (PWR_PMSR) | 234 |
| 9.11.3 | PWR voltage scaling control register (PWR_VOSCR) | 234 |
| 9.11.4 | PWR voltage scaling status register (PWR_VOSSR) | 235 |
| 9.11.5 | PWR backup domain control register (PWR_BDCR) | 236 |
| 9.11.6 | PWR disable backup protection control register (PWR_DBPCR) | 237 |
| 9.11.7 | PWR backup domain status register (PWR_BDSR) | 237 |
| 9.11.8 | PWR supply configuration control register (PWR_SCCR) | 238 |
| 9.11.9 | PWR voltage monitor control register (PWR_VMCR) | 239 |
| 9.11.10 | PWR voltage monitor status register (PWR_VMSR) | 240 |
| 9.11.11 | PWR wakeup status clear register (PWR_WUSCR) | 241 |
| 9.11.12 | PWR wakeup status register (PWR_WUSR) | 241 |
| 9.11.13 | PWR wakeup configuration register (PWR_WUCR) | 242 |
| 9.11.14 | PWR I/O retention register (PWR_IORETR) | 243 |
| 9.11.15 | PWR privilege configuration register (PWR_PRIVCFGR) . . . . . | 243 |
| 9.11.16 | PWR register map . . . . . | 244 |
| 10 | Reset and clock control (RCC) . . . . . | 246 |
| 10.1 | Introduction . . . . . | 246 |
| 10.2 | RCC pins and internal signals . . . . . | 246 |
| 10.3 | RCC reset functional description . . . . . | 246 |
| 10.3.1 | Power reset . . . . . | 246 |
| 10.3.2 | System reset . . . . . | 247 |
| 10.3.3 | Backup domain reset . . . . . | 248 |
| 10.3.4 | Reset source identification . . . . . | 248 |
| 10.4 | RCC clocks functional description . . . . . | 249 |
| 10.4.1 | HSE clock . . . . . | 252 |
| 10.4.2 | HSI clock . . . . . | 253 |
| 10.4.3 | CSI oscillator . . . . . | 254 |
| 10.4.4 | HSI48 clock . . . . . | 256 |
| 10.4.5 | PLL description . . . . . | 256 |
| 10.4.6 | LSE clock . . . . . | 260 |
| 10.4.7 | LSI clock . . . . . | 261 |
| 10.4.8 | System clock (SYSCLK) selection . . . . . | 262 |
| 10.4.9 | Handling clock generators in stop and standby modes . . . . . | 262 |
| 10.4.10 | Clock security system (CSS) . . . . . | 264 |
| 10.4.11 | Clock output generation (MCO1/MCO2) . . . . . | 265 |
| 10.4.12 | Kernel clock selection . . . . . | 265 |
| 10.4.13 | Clock measurement with TIMx and LPTIMx . . . . . | 268 |
| 10.4.14 | Internal oscillator calibration . . . . . | 268 |
| 10.4.15 | RTC and TAMP clock . . . . . | 268 |
| 10.4.16 | Timer clock . . . . . | 269 |
| 10.4.17 | Watchdog clock . . . . . | 269 |
| 10.4.18 | Peripherals clock gating . . . . . | 269 |
| 10.4.19 | Bus clock gating . . . . . | 270 |
| 10.5 | RCC privilege protection modes . . . . . | 270 |
| 10.6 | RCC low-power modes . . . . . | 272 |
| 10.7 | RCC interrupts . . . . . | 273 |
| 10.8 | RCC registers . . . . . | 274 |
| 10.8.1 | RCC clock control register (RCC_CR) . . . . . | 274 |
| 10.8.2 | RCC HSI calibration register (RCC_HSIConfigR) . . . . . | 277 |
| 10.8.3 | RCC clock recovery RC register (RCC_CRRCR) . . . . . | 277 |
| 10.8.4 | RCC CSI calibration register (RCC_CSICFGR) . . . . . | 278 |
| 10.8.5 | RCC clock configuration register 1 (RCC_CFGR1) . . . . . | 278 |
| 10.8.6 | RCC CPU domain clock configuration register 2 (RCC_CFGR2) . . . . . | 281 |
| 10.8.7 | RCC PLL clock source selection register (RCC_PLL1CFGR) . . . . . | 284 |
| 10.8.8 | RCC PLL clock source selection register (RCC_PLL2CFGR) . . . . . | 286 |
| 10.8.9 | RCC PLL1 dividers register (RCC_PLL1DIVR) . . . . . | 288 |
| 10.8.10 | RCC PLL1 fractional divider register (RCC_PLL1FRACR) . . . . . | 289 |
| 10.8.11 | RCC PLL1 dividers register (RCC_PLL2DIVR) . . . . . | 290 |
| 10.8.12 | RCC PLL2 fractional divider register (RCC_PLL2FRACR) . . . . . | 291 |
| 10.8.13 | RCC clock source interrupt enable register (RCC_CIER) . . . . . | 292 |
| 10.8.14 | RCC clock source interrupt flag register (RCC_CIFR) . . . . . | 293 |
| 10.8.15 | RCC clock source interrupt clear register (RCC_CICR) . . . . . | 294 |
| 10.8.16 | RCC AHB1 reset register (RCC_AHB1RSTR) . . . . . | 296 |
| 10.8.17 | RCC AHB2 peripheral reset register (RCC_AHB2RSTR) . . . . . | 297 |
| 10.8.18 | RCC APB1 peripheral low reset register (RCC_APB1LRSTR) . . . . . | 298 |
| 10.8.19 | RCC APB1 peripheral high reset register (RCC_APB1HRSTR) . . . . . | 300 |
| 10.8.20 | RCC APB2 peripheral reset register (RCC_APB2RSTR) . . . . . | 300 |
| 10.8.21 | RCC APB3 peripheral reset register (RCC_APB3RSTR) . . . . . | 301 |
| 10.8.22 | RCC AHB1 peripherals clock register (RCC_AHB1ENR) . . . . . | 302 |
| 10.8.23 | RCC AHB2 peripheral clock register (RCC_AHB2ENR) . . . . . | 303 |
| 10.8.24 | RCC APB1 peripheral clock register (RCC_APB1LENR) . . . . . | 305 |
| 10.8.25 | RCC APB1 peripheral clock register (RCC_APB1HENR) . . . . . | 307 |
| 10.8.26 | RCC APB2 peripheral clock register (RCC_APB2ENR) . . . . . | 307 |
| 10.8.27 | RCC APB3 peripheral clock register (RCC_APB3ENR) . . . . . | 308 |
| 10.8.28 | RCC AHB1 sleep clock register (RCC_AHB1LPENR) . . . . . | 309 |
| 10.8.29 | RCC AHB2 sleep clock register (RCC_AHB2LPENR) . . . . . | 311 |
| 10.8.30 | RCC APB1 sleep clock register (RCC_APB1LLPENR) . . . . . | 312 |
| 10.8.31 | RCC APB1 sleep clock register (RCC_APB1HLPENR) . . . . . | 314 |
| 10.8.32 | RCC APB2 sleep clock register (RCC_APB2LPENR) . . . . . | 315 |
| 10.8.33 | RCC APB3 sleep clock register (RCC_APB3LPENR) . . . . . | 316 |
| 10.8.34 | RCC kernel clock configuration register (RCC_CCIPR1) . . . . . | 317 |
| 10.8.35 | RCC kernel clock configuration register (RCC_CCIPR2) . . . . . | 318 |
| 10.8.36 | RCC kernel clock configuration register (RCC_CCIPR3) . . . . . | 318 |
| 10.8.37 | RCC kernel clock configuration register (RCC_CCIPR4) . . . . . | 319 |
| 10.8.38 | RCC kernel clock configuration register (RCC_CCIPR5) . . . . . | 321 |
| 10.8.39 | RCC backup domain control register (RCC_BDCR) ..... | 322 |
| 10.8.40 | RCC reset status register (RCC_RSR) ..... | 324 |
| 10.8.41 | RCC privilege configuration register (RCC_PRIVCFGR) ..... | 325 |
| 10.8.42 | RCC register map ..... | 326 |
| 11 | Clock recovery system (CRS) ..... | 331 |
| 11.1 | CRS introduction ..... | 331 |
| 11.2 | CRS main features ..... | 331 |
| 11.3 | CRS implementation ..... | 331 |
| 11.4 | CRS functional description ..... | 332 |
| 11.4.1 | CRS block diagram ..... | 332 |
| 11.4.2 | CRS internal signals ..... | 332 |
| 11.4.3 | Synchronization input ..... | 333 |
| 11.4.4 | Frequency error measurement ..... | 333 |
| 11.4.5 | Frequency error evaluation and automatic trimming ..... | 334 |
| 11.4.6 | CRS initialization and configuration ..... | 335 |
| 11.5 | CRS in low-power modes ..... | 336 |
| 11.6 | CRS interrupts ..... | 336 |
| 11.7 | CRS registers ..... | 336 |
| 11.7.1 | CRS control register (CRS_CR) ..... | 336 |
| 11.7.2 | CRS configuration register (CRS_CFGR) ..... | 338 |
| 11.7.3 | CRS interrupt and status register (CRS_ISR) ..... | 339 |
| 11.7.4 | CRS interrupt flag clear register (CRS_ICR) ..... | 341 |
| 11.7.5 | CRS register map ..... | 341 |
| 12 | General-purpose I/Os (GPIO) ..... | 343 |
| 12.1 | Introduction ..... | 343 |
| 12.2 | GPIO main features ..... | 343 |
| 12.3 | GPIO functional description ..... | 343 |
| 12.3.1 | General-purpose I/O (GPIO) ..... | 345 |
| 12.3.2 | I/O pin alternate function multiplexer and mapping ..... | 346 |
| 12.3.3 | I/O port control registers ..... | 346 |
| 12.3.4 | I/O port data registers ..... | 347 |
| 12.3.5 | I/O data bitwise handling ..... | 347 |
| 12.3.6 | GPIO locking mechanism ..... | 347 |
| 12.3.7 | I/O alternate function input/output ..... | 348 |
| 12.3.8 | External interrupt/wakeup lines ..... | 348 |
| 12.3.9 | Input configuration ..... | 348 |
| 12.3.10 | Output configuration ..... | 349 |
| 12.3.11 | Alternate function configuration ..... | 349 |
| 12.3.12 | Analog configuration ..... | 350 |
| 12.3.13 | Using the HSE or LSE oscillator pins as GPIOs ..... | 350 |
| 12.3.14 | Using the GPIO pins in the RTC supply domain ..... | 351 |
| 12.3.15 | I/Os state retention during standby mode ..... | 351 |
| 12.3.16 | Privileged and unprivileged modes ..... | 351 |
| 12.3.17 | High-speed low-voltage mode (HSLV) ..... | 351 |
| 12.3.18 | I/O compensation cell ..... | 351 |
| 12.4 | GPIO registers ..... | 352 |
| 12.4.1 | GPIO x port mode register (GPIOx_MODER) (x = A to D, H) ..... | 352 |
| 12.4.2 | GPIO x port output type register (GPIOx_OTYPER) (x = A to D, H) ..... | 352 |
| 12.4.3 | GPIO x port output speed register (GPIOx_OSPEEDR) (x = A to D, H) ..... | 353 |
| 12.4.4 | GPIO x port pull-up/pull-down register (GPIOx_PUPDR) (x = A to D, H) ..... | 354 |
| 12.4.5 | GPIO x port input data register (GPIOx_IDR) (x = A to D, H) ..... | 354 |
| 12.4.6 | GPIO x port output data register (GPIOx_ODR) (x = A to D, H) ..... | 355 |
| 12.4.7 | GPIO x port bit set/reset register (GPIOx_BSRR) (x = A to D, H) ..... | 355 |
| 12.4.8 | GPIO x port configuration lock register (GPIOx_LCKR) (x = A to D, H) ..... | 356 |
| 12.4.9 | GPIO x alternate function low register (GPIOx_AFRL) (x = A to D, H) ..... | 357 |
| 12.4.10 | GPIO x alternate function high register (GPIOx_AFRH) (x = A to D, H) ..... | 357 |
| 12.4.11 | GPIO x port bit reset register (GPIOx_BRR) (x = A to D, H) ..... | 358 |
| 12.4.12 | GPIO x high-speed low-voltage register (GPIOx_HSLVR) (x = A to D, H) ..... | 359 |
| 12.4.13 | GPIO register map ..... | 359 |
| 13 | System configuration, boot, and security (SBS) ..... | 361 |
| 13.1 | SBS introduction ..... | 361 |
| 13.2 | SBS main features ..... | 361 |
| 13.3 | SBS functional description ..... | 362 |
| 13.3.1 | SBS block diagram ..... | 362 |
| 13.3.2 | SBS signals ..... | 362 |
| 13.3.3 | SBS reset and clocks ..... | 363 |
| 13.3.4 | SBS system configuration ..... | 363 |
| 13.3.5 | SBS boot control ..... | 364 |
| 13.3.6 | SBS debug control ..... | 366 |
| 13.4 | SBS interrupts ..... | 369 |
| 13.5 | SBS registers ..... | 369 |
| 13.5.1 | SBS temporal isolation control register (SBS_HDPLCR) ..... | 369 |
| 13.5.2 | SBS temporal isolation status register (SBS_HDPLSR) ..... | 369 |
| 13.5.3 | SBS debug control register (SBS_DBGCR) ..... | 370 |
| 13.5.4 | SBS debug lock register (SBS_DBGLOCKR) ..... | 371 |
| 13.5.5 | SBS product mode and configuration register (SBS_PMCR) ..... | 371 |
| 13.5.6 | SBS FPU interrupt mask register (SBS_FPUIMR) ..... | 372 |
| 13.5.7 | SBS memory erase status register (SBS_MESR) ..... | 372 |
| 13.5.8 | SBS compensation cell for I/Os control and status register (SBS_CCCSR) ..... | 373 |
| 13.5.9 | SBS compensation cell for I/Os value register (SBS_CCVALR) ..... | 374 |
| 13.5.10 | SBS compensation cell for I/Os software code register (SBS_CCWCR) ..... | 375 |
| 13.5.11 | SBS Class B register (SBS_CFGR2) ..... | 375 |
| 13.5.12 | SBS CPU lock register (SBS_CNSLCKR) ..... | 376 |
| 13.5.13 | SBS flift ECC NMI mask register (SBS_ECCNMIR) ..... | 377 |
| 13.5.14 | SBS register map ..... | 377 |
| 14 | Peripherals interconnect matrix ..... | 379 |
| 14.1 | Introduction ..... | 379 |
| 14.2 | Connection summary ..... | 379 |
| 14.3 | Interconnection details ..... | 381 |
| 14.3.1 | Master to slave interconnection for timers ..... | 381 |
| 14.3.2 | Triggers to ADCs ..... | 382 |
| 14.3.3 | ADC analog watchdogs as triggers to timers ..... | 382 |
| 14.3.4 | Triggers to DAC ..... | 383 |
| 14.3.5 | Triggers to DTS ..... | 383 |
| 14.3.6 | LP timer to LP timer connection ..... | 384 |
| 14.3.7 | Internal clock sources to timers ..... | 384 |
| 14.3.8 | Triggers to low-power timers ..... | 385 |
| 14.3.9 | RTC wakeup as inputs to timers ..... | 385 |
| 14.3.10 | Blanking sources to comparator ..... | 386 |
| 14.3.11 | Comparators as inputs, trigger or break signals to timers ..... | 386 |
| 14.3.12 | System errors as break signals to timers ..... | 387 |
| 14.3.13 | Triggers to GPDMA1/2 ..... | 387 |
| 14.3.14 | Internal analog signals to analog peripherals ..... | 388 |
| 14.3.15 | Clock source for the DAC sample and hold mode ..... | 389 |
| 14.3.16 | Internal tamper sources ..... | 389 |
| 14.3.17 | Output from tamper to RTC ..... | 390 |
| 15 | General purpose direct memory access controller (GPDMA) ..... | 391 |
| 15.1 | GPDMA introduction ..... | 391 |
| 15.2 | GPDMA main features ..... | 391 |
| 15.3 | GPDMA implementation ..... | 392 |
| 15.3.1 | GPDMA instances ..... | 392 |
| 15.3.2 | GPDMA channels ..... | 392 |
| 15.3.3 | GPDMA in low-power modes ..... | 393 |
| 15.3.4 | GPDMA requests ..... | 393 |
| 15.3.5 | GPDMA block requests ..... | 397 |
| 15.3.6 | GPDMA channels with peripheral early termination ..... | 398 |
| 15.3.7 | GPDMA triggers ..... | 398 |
| 15.4 | GPDMA functional description ..... | 400 |
| 15.4.1 | GPDMA block diagram ..... | 400 |
| 15.4.2 | GPDMA channel state and direct programming without any linked-list ..... | 400 |
| 15.4.3 | GPDMA channel suspend and resume ..... | 401 |
| 15.4.4 | GPDMA channel abort and restart ..... | 402 |
| 15.4.5 | GPDMA linked-list data structure ..... | 403 |
| 15.4.6 | Linked-list item transfer execution ..... | 406 |
| 15.4.7 | GPDMA channel state and linked-list programming in run-to-completion mode ..... | 407 |
| 15.4.8 | GPDMA channel state and linked-list programming in link step mode ..... | 410 |
| 15.4.9 | GPDMA channel state and linked-list programming ..... | 417 |
| 15.4.10 | GPDMA FIFO-based transfers ..... | 419 |
| 15.4.11 | GPDMA transfer request and arbitration ..... | 426 |
| 15.4.12 | GPDMA triggered transfer ..... | 430 |
| 15.4.13 | GPDMA circular buffering with linked-list programming | 431 |
| 15.4.14 | GPDMA transfer in peripheral flow-control mode | 433 |
| 15.4.15 | GPDMA privileged/unprivileged channel | 434 |
| 15.4.16 | GPDMA error management | 434 |
| 15.5 | GPDMA in debug mode | 436 |
| 15.6 | GPDMA in low-power modes | 436 |
| 15.7 | GPDMA interrupts | 437 |
| 15.8 | GPDMA registers | 438 |
| 15.8.1 | GPDMA privileged configuration register (GPDMA_PRIVCFGR) | 438 |
| 15.8.2 | GPDMA masked interrupt status register (GPDMA_MISR) | 439 |
| 15.8.3 | GPDMA channel x linked-list base address register (GPDMA_CxLBAR) | 439 |
| 15.8.4 | GPDMA channel x flag clear register (GPDMA_CxFCR) | 440 |
| 15.8.5 | GPDMA channel x status register (GPDMA_CxSR) | 441 |
| 15.8.6 | GPDMA channel x control register (GPDMA_CxCR) | 442 |
| 15.8.7 | GPDMA channel x transfer register 1 (GPDMA_CxTR1) | 444 |
| 15.8.8 | GPDMA channel x transfer register 2 (GPDMA_CxTR2) | 448 |
| 15.8.9 | GPDMA channel x block register 1 (GPDMA_CxBR1) | 452 |
| 15.8.10 | GPDMA channel x alternate block register 1 (GPDMA_CxBR1) | 453 |
| 15.8.11 | GPDMA channel x source address register (GPDMA_CxSAR) | 456 |
| 15.8.12 | GPDMA channel x destination address register (GPDMA_CxDAR) | 457 |
| 15.8.13 | GPDMA channel x transfer register 3 (GPDMA_CxTR3) | 458 |
| 15.8.14 | GPDMA channel x block register 2 (GPDMA_CxBR2) | 459 |
| 15.8.15 | GPDMA channel x linked-list address register (GPDMA_CxLLR) | 460 |
| 15.8.16 | GPDMA channel x alternate linked-list address register (GPDMA_CxLLR) | 462 |
| 15.8.17 | GPDMA register map | 463 |
| 16 | Nested vectored interrupt controller (NVIC) | 465 |
| 16.1 | NVIC main features | 465 |
| 16.2 | SysTick calibration value register | 465 |
| 16.3 | Interrupt and exception vectors | 465 |
| 17 | Extended interrupts and event controller (EXTI) | 470 |
| 17.1 | EXTI main features | 470 |
| 17.2 | EXTI block diagram | 470 |
| 17.2.1 | EXTI connections between peripherals and CPU | 471 |
| 17.2.2 | EXTI interrupt/event mapping | 472 |
| 17.3 | EXTI functional description | 473 |
| 17.3.1 | EXTI configurable event input wakeup | 473 |
| 17.3.2 | EXTI mux selection | 474 |
| 17.4 | EXTI functional behavior | 474 |
| 17.5 | EXTI event protection | 475 |
| 17.5.1 | EXTI privilege protection | 476 |
| 17.6 | EXTI registers | 476 |
| 17.6.1 | EXTI rising trigger selection register (EXTI_RTSR1) | 476 |
| 17.6.2 | EXTI falling trigger selection register (EXTI_FTSR1) | 477 |
| 17.6.3 | EXTI software interrupt event register (EXTI_SWIER1) | 478 |
| 17.6.4 | EXTI rising edge pending register (EXTI_RPR1) | 478 |
| 17.6.5 | EXTI falling edge pending register (EXTI_FPR1) | 479 |
| 17.6.6 | EXTI privilege configuration register (EXTI_PRIVCFGR1) | 479 |
| 17.6.7 | EXTI rising trigger selection register 2 (EXTI_RTSR2) | 480 |
| 17.6.8 | EXTI falling trigger selection register 2 (EXTI_FTSR2) | 481 |
| 17.6.9 | EXTI software interrupt event register 2 (EXTI_SWIER2) | 481 |
| 17.6.10 | EXTI rising edge pending register 2 (EXTI_RPR2) | 482 |
| 17.6.11 | EXTI falling edge pending register 2 (EXTI_FPR2) | 483 |
| 17.6.12 | EXTI privilege configuration register 2 (EXTI_PRIVCFGR2) | 484 |
| 17.6.13 | EXTI external interrupt selection register (EXTI_EXTICR1) | 485 |
| 17.6.14 | EXTI external interrupt selection register (EXTI_EXTICR2) | 486 |
| 17.6.15 | EXTI external interrupt selection register (EXTI_EXTICR3) | 487 |
| 17.6.16 | EXTI external interrupt selection register (EXTI_EXTICR4) | 488 |
| 17.6.17 | EXTI CPU wakeup with interrupt mask register (EXTI_IMR1) | 490 |
| 17.6.18 | EXTI CPU wakeup with event mask register (EXTI_EMR1) | 491 |
| 17.6.19 | EXTI CPU wakeup with interrupt mask register 2 (EXTI_IMR2) | 492 |
| 17.6.20 | EXTI CPU wakeup with event mask register 2 (EXTI_EMR2) | 493 |
| 17.6.21 | EXTI register map | 494 |
| 18 | Cyclic redundancy check calculation unit (CRC) | 496 |
| 18.1 | Introduction | 496 |
| 18.2 | CRC main features | 496 |
| 18.3 | CRC functional description | 497 |
| 18.3.1 | CRC block diagram | 497 |
| 18.3.2 | CRC internal signals | 497 |
| 18.3.3 | CRC operation ..... | 497 |
| 18.4 | CRC registers ..... | 499 |
| 18.4.1 | CRC data register (CRC_DR) ..... | 499 |
| 18.4.2 | CRC independent data register (CRC_IDR) ..... | 499 |
| 18.4.3 | CRC control register (CRC_CR) ..... | 500 |
| 18.4.4 | CRC initial value (CRC_INIT) ..... | 501 |
| 18.4.5 | CRC polynomial (CRC_POL) ..... | 501 |
| 18.4.6 | CRC register map ..... | 502 |
| 19 | Analog-to-digital converters (ADC1) ..... | 503 |
| 19.1 | Introduction ..... | 503 |
| 19.2 | ADC main features ..... | 503 |
| 19.3 | ADC implementation ..... | 505 |
| 19.4 | ADC functional description ..... | 506 |
| 19.4.1 | ADC block diagram ..... | 506 |
| 19.4.2 | ADC pins and internal signals ..... | 507 |
| 19.4.3 | ADC clocks ..... | 510 |
| 19.4.4 | ADC connectivity ..... | 512 |
| 19.4.5 | Slave AHB interface ..... | 513 |
| 19.4.6 | ADC Deep-power-down mode (DEEPPWD) and ADC voltage regulator (ADVREGEN) ..... | 513 |
| 19.4.7 | Single-ended and differential input channels ..... | 514 |
| 19.4.8 | Calibration (ADCAL, ADCALDIF, ADC_CALFACT) ..... | 514 |
| 19.4.9 | ADC on-off control (ADEN, ADDIS, ADRDY) ..... | 517 |
| 19.4.10 | Constraints when writing the ADC control bits ..... | 518 |
| 19.4.11 | Channel selection (SQRx, JSQRx) ..... | 519 |
| 19.4.12 | Channel-wise programmable sampling time (SMPR1, SMPR2) ..... | 520 |
| 19.4.13 | Single conversion mode (CONT = 0) ..... | 522 |
| 19.4.14 | Continuous conversion mode (CONT = 1) ..... | 522 |
| 19.4.15 | Starting conversions (ADSTART, JADSTART) ..... | 523 |
| 19.4.16 | ADC timing ..... | 524 |
| 19.4.17 | Stopping an ongoing conversion (ADSTP, JADSTP) ..... | 525 |
| 19.4.18 | Conversion on external trigger and trigger polarity (EXTSEL, EXTEN, JEXTSEL, JEXTEN) ..... | 526 |
| 19.4.19 | Injected channel management ..... | 528 |
| 19.4.20 | Discontinuous mode (DISCEN, DISCNUM, JDISCEN) ..... | 529 |
| 19.4.21 | Queue of context for injected conversions ..... | 530 |
| 19.4.22 | Programmable resolution (RES) - fast conversion mode | 538 |
| 19.4.23 | End of conversion, end of sampling phase (EOC, JEOC, EOSMP) | 539 |
| 19.4.24 | End of conversion sequence (EOS, JEOS) | 539 |
| 19.4.25 | Timing diagrams example (single/continuous modes, hardware/software triggers) | 540 |
| 19.4.26 | Data management | 542 |
| 19.4.27 | Dynamic low-power features | 548 |
| 19.4.28 | Analog window watchdog (AWD1EN, JAWD1EN, AWD1SGL, AWD1CH, AWD2CH, AWD3CH, AWD_HTx, AWD_LTx, AWDx) | 553 |
| 19.4.29 | Oversampler | 557 |
| 19.4.30 | Temperature sensor | 563 |
| 19.4.31 | VBAT supply monitoring | 565 |
| 19.4.32 | Monitoring the internal voltage reference | 565 |
| 19.4.33 | Monitoring the supply voltage | 567 |
| 19.5 | ADC interrupts | 567 |
| 19.6 | ADC registers | 569 |
| 19.6.1 | ADC interrupt and status register (ADC_ISR) | 569 |
| 19.6.2 | ADC interrupt enable register (ADC_IER) | 571 |
| 19.6.3 | ADC control register (ADC_CR) | 573 |
| 19.6.4 | ADC configuration register (ADC_CFGR) | 577 |
| 19.6.5 | ADC configuration register 2 (ADC_CFGR2) | 581 |
| 19.6.6 | ADC sample time register 1 (ADC_SMPR1) | 583 |
| 19.6.7 | ADC sample time register 2 (ADC_SMPR2) | 584 |
| 19.6.8 | ADC watchdog threshold register 1 (ADC_TR1) | 585 |
| 19.6.9 | ADC watchdog threshold register 2 (ADC_TR2) | 586 |
| 19.6.10 | ADC watchdog threshold register 3 (ADC_TR3) | 587 |
| 19.6.11 | ADC regular sequence register 1 (ADC_SQR1) | 587 |
| 19.6.12 | ADC regular sequence register 2 (ADC_SQR2) | 588 |
| 19.6.13 | ADC regular sequence register 3 (ADC_SQR3) | 589 |
| 19.6.14 | ADC regular sequence register 4 (ADC_SQR4) | 590 |
| 19.6.15 | ADC regular data register (ADC_DR) | 591 |
| 19.6.16 | ADC injected sequence register (ADC_JSQR) | 591 |
| 19.6.17 | ADC offset y register (ADC_OFy) | 594 |
| 19.6.18 | ADC injected channel y data register (ADC_JDRy) | 595 |
| 19.6.19 | ADC analog watchdog 2 configuration register (ADC_AWD2CR) | 596 |
| 19.6.20 | ADC analog watchdog 3 configuration register (ADC_AWD3CR) | 596 |
| 19.6.21 | ADC Differential mode selection register (ADC_DIFSEL) | 597 |
| 19.6.22 | ADC calibration factors (ADC_CALFACT) . . . . . | 598 |
| 19.6.23 | ADC option register (ADC_OR) . . . . . | 598 |
| 19.7 | ADC common registers . . . . . | 599 |
| 19.7.1 | ADC common control register (ADC_CCR) . . . . . | 599 |
| 19.7.2 | ADC hardware configuration register (ADC_HWCFGR0) . . . . . | 600 |
| 19.7.3 | ADC version register (ADC_VERR) . . . . . | 601 |
| 19.7.4 | ADC identification register (ADC_IPDR) . . . . . | 601 |
| 19.7.5 | ADC size identification register (ADC_SIDR) . . . . . | 602 |
| 19.8 | ADC register map . . . . . | 603 |
| 20 | Digital temperature sensor (DTS) . . . . . | 607 |
| 20.1 | Introduction . . . . . | 607 |
| 20.2 | DTS main features . . . . . | 607 |
| 20.3 | DTS functional description . . . . . | 608 |
| 20.3.1 | DTS block diagram . . . . . | 608 |
| 20.3.2 | DTS internal signals . . . . . | 608 |
| 20.3.3 | DTS block operation . . . . . | 609 |
| 20.3.4 | Operating modes . . . . . | 609 |
| 20.3.5 | Calibration . . . . . | 609 |
| 20.3.6 | Prescaler . . . . . | 609 |
| 20.3.7 | Temperature measurement principles . . . . . | 610 |
| 20.3.8 | Sampling time . . . . . | 611 |
| 20.3.9 | Quick measurement mode . . . . . | 611 |
| 20.3.10 | Trigger input . . . . . | 612 |
| 20.3.11 | On-off control and ready flag . . . . . | 612 |
| 20.3.12 | Temperature measurement sequence . . . . . | 613 |
| 20.4 | DTS low-power modes . . . . . | 614 |
| 20.5 | DTS interrupts . . . . . | 614 |
| 20.5.1 | Temperature window comparator . . . . . | 614 |
| 20.5.2 | Synchronous interrupt . . . . . | 614 |
| 20.5.3 | Asynchronous wakeup . . . . . | 614 |
| 20.6 | DTS registers . . . . . | 615 |
| 20.6.1 | Temperature sensor configuration register 1 (DTS_CFGR1) . . . . . | 615 |
| 20.6.2 | Temperature sensor T0 value register 1 (DTS_T0VALR1) . . . . . | 617 |
| 20.6.3 | Temperature sensor ramp value register (DTS_RAMPVALR) . . . . . | 617 |
| 20.6.4 | Temperature sensor interrupt threshold register 1 (DTS_ITR1) . . . . . | 618 |
| 20.6.5 | Temperature sensor data register (DTS_DR) . . . . . | 618 |
| 20.6.6 | Temperature sensor status register (DTS_SR) . . . . . | 619 |
| 20.6.7 | Temperature sensor interrupt enable register (DTS_ITENR) . . . . . | 620 |
| 20.6.8 | Temperature sensor clear interrupt flag register (DTS_ICIFR) . . . . . | 621 |
| 20.6.9 | Temperature sensor option register (DTS_OR) . . . . . | 622 |
| 20.6.10 | DTS register map . . . . . | 623 |
| 21 | Digital-to-analog converter (DAC) . . . . . | 624 |
| 21.1 | Introduction . . . . . | 624 |
| 21.2 | DAC main features . . . . . | 624 |
| 21.3 | DAC implementation . . . . . | 625 |
| 21.4 | DAC functional description . . . . . | 626 |
| 21.4.1 | DAC block diagram . . . . . | 626 |
| 21.4.2 | DAC pins and internal signals . . . . . | 627 |
| 21.4.3 | DAC clocks . . . . . | 628 |
| 21.4.4 | DAC channel enable . . . . . | 628 |
| 21.4.5 | DAC data format . . . . . | 628 |
| 21.4.6 | DAC conversion . . . . . | 630 |
| 21.4.7 | DAC output voltage . . . . . | 631 |
| 21.4.8 | DAC trigger selection . . . . . | 632 |
| 21.4.9 | DMA requests . . . . . | 632 |
| 21.4.10 | Noise generation . . . . . | 633 |
| 21.4.11 | Triangle-wave generation . . . . . | 634 |
| 21.4.12 | DAC channel modes . . . . . | 635 |
| 21.4.13 | DAC channel buffer calibration . . . . . | 638 |
| 21.4.14 | Dual DAC channel conversion modes (if dual channels are available) . . . . . | 640 |
| 21.5 | DAC in low-power modes . . . . . | 644 |
| 21.6 | DAC interrupts . . . . . | 644 |
| 21.7 | DAC registers . . . . . | 644 |
| 21.7.1 | DAC control register (DAC_CR) . . . . . | 644 |
| 21.7.2 | DAC software trigger register (DAC_SWTRGR) . . . . . | 648 |
| 21.7.3 | DAC channel1 12-bit right-aligned data holding register (DAC_DHR12R1) . . . . . | 648 |
| 21.7.4 | DAC channel1 12-bit left aligned data holding register (DAC_DHR12L1) . . . . . | 649 |
| 21.7.5 | DAC channel1 8-bit right aligned data holding register (DAC_DHR8R1) ..... | 649 |
| 21.7.6 | DAC channel2 12-bit right aligned data holding register (DAC_DHR12R2) ..... | 650 |
| 21.7.7 | DAC channel2 12-bit left aligned data holding register (DAC_DHR12L2) ..... | 650 |
| 21.7.8 | DAC channel2 8-bit right-aligned data holding register (DAC_DHR8R2) ..... | 651 |
| 21.7.9 | Dual DAC 12-bit right-aligned data holding register (DAC_DHR12RD) ..... | 651 |
| 21.7.10 | Dual DAC 12-bit left aligned data holding register (DAC_DHR12LD) ..... | 652 |
| 21.7.11 | Dual DAC 8-bit right aligned data holding register (DAC_DHR8RD) ..... | 652 |
| 21.7.12 | DAC channel1 data output register (DAC_DOR1) ..... | 653 |
| 21.7.13 | DAC channel2 data output register (DAC_DOR2) ..... | 653 |
| 21.7.14 | DAC status register (DAC_SR) ..... | 654 |
| 21.7.15 | DAC calibration control register (DAC_CCR) ..... | 655 |
| 21.7.16 | DAC mode control register (DAC_MCR) ..... | 656 |
| 21.7.17 | DAC channel1 sample and hold sample time register (DAC_SHSR1) ..... | 657 |
| 21.7.18 | DAC channel2 sample and hold sample time register (DAC_SHSR2) ..... | 658 |
| 21.7.19 | DAC sample and hold time register (DAC_SHHR) ..... | 658 |
| 21.7.20 | DAC sample and hold refresh time register (DAC_SHRR) ..... | 659 |
| 21.7.21 | DAC register map ..... | 660 |
| 22 | Comparator (COMP) ..... | 663 |
| 22.1 | Introduction ..... | 663 |
| 22.2 | COMP main features ..... | 663 |
| 22.3 | COMP functional description ..... | 664 |
| 22.3.1 | COMP block diagram ..... | 664 |
| 22.3.2 | COMP pins and internal signals ..... | 664 |
| 22.3.3 | COMP reset and clocks ..... | 666 |
| 22.3.4 | Comparator LOCK mechanism ..... | 666 |
| 22.3.5 | Hysteresis ..... | 666 |
| 22.3.6 | Comparator output blanking function ..... | 667 |
| 22.3.7 | COMP startup stabilization time ..... | 667 |
| 22.3.8 | COMP power and speed modes ..... | 667 |
| 22.4 | COMP low-power modes | 668 |
| 22.5 | COMP interrupts | 668 |
| 22.5.1 | Interrupt through EXTI | 668 |
| 22.5.2 | Interrupt through the NVIC of the CPU | 669 |
| 22.6 | SCALER function | 669 |
| 22.7 | COMP registers | 670 |
| 22.7.1 | Comparator status register (COMP_SR) | 670 |
| 22.7.2 | Comparator interrupt clear flag register (COMP_ICFR) | 671 |
| 22.7.3 | Comparator configuration register 1 (COMP_CFGR1) | 671 |
| 22.7.4 | Comparator configuration register 2 (COMP_CFGR2) | 673 |
| 22.7.5 | COMP register map | 674 |
| 23 | Operational amplifiers (OPAMP) | 675 |
| 23.1 | Introduction | 675 |
| 23.2 | OPAMP main features | 675 |
| 23.3 | OPAMP functional description | 675 |
| 23.3.1 | OPAMP reset and clocks | 675 |
| 23.3.2 | Initial configuration | 676 |
| 23.3.3 | Signal routing | 676 |
| 23.3.4 | OPAMP modes | 676 |
| 23.3.5 | Calibration | 683 |
| 23.4 | OPAMP low-power modes | 685 |
| 23.5 | OPAMP PGA gain | 685 |
| 23.6 | OPAMP registers | 685 |
| 23.6.1 | OPAMP1 control/status register (OPAMP1_CSR) | 685 |
| 23.6.2 | OPAMP1 trimming register in normal mode (OPAMP1_OTR) | 687 |
| 23.6.3 | OPAMP1 trimming register in high-speed mode (OPAMP1_HSOTR) | 688 |
| 23.6.4 | OPAMP register map | 688 |
| 24 | True random number generator (RNG) | 689 |
| 24.1 | Introduction | 689 |
| 24.2 | RNG main features | 689 |
| 24.3 | RNG functional description | 690 |
| 24.3.1 | RNG block diagram | 690 |
| 24.3.2 | RNG internal signals | 690 |
| 24.3.3 | Random number generation | 690 |
| 24.3.4 | RNG initialization ..... | 693 |
| 24.3.5 | RNG operation ..... | 694 |
| 24.3.6 | RNG clocking ..... | 696 |
| 24.3.7 | Error management ..... | 696 |
| 24.3.8 | RNG low-power use ..... | 697 |
| 24.4 | RNG interrupts ..... | 698 |
| 24.5 | RNG processing time ..... | 698 |
| 24.6 | RNG entropy source validation ..... | 699 |
| 24.6.1 | Introduction ..... | 699 |
| 24.6.2 | Validation conditions ..... | 699 |
| 24.7 | RNG registers ..... | 700 |
| 24.7.1 | RNG control register (RNG_CR) ..... | 700 |
| 24.7.2 | RNG status register (RNG_SR) ..... | 702 |
| 24.7.3 | RNG data register (RNG_DR) ..... | 703 |
| 24.7.4 | RNG noise source control register (RNG_NSCR) ..... | 704 |
| 24.7.5 | RNG health test control register (RNG_HTCR) ..... | 705 |
| 24.7.6 | RNG register map ..... | 705 |
| 25 | Hash processor (HASH) ..... | 706 |
| 25.1 | Introduction ..... | 706 |
| 25.2 | HASH main features ..... | 706 |
| 25.3 | HASH implementation ..... | 707 |
| 25.4 | HASH functional description ..... | 707 |
| 25.4.1 | HASH block diagram ..... | 707 |
| 25.4.2 | HASH internal signals ..... | 707 |
| 25.4.3 | About secure hash algorithms ..... | 708 |
| 25.4.4 | Message data feeding ..... | 708 |
| 25.4.5 | Message digest computing ..... | 709 |
| 25.4.6 | Message padding ..... | 711 |
| 25.4.7 | HMAC operation ..... | 712 |
| 25.4.8 | HASH suspend/resume operations ..... | 714 |
| 25.4.9 | HASH DMA interface ..... | 716 |
| 25.4.10 | HASH error management ..... | 716 |
| 25.4.11 | HASH processing time ..... | 716 |
| 25.5 | HASH interrupts ..... | 717 |
| 25.6 | HASH registers ..... | 717 |
| 25.6.1 | HASH control register (HASH_CR) ..... | 717 |
| 25.6.2 | HASH data input register (HASH_DIN) ..... | 719 |
| 25.6.3 | HASH start register (HASH_STR) ..... | 720 |
| 25.6.4 | HASH digest registers ..... | 721 |
| 25.6.5 | HASH interrupt enable register (HASH_IMR) ..... | 723 |
| 25.6.6 | HASH status register (HASH_SR) ..... | 723 |
| 25.6.7 | HASH context swap registers ..... | 724 |
| 25.6.8 | HASH register map ..... | 725 |
| 26 | Advanced-control timers (TIM1) ..... | 727 |
| 26.1 | TIM1 introduction ..... | 727 |
| 26.2 | TIM1 main features ..... | 728 |
| 26.3 | TIM1 functional description ..... | 729 |
| 26.3.1 | Block diagram ..... | 729 |
| 26.3.2 | TIM1 pins and internal signals ..... | 730 |
| 26.3.3 | Time-base unit ..... | 734 |
| 26.3.4 | Counter modes ..... | 736 |
| 26.3.5 | Repetition counter ..... | 748 |
| 26.3.6 | External trigger input ..... | 749 |
| 26.3.7 | Clock selection ..... | 750 |
| 26.3.8 | Capture/compare channels ..... | 754 |
| 26.3.9 | Input capture mode ..... | 757 |
| 26.3.10 | PWM input mode ..... | 758 |
| 26.3.11 | Forced output mode ..... | 759 |
| 26.3.12 | Output compare mode ..... | 759 |
| 26.3.13 | PWM mode ..... | 761 |
| 26.3.14 | Asymmetric PWM mode ..... | 769 |
| 26.3.15 | Combined PWM mode ..... | 770 |
| 26.3.16 | Combined 3-phase PWM mode ..... | 771 |
| 26.3.17 | Complementary outputs and dead-time insertion ..... | 772 |
| 26.3.18 | Using the break function ..... | 775 |
| 26.3.19 | Bidirectional break inputs ..... | 781 |
| 26.3.20 | Clearing the tim_ocxref signal on an external event ..... | 782 |
| 26.3.21 | 6-step PWM generation ..... | 784 |
| 26.3.22 | One-pulse mode ..... | 785 |
| 26.3.23 | Retriggerable One-pulse mode ..... | 787 |
| 26.3.24 | Pulse on compare mode ..... | 788 |
| 26.3.25 | Encoder interface mode ..... | 790 |
| 26.3.26 | Direction bit output ..... | 807 |
| 26.3.27 | UIF bit remapping ..... | 808 |
| 26.3.28 | Timer input XOR function ..... | 808 |
| 26.3.29 | Interfacing with Hall sensors ..... | 808 |
| 26.3.30 | Timer synchronization ..... | 810 |
| 26.3.31 | ADC triggers ..... | 815 |
| 26.3.32 | DMA burst mode ..... | 815 |
| 26.3.33 | TIM1 DMA requests ..... | 816 |
| 26.3.34 | Debug mode ..... | 816 |
| 26.4 | TIM1 low-power modes ..... | 817 |
| 26.5 | TIM1 interrupts ..... | 817 |
| 26.6 | TIM1 registers ..... | 818 |
| 26.6.1 | TIM1 control register 1 (TIM1_CR1) ..... | 818 |
| 26.6.2 | TIM1 control register 2 (TIM1_CR2) ..... | 819 |
| 26.6.3 | TIM1 slave mode control register (TIM1_SMCR) ..... | 823 |
| 26.6.4 | TIM1 DMA/interrupt enable register (TIM1_DIER) ..... | 827 |
| 26.6.5 | TIM1 status register (TIM1_SR) ..... | 828 |
| 26.6.6 | TIM1 event generation register (TIM1_EGR) ..... | 831 |
| 26.6.7 | TIM1 capture/compare mode register 1 (TIM1_CCMR1) ..... | 832 |
| 26.6.8 | TIM1 capture/compare mode register 1 [alternate] (TIM1_CCMR1) ..... | 834 |
| 26.6.9 | TIM1 capture/compare mode register 2 (TIM1_CCMR2) ..... | 837 |
| 26.6.10 | TIM1 capture/compare mode register 2 [alternate] (TIM1_CCMR2) ..... | 838 |
| 26.6.11 | TIM1 capture/compare enable register (TIM1_CCER) ..... | 841 |
| 26.6.12 | TIM1 counter (TIM1_CNT) ..... | 845 |
| 26.6.13 | TIM1 prescaler (TIM1_PSC) ..... | 845 |
| 26.6.14 | TIM1 autoreload register (TIM1_ARR) ..... | 846 |
| 26.6.15 | TIM1 repetition counter register (TIM1_RCR) ..... | 846 |
| 26.6.16 | TIM1 capture/compare register 1 (TIM1_CCR1) ..... | 847 |
| 26.6.17 | TIM1 capture/compare register 2 (TIM1_CCR2) ..... | 847 |
| 26.6.18 | TIM1 capture/compare register 3 (TIM1_CCR3) ..... | 848 |
| 26.6.19 | TIM1 capture/compare register 4 (TIM1_CCR4) ..... | 849 |
| 26.6.20 | TIM1 break and dead-time register (TIM1_BDTR) ..... | 850 |
| 26.6.21 | TIM1 capture/compare register 5 (TIM1_CCR5) ..... | 854 |
| 26.6.22 | TIM1 capture/compare register 6 (TIM1_CCR6) ..... | 855 |
| 26.6.23 | TIM1 capture/compare mode register 3 (TIM1_CCMR3) ..... | 856 |
| 26.6.24 | TIM1 timer deadtime register 2 (TIM1_DTR2) ..... | 857 |
| 26.6.25 | TIM1 timer encoder control register (TIM1_ECR) ..... | 858 |
| 26.6.26 | TIM1 timer input selection register (TIM1_TISEL) ..... | 859 |
| 26.6.27 | TIM1 alternate function option register 1 (TIM1_AF1) ..... | 860 |
| 26.6.28 | TIM1 alternate function register 2 (TIM1_AF2) ..... | 863 |
| 26.6.29 | TIM1 DMA control register (TIM1_DCR) ..... | 865 |
| 26.6.30 | TIM1 DMA address for full transfer (TIM1_DMAR) ..... | 867 |
| 26.6.31 | TIM1 register map ..... | 867 |
| 27 | General-purpose timers (TIM2/TIM3) ..... | 870 |
| 27.1 | TIM2/TIM3 introduction ..... | 870 |
| 27.2 | TIM2/TIM3 main features ..... | 870 |
| 27.3 | TIM2/TIM3 implementation ..... | 871 |
| 27.4 | TIM2/TIM3 functional description ..... | 872 |
| 27.4.1 | Block diagram ..... | 872 |
| 27.4.2 | TIM2/TIM3 pins and internal signals ..... | 873 |
| 27.4.3 | Time-base unit ..... | 876 |
| 27.4.4 | Counter modes ..... | 878 |
| 27.4.5 | Clock selection ..... | 889 |
| 27.4.6 | Capture/compare channels ..... | 893 |
| 27.4.7 | Input capture mode ..... | 895 |
| 27.4.8 | PWM input mode ..... | 896 |
| 27.4.9 | Forced output mode ..... | 897 |
| 27.4.10 | Output compare mode ..... | 897 |
| 27.4.11 | PWM mode ..... | 899 |
| 27.4.12 | Asymmetric PWM mode ..... | 907 |
| 27.4.13 | Combined PWM mode ..... | 908 |
| 27.4.14 | Clearing the tim_ocxref signal on an external event ..... | 909 |
| 27.4.15 | One-pulse mode ..... | 911 |
| 27.4.16 | Retriggerable one-pulse mode ..... | 912 |
| 27.4.17 | Pulse on compare mode ..... | 913 |
| 27.4.18 | Encoder interface mode ..... | 915 |
| 27.4.19 | Direction bit output ..... | 933 |
| 27.4.20 | UIF bit remapping ..... | 934 |
| 27.4.21 | Timer input XOR function ..... | 934 |
| 27.4.22 | Timers and external trigger synchronization ..... | 934 |
| 27.4.23 | Timer synchronization | 938 |
| 27.4.24 | ADC triggers | 943 |
| 27.4.25 | DMA burst mode | 944 |
| 27.4.26 | TIM2/TIM3 DMA requests | 945 |
| 27.4.27 | Debug mode | 945 |
| 27.4.28 | TIM2/TIM3 low-power modes | 945 |
| 27.4.29 | TIM2/TIM3 interrupts | 946 |
| 27.5 | TIM2/TIM3 registers | 947 |
| 27.5.1 | TIMx control register 1 (TIMx_CR1)(x = 2, 3) | 947 |
| 27.5.2 | TIMx control register 2 (TIMx_CR2)(x = 2, 3) | 948 |
| 27.5.3 | TIMx slave mode control register (TIMx_SMCR)(x = 2, 3) | 950 |
| 27.5.4 | TIMx DMA/Interrupt enable register (TIMx_DIER)(x = 2, 3) | 954 |
| 27.5.5 | TIMx status register (TIMx_SR)(x = 2, 3) | 955 |
| 27.5.6 | TIMx event generation register (TIMx_EGR)(x = 2, 3) | 957 |
| 27.5.7 | TIMx capture/compare mode register 1 (TIMx_CCMR1)(x = 2, 3) | 958 |
| 27.5.8 | TIMx capture/compare mode register 1 [alternate] (TIMx_CCMR1)(x = 2, 3) | 960 |
| 27.5.9 | TIMx capture/compare mode register 2 (TIMx_CCMR2)(x = 2, 3) | 962 |
| 27.5.10 | TIMx capture/compare mode register 2 [alternate] (TIMx_CCMR2)(x = 2, 3) | 963 |
| 27.5.11 | TIMx capture/compare enable register (TIMx_CCER)(x = 2, 3) | 966 |
| 27.5.12 | TIM3 counter (TIM3_CNT) | 967 |
| 27.5.13 | TIM2 counter (TIM2_CNT) | 968 |
| 27.5.14 | TIMx prescaler (TIMx_PSC)(x = 2, 3) | 968 |
| 27.5.15 | TIM3 autoreload register (TIM3_ARR) | 969 |
| 27.5.16 | TIM2 autoreload register (TIM2_ARR) | 969 |
| 27.5.17 | TIM3 capture/compare register 1 (TIM3_CCR1) | 970 |
| 27.5.18 | TIM2 capture/compare register 1 (TIM2_CCR1) | 971 |
| 27.5.19 | TIM3 capture/compare register 2 (TIM3_CCR2) | 971 |
| 27.5.20 | TIM2 capture/compare register 2 (TIM2_CCR2) | 972 |
| 27.5.21 | TIM3 capture/compare register 3 (TIM3_CCR3) | 973 |
| 27.5.22 | TIM2 capture/compare register 3 (TIM2_CCR3) | 974 |
| 27.5.23 | TIM3 capture/compare register 4 (TIM3_CCR4) | 975 |
| 27.5.24 | TIM2 capture/compare register 4 (TIM2_CCR4) | 976 |
| 27.5.25 | TIMx timer encoder control register (TIMx_ECR)(x = 2, 3) | 977 |
| 27.5.26 | TIMx timer input selection register (TIMx_TISEL)(x = 2, 3) | 978 |
| 27.5.27 | TIMx alternate function register 1 (TIMx_AF1)(x = 2, 3) | 979 |
| 27.5.28 | TIMx alternate function register 2 (TIMx_AF2)(x = 2, 3) ..... | 980 |
| 27.5.29 | TIMx DMA control register (TIMx_DCR)(x = 2, 3) ..... | 981 |
| 27.5.30 | TIMx DMA address for full transfer (TIMx_DMAR)(x = 2, 3) ..... | 982 |
| 27.5.31 | TIMx register map ..... | 983 |
| 28 | Basic timers (TIM6/TIM7) ..... | 986 |
| 28.1 | TIM6/TIM7 introduction ..... | 986 |
| 28.2 | TIM6/TIM7 main features ..... | 986 |
| 28.3 | TIM6/TIM7 functional description ..... | 987 |
| 28.3.1 | TIM6/TIM7 block diagram ..... | 987 |
| 28.3.2 | TIM6/TIM7 internal signals ..... | 987 |
| 28.3.3 | TIM6/TIM7 clocks ..... | 988 |
| 28.3.4 | Time-base unit ..... | 988 |
| 28.3.5 | Counting mode ..... | 990 |
| 28.3.6 | UIF bit remapping ..... | 997 |
| 28.3.7 | ADC triggers ..... | 998 |
| 28.3.8 | TIM6/TIM7 DMA requests ..... | 998 |
| 28.3.9 | Debug mode ..... | 998 |
| 28.3.10 | TIM6/TIM7 low-power modes ..... | 998 |
| 28.3.11 | TIM6/TIM7 interrupts ..... | 998 |
| 28.4 | TIM6/TIM7 registers ..... | 999 |
| 28.4.1 | TIMx control register 1 (TIMx_CR1)(x = 6 to 7) ..... | 999 |
| 28.4.2 | TIMx control register 2 (TIMx_CR2)(x = 6 to 7) ..... | 1001 |
| 28.4.3 | TIMx DMA/Interrupt enable register (TIMx_DIER)(x = 6 to 7) ..... | 1001 |
| 28.4.4 | TIMx status register (TIMx_SR)(x = 6 to 7) ..... | 1002 |
| 28.4.5 | TIMx event generation register (TIMx_EGR)(x = 6 to 7) ..... | 1002 |
| 28.4.6 | TIMx counter (TIMx_CNT)(x = 6 to 7) ..... | 1002 |
| 28.4.7 | TIMx prescaler (TIMx_PSC)(x = 6 to 7) ..... | 1003 |
| 28.4.8 | TIMx autoreload register (TIMx_ARR)(x = 6 to 7) ..... | 1003 |
| 28.4.9 | TIMx register map ..... | 1004 |
| 29 | Low-power timer (LPTIM) ..... | 1005 |
| 29.1 | Introduction ..... | 1005 |
| 29.2 | LPTIM main features ..... | 1005 |
| 29.3 | LPTIM implementation ..... | 1005 |
| 29.4 | LPTIM functional description ..... | 1007 |
| 29.4.1 | LPTIM block diagram | 1007 |
| 29.4.2 | LPTIM pins and internal signals | 1007 |
| 29.4.3 | LPTIM input and trigger mapping | 1009 |
| 29.4.4 | LPTIM reset and clocks | 1010 |
| 29.4.5 | Glitch filter | 1010 |
| 29.4.6 | Prescaler | 1011 |
| 29.4.7 | Trigger multiplexer | 1011 |
| 29.4.8 | Operating mode | 1012 |
| 29.4.9 | Timeout function | 1014 |
| 29.4.10 | Waveform generation | 1014 |
| 29.4.11 | Register update | 1015 |
| 29.4.12 | Counter mode | 1016 |
| 29.4.13 | Timer enable | 1017 |
| 29.4.14 | Timer counter reset | 1017 |
| 29.4.15 | Encoder mode | 1018 |
| 29.4.16 | Repetition counter | 1019 |
| 29.4.17 | Capture/compare channels | 1020 |
| 29.4.18 | Input capture mode | 1021 |
| 29.4.19 | PWM mode | 1023 |
| 29.4.20 | DMA requests | 1025 |
| 29.4.21 | Debug mode | 1026 |
| 29.5 | LPTIM low-power modes | 1026 |
| 29.6 | LPTIM interrupts | 1026 |
| 29.7 | LPTIM registers | 1027 |
| 29.7.1 | LPTIMx interrupt and status register [alternate] (LPTIMx_ISR) (x = 1, 2) | 1028 |
| 29.7.2 | LPTIMx interrupt and status register [alternate] (LPTIMx_ISR) (x = 1, 2) | 1030 |
| 29.7.3 | LPTIMx interrupt clear register [alternate] (LPTIMx_ICR) (x = 1, 2) | 1032 |
| 29.7.4 | LPTIMx interrupt clear register [alternate] (LPTIMx_ICR) (x = 1, 2) | 1033 |
| 29.7.5 | LPTIMx interrupt enable register [alternate] (LPTIMx_DIER) (x = 1, 2) | 1035 |
| 29.7.6 | LPTIMx interrupt enable register [alternate] (LPTIMx_DIER) (x = 1, 2) | 1036 |
| 29.7.7 | LPTIM configuration register (LPTIM_CFGR) | 1038 |
| 29.7.8 | LPTIM control register (LPTIM_CR) | 1041 |
| 29.7.9 | LPTIM compare register 1 (LPTIM_CCR1) ..... | 1042 |
| 29.7.10 | LPTIM autoreload register (LPTIM_ARR) ..... | 1042 |
| 29.7.11 | LPTIM counter register (LPTIM_CNT) ..... | 1043 |
| 29.7.12 | LPTIM configuration register 2 (LPTIM_CFGR2) ..... | 1043 |
| 29.7.13 | LPTIM repetition register (LPTIM_RCR) ..... | 1044 |
| 29.7.14 | LPTIM capture/compare mode register 1 (LPTIM_CCMR1) ..... | 1045 |
| 29.7.15 | LPTIM compare register 2 (LPTIM_CCR2) ..... | 1047 |
| 29.7.16 | LPTIM register map ..... | 1048 |
| 30 | Independent watchdog (IWDG) ..... | 1050 |
| 30.1 | Introduction ..... | 1050 |
| 30.2 | IWDG main features ..... | 1050 |
| 30.3 | IWDG implementation ..... | 1050 |
| 30.4 | IWDG functional description ..... | 1051 |
| 30.4.1 | IWDG block diagram ..... | 1051 |
| 30.4.2 | IWDG internal signals ..... | 1052 |
| 30.4.3 | Software and hardware watchdog modes ..... | 1052 |
| 30.4.4 | Window option ..... | 1053 |
| 30.4.5 | Debug ..... | 1056 |
| 30.4.6 | Register access protection ..... | 1056 |
| 30.5 | IWDG low power modes ..... | 1057 |
| 30.6 | IWDG interrupts ..... | 1057 |
| 30.7 | IWDG registers ..... | 1059 |
| 30.7.1 | IWDG key register (IWDG_KR) ..... | 1060 |
| 30.7.2 | IWDG prescaler register (IWDG_PR) ..... | 1060 |
| 30.7.3 | IWDG reload register (IWDG_RLR) ..... | 1061 |
| 30.7.4 | IWDG status register (IWDG_SR) ..... | 1061 |
| 30.7.5 | IWDG window register (IWDG_WINR) ..... | 1063 |
| 30.7.6 | IWDG early wake-up interrupt register (IWDG_EWCR) ..... | 1063 |
| 30.7.7 | IWDG register map ..... | 1065 |
| 31 | System window watchdog (WWDG) ..... | 1066 |
| 31.1 | Introduction ..... | 1066 |
| 31.2 | WWDG main features ..... | 1066 |
| 31.3 | WWDG implementation ..... | 1066 |
| 31.4 | WWDG functional description ..... | 1067 |
| 31.4.1 | WWDG block diagram | 1067 |
| 31.4.2 | WWDG internal signals | 1067 |
| 31.4.3 | Enabling the watchdog | 1068 |
| 31.4.4 | Controlling the down-counter | 1068 |
| 31.4.5 | How to program the watchdog timeout | 1068 |
| 31.4.6 | Debug mode | 1069 |
| 31.5 | WWDG interrupts | 1070 |
| 31.6 | WWDG registers | 1070 |
| 31.6.1 | WWDG control register (WWDG_CR) | 1070 |
| 31.6.2 | WWDG configuration register (WWDG_CFR) | 1071 |
| 31.6.3 | WWDG status register (WWDG_SR) | 1072 |
| 31.6.4 | WWDG register map | 1072 |
| 32 | Real-time clock (RTC) | 1073 |
| 32.1 | Introduction | 1073 |
| 32.2 | RTC main features | 1073 |
| 32.3 | RTC functional description | 1073 |
| 32.3.1 | RTC block diagram | 1073 |
| 32.3.2 | RTC pins and internal signals | 1075 |
| 32.3.3 | GPIOs controlled by the RTC and TAMP | 1076 |
| 32.3.4 | RTC privilege protection modes | 1079 |
| 32.3.5 | Clock and prescalers | 1080 |
| 32.3.6 | Real-time clock and calendar | 1081 |
| 32.3.7 | Calendar ultra-low power mode | 1082 |
| 32.3.8 | Programmable alarms | 1082 |
| 32.3.9 | Periodic auto-wake-up | 1082 |
| 32.3.10 | RTC initialization and configuration | 1083 |
| 32.3.11 | Reading the calendar | 1086 |
| 32.3.12 | Resetting the RTC | 1087 |
| 32.3.13 | RTC synchronization | 1087 |
| 32.3.14 | RTC reference clock detection | 1088 |
| 32.3.15 | RTC smooth digital calibration | 1089 |
| 32.3.16 | Timestamp function | 1091 |
| 32.3.17 | Calibration clock output | 1091 |
| 32.3.18 | Tamper and alarm output | 1092 |
| 32.4 | RTC low-power modes | 1092 |
| 32.5 | RTC interrupts | 1093 |
| 32.6 | RTC registers | 1093 |
| 32.6.1 | RTC time register (RTC_TR) | 1094 |
| 32.6.2 | RTC date register (RTC_DR) | 1095 |
| 32.6.3 | RTC subsecond register (RTC_SSR) | 1096 |
| 32.6.4 | RTC initialization control and status register (RTC_ICSR) | 1096 |
| 32.6.5 | RTC prescaler register (RTC_PRER) | 1098 |
| 32.6.6 | RTC wake-up timer register (RTC_WUTR) | 1099 |
| 32.6.7 | RTC control register (RTC_CR) | 1099 |
| 32.6.8 | RTC privilege mode control register (RTC_PRIVCFGR) | 1103 |
| 32.6.9 | RTC write protection register (RTC_WPR) | 1105 |
| 32.6.10 | RTC calibration register (RTC_CALR) | 1105 |
| 32.6.11 | RTC shift control register (RTC_SHIFTR) | 1107 |
| 32.6.12 | RTC timestamp time register (RTC_TSTR) | 1108 |
| 32.6.13 | RTC timestamp date register (RTC_TSDR) | 1109 |
| 32.6.14 | RTC timestamp subsecond register (RTC_TSSSR) | 1109 |
| 32.6.15 | RTC alarm A register (RTC_ALRMAR) | 1110 |
| 32.6.16 | RTC alarm A subsecond register (RTC_ALRMASR) | 1111 |
| 32.6.17 | RTC alarm B register (RTC_ALRMBR) | 1112 |
| 32.6.18 | RTC alarm B subsecond register (RTC_ALRMBSSR) | 1113 |
| 32.6.19 | RTC status register (RTC_SR) | 1114 |
| 32.6.20 | RTC masked interrupt status register (RTC_MISR) | 1116 |
| 32.6.21 | RTC status clear register (RTC_SCR) | 1117 |
| 32.6.22 | RTC alarm A binary mode register (RTC_ALRABINR) | 1118 |
| 32.6.23 | RTC alarm B binary mode register (RTC_ALRBBINR) | 1118 |
| 32.6.24 | RTC register map | 1120 |
| 33 | Tamper and backup registers (TAMP) | 1122 |
| 33.1 | Introduction | 1122 |
| 33.2 | TAMP main features | 1122 |
| 33.3 | TAMP functional description | 1123 |
| 33.3.1 | TAMP block diagram | 1123 |
| 33.3.2 | TAMP pins and internal signals | 1124 |
| 33.3.3 | GPIOs controlled by the RTC and TAMP | 1126 |
| 33.3.4 | TAMP register write protection | 1126 |
| 33.3.5 | Backup registers protection zones | 1127 |
| 33.3.6 | TAMP privilege protection modes | 1127 |
| 33.3.7 | Tamper detection ..... | 1127 |
| 33.3.8 | TAMP backup registers and other device secrets erase ..... | 1128 |
| 33.3.9 | Tamper detection configuration and initialization ..... | 1130 |
| 33.4 | TAMP low-power modes ..... | 1136 |
| 33.5 | TAMP interrupts ..... | 1137 |
| 33.6 | TAMP registers ..... | 1137 |
| 33.6.1 | TAMP control register 1 (TAMP_CR1) ..... | 1137 |
| 33.6.2 | TAMP control register 2 (TAMP_CR2) ..... | 1139 |
| 33.6.3 | TAMP control register 3 (TAMP_CR3) ..... | 1140 |
| 33.6.4 | TAMP filter control register (TAMP_FLTCR) ..... | 1142 |
| 33.6.5 | TAMP active tamper control register 1 (TAMP_ATCR1) ..... | 1143 |
| 33.6.6 | TAMP active tamper seed register (TAMP_ATSEEDR) ..... | 1145 |
| 33.6.7 | TAMP active tamper output register (TAMP_ATOMR) ..... | 1146 |
| 33.6.8 | TAMP active tamper control register 2 (TAMP_ATCR2) ..... | 1147 |
| 33.6.9 | TAMP configuration register (TAMP_CFGR) ..... | 1148 |
| 33.6.10 | TAMP privilege configuration register (TAMP_PRIVCFGR) ..... | 1149 |
| 33.6.11 | TAMP interrupt enable register (TAMP_IER) ..... | 1150 |
| 33.6.12 | TAMP status register (TAMP_SR) ..... | 1151 |
| 33.6.13 | TAMP masked interrupt status register (TAMP_MISR) ..... | 1153 |
| 33.6.14 | TAMP status clear register (TAMP_SCR) ..... | 1155 |
| 33.6.15 | TAMP monotonic counter 1 register (TAMP_COUNT1R) ..... | 1157 |
| 33.6.16 | TAMP resources protection configuration register (TAMP_RPCFGR) ..... | 1157 |
| 33.6.17 | TAMP backup x register (TAMP_BKPxR) ..... | 1158 |
| 33.6.18 | TAMP register map ..... | 1159 |
| 34 | Inter-integrated circuit interface (I2C) ..... | 1161 |
| 34.1 | Introduction ..... | 1161 |
| 34.2 | I2C main features ..... | 1161 |
| 34.3 | I2C implementation ..... | 1162 |
| 34.4 | I2C functional description ..... | 1162 |
| 34.4.1 | I2C block diagram ..... | 1163 |
| 34.4.2 | I2C pins and internal signals ..... | 1163 |
| 34.4.3 | I2C clock requirements ..... | 1164 |
| 34.4.4 | I2C mode selection ..... | 1164 |
| 34.4.5 | I2C initialization ..... | 1165 |
| 34.4.6 | I2C reset ..... | 1169 |
| 34.4.7 | I2C data transfer | 1170 |
| 34.4.8 | I2C target mode | 1172 |
| 34.4.9 | I2C controller mode | 1181 |
| 34.4.10 | I2C_TIMINGR register configuration examples | 1192 |
| 34.4.11 | SMBus specific features | 1194 |
| 34.4.12 | SMBus initialization | 1196 |
| 34.4.13 | SMBus I2C_TIMEOUTR register configuration examples | 1198 |
| 34.4.14 | SMBus target mode | 1199 |
| 34.4.15 | SMBus controller mode | 1202 |
| 34.4.16 | Wake-up from Stop mode on address match | 1205 |
| 34.4.17 | Error conditions | 1206 |
| 34.5 | I2C in low-power modes | 1208 |
| 34.6 | I2C interrupts | 1208 |
| 34.7 | I2C DMA requests | 1209 |
| 34.7.1 | Transmission using DMA | 1209 |
| 34.7.2 | Reception using DMA | 1209 |
| 34.8 | I2C debug modes | 1209 |
| 34.9 | I2C registers | 1210 |
| 34.9.1 | I2C control register 1 (I2C_CR1) | 1210 |
| 34.9.2 | I2C control register 2 (I2C_CR2) | 1213 |
| 34.9.3 | I2C own address 1 register (I2C_OAR1) | 1215 |
| 34.9.4 | I2C own address 2 register (I2C_OAR2) | 1215 |
| 34.9.5 | I2C timing register (I2C_TIMINGR) | 1216 |
| 34.9.6 | I2C timeout register (I2C_TIMEOUTR) | 1217 |
| 34.9.7 | I2C interrupt and status register (I2C_ISR) | 1218 |
| 34.9.8 | I2C interrupt clear register (I2C_ICR) | 1221 |
| 34.9.9 | I2C PEC register (I2C_PECR) | 1222 |
| 34.9.10 | I2C receive data register (I2C_RXDR) | 1222 |
| 34.9.11 | I2C transmit data register (I2C_TXDR) | 1223 |
| 34.9.12 | I2C register map | 1224 |
| 35 | Improved inter-integrated circuit (I3C) | 1225 |
| 35.1 | Introduction | 1225 |
| 35.2 | I3C main features | 1225 |
| 35.3 | I3C implementation | 1227 |
| 35.3.1 | I3C instantiation | 1227 |
| 35.3.2 | I3C wake-up from low-power mode(s) . . . . . | 1227 |
| 35.3.3 | I3C FIFOs . . . . . | 1227 |
| 35.3.4 | I3C triggers . . . . . | 1227 |
| 35.3.5 | I3C interrupt(s) . . . . . | 1227 |
| 35.3.6 | I3C MIPI® support . . . . . | 1228 |
| 35.4 | I3C block diagram . . . . . | 1229 |
| 35.5 | I3C pins and internal signals . . . . . | 1229 |
| 35.6 | I3C reset and clocks . . . . . | 1230 |
| 35.6.1 | I3C reset . . . . . | 1230 |
| 35.6.2 | I3C clocks and requirements . . . . . | 1230 |
| 35.7 | I3C peripheral state and programming . . . . . | 1232 |
| 35.7.1 | I3C peripheral state . . . . . | 1232 |
| 35.7.2 | I3C controller state and programming sequence . . . . . | 1232 |
| 35.7.3 | I3C target state and programming sequence . . . . . | 1237 |
| 35.8 | I3C registers and programming . . . . . | 1241 |
| 35.8.1 | I3C register set, as controller/target . . . . . | 1241 |
| 35.8.2 | I3C registers and fields use versus peripheral state, as controller . . . . . | 1242 |
| 35.8.3 | I3C registers and fields usage versus peripheral state, as target . . . . . | 1245 |
| 35.9 | I3C bus transfers and programming . . . . . | 1247 |
| 35.9.1 | I3C command set (CCCs), as controller/target . . . . . | 1247 |
| 35.9.2 | I3C broadcast/direct CCC transfer (except ENTDAA, RSTACT), as controller . . . . . | 1251 |
| 35.9.3 | I3C broadcast ENTDAA CCC transfer, as controller . . . . . | 1253 |
| 35.9.4 | I3C broadcast/direct RSTACT CCC transfer, as controller . . . . . | 1253 |
| 35.9.5 | I3C broadcast/direct CCC transfer (except ENTDAA, DEFTGTS, DEFGRPA), as target . . . . . | 1255 |
| 35.9.6 | I3C broadcast ENTDAA CCC transfer, as target . . . . . | 1257 |
| 35.9.7 | I3C broadcast DEFTGTS CCC transfer, as target . . . . . | 1258 |
| 35.9.8 | I3C broadcast DEFGRPA CCC transfer, as target . . . . . | 1259 |
| 35.9.9 | I3C direct GETSTATUS CCC response, as target . . . . . | 1260 |
| 35.9.10 | I3C private read/write transfer, as controller . . . . . | 1261 |
| 35.9.11 | I3C private read/write transfer, as target . . . . . | 1262 |
| 35.9.12 | Legacy I2C read/write transfer, as controller . . . . . | 1263 |
| 35.9.13 | I3C IBI transfer, as controller/target . . . . . | 1264 |
| 35.9.14 | I3C hot-join request transfer, as controller/target . . . . . | 1265 |
| 35.9.15 | I3C controller-role request transfer, as controller/target . . . . . | 1266 |
| 35.10 | I3C FIFOs management, as controller . . . . . | 1267 |
| 35.10.1 | C-FIFO management, as controller | 1267 |
| 35.10.2 | TX-FIFO management, as controller | 1268 |
| 35.10.3 | RX-FIFO management, as controller | 1271 |
| 35.10.4 | S-FIFO management, as controller | 1273 |
| 35.11 | I3C FIFOs management, as target | 1275 |
| 35.11.1 | RX-FIFO management, as target | 1275 |
| 35.11.2 | TX-FIFO management, as target | 1276 |
| 35.12 | I3C error management | 1279 |
| 35.12.1 | Controller error management | 1279 |
| 35.12.2 | Target error management | 1281 |
| 35.13 | I3C wake-up from low-power mode(s) | 1282 |
| 35.13.1 | Wake-up from Stop | 1282 |
| 35.14 | I3C in low-power modes | 1285 |
| 35.15 | I3C interrupts | 1286 |
| 35.16 | I3C registers | 1287 |
| 35.16.1 | I3C message control register (I3C_CR) | 1287 |
| 35.16.2 | I3C message control register [alternate] (I3C_CR) | 1289 |
| 35.16.3 | I3C configuration register (I3C_CFGR) | 1291 |
| 35.16.4 | I3C receive data byte register (I3C_RDR) | 1296 |
| 35.16.5 | I3C receive data word register (I3C_RDWR) | 1296 |
| 35.16.6 | I3C transmit data byte register (I3C_TDR) | 1297 |
| 35.16.7 | I3C transmit data word register (I3C_TDWR) | 1298 |
| 35.16.8 | I3C IBI payload data register (I3C_IBIDR) | 1300 |
| 35.16.9 | I3C target transmit configuration register (I3C_TGTTDR) | 1301 |
| 35.16.10 | I3C status register (I3C_SR) | 1302 |
| 35.16.11 | I3C status error register (I3C_SER) | 1303 |
| 35.16.12 | I3C received message register (I3C_RMR) | 1305 |
| 35.16.13 | I3C event register (I3C_EVR) | 1306 |
| 35.16.14 | I3C interrupt enable register (I3C_IER) | 1310 |
| 35.16.15 | I3C clear event register (I3C_CEV) | 1312 |
| 35.16.16 | I3C own device characteristics register (I3C_DEVR0) | 1314 |
| 35.16.17 | I3C device x characteristics register (I3C_DEVRx) | 1316 |
| 35.16.18 | I3C maximum read length register (I3C_MAXRLR) | 1318 |
| 35.16.19 | I3C maximum write length register (I3C_MAXWLR) | 1319 |
| 35.16.20 | I3C timing register 0 (I3C_TIMINGR0) | 1320 |
| 35.16.21 | I3C timing register 1 (I3C_TIMINGR1) | 1321 |
| 35.16.22 | I3C timing register 2 (I3C_TIMINGR2) ..... | 1323 |
| 35.16.23 | I3C bus characteristics register (I3C_BCR) ..... | 1324 |
| 35.16.24 | I3C device characteristics register (I3C_DCR) ..... | 1325 |
| 35.16.25 | I3C get capability register (I3C_GETCAPR) ..... | 1326 |
| 35.16.26 | I3C controller-role capability register (I3C_CRCAPR) ..... | 1327 |
| 35.16.27 | I3C get max data speed register (I3C_GETMXDSR) ..... | 1328 |
| 35.16.28 | I3C extended provisioned ID register (I3C_EPIDR) ..... | 1330 |
| 35.16.29 | I3C register map ..... | 1331 |
| 36 | Universal synchronous/asynchronous receiver transmitter (USART/UART) ..... | 1334 |
| 36.1 | Introduction ..... | 1334 |
| 36.2 | USART main features ..... | 1334 |
| 36.3 | USART extended features ..... | 1335 |
| 36.4 | USART implementation ..... | 1335 |
| 36.5 | USART functional description ..... | 1337 |
| 36.5.1 | USART block diagram ..... | 1337 |
| 36.5.2 | USART pins and internal signals ..... | 1337 |
| 36.5.3 | USART clocks ..... | 1339 |
| 36.5.4 | USART character description ..... | 1339 |
| 36.5.5 | USART FIFOs and thresholds ..... | 1342 |
| 36.5.6 | USART transmitter ..... | 1342 |
| 36.5.7 | USART receiver ..... | 1345 |
| 36.5.8 | USART baud rate generation ..... | 1352 |
| 36.5.9 | Tolerance of the USART receiver to clock deviation ..... | 1354 |
| 36.5.10 | USART auto baud rate detection ..... | 1355 |
| 36.5.11 | USART multiprocessor communication ..... | 1357 |
| 36.5.12 | USART Modbus communication ..... | 1359 |
| 36.5.13 | USART parity control ..... | 1360 |
| 36.5.14 | USART LIN (local interconnection network) mode ..... | 1361 |
| 36.5.15 | USART synchronous mode ..... | 1363 |
| 36.5.16 | USART single-wire half-duplex communication ..... | 1367 |
| 36.5.17 | USART receiver timeout ..... | 1367 |
| 36.5.18 | USART smartcard mode ..... | 1368 |
| 36.5.19 | USART IrDA SIR ENDEC block ..... | 1372 |
| 36.5.20 | Continuous communication using USART and DMA ..... | 1375 |
| 36.5.21 | RS232 hardware flow control and RS485 driver enable ..... | 1377 |
| 36.5.22 | USART low-power management | 1380 |
| 36.6 | USART in low-power modes | 1383 |
| 36.7 | USART interrupts | 1383 |
| 36.8 | USART registers | 1386 |
| 36.8.1 | USART control register 1 (USART_CR1) | 1386 |
| 36.8.2 | USART control register 1 [alternate] (USART_CR1) | 1390 |
| 36.8.3 | USART control register 2 (USART_CR2) | 1393 |
| 36.8.4 | USART control register 3 (USART_CR3) | 1397 |
| 36.8.5 | USART control register 3 [alternate] (USART_CR3) | 1401 |
| 36.8.6 | USART baud rate register (USART_BRR) | 1405 |
| 36.8.7 | USART guard time and prescaler register (USART_GTPR) | 1405 |
| 36.8.8 | USART receiver timeout register (USART_RTOR) | 1406 |
| 36.8.9 | USART request register (USART_RQR) | 1407 |
| 36.8.10 | USART interrupt and status register (USART_ISR) | 1408 |
| 36.8.11 | USART interrupt and status register [alternate] (USART_ISR) | 1414 |
| 36.8.12 | USART interrupt flag clear register (USART_ICR) | 1419 |
| 36.8.13 | USART receive data register (USART_RDR) | 1420 |
| 36.8.14 | USART transmit data register (USART_TDR) | 1421 |
| 36.8.15 | USART prescaler register (USART_PRESC) | 1421 |
| 36.8.16 | USART register map | 1422 |
| 37 | Low-power universal asynchronous receiver transmitter (LPUART) | 1424 |
| 37.1 | Introduction | 1424 |
| 37.2 | LPUART main features | 1424 |
| 37.3 | LPUART implementation | 1425 |
| 37.4 | LPUART functional description | 1426 |
| 37.4.1 | LPUART block diagram | 1426 |
| 37.4.2 | LPUART pins and internal signals | 1427 |
| 37.4.3 | LPUART clocks | 1428 |
| 37.4.4 | LPUART character description | 1428 |
| 37.4.5 | LPUART FIFOs and thresholds | 1430 |
| 37.4.6 | LPUART transmitter | 1430 |
| 37.4.7 | LPUART receiver | 1434 |
| 37.4.8 | LPUART baud rate generation | 1438 |
| 37.4.9 | Tolerance of the LPUART receiver to clock deviation | 1439 |
| 37.4.10 | LPUART multiprocessor communication | 1440 |
| 37.4.11 | LPUART parity control | 1442 |
| 37.4.12 | LPUART single-wire half-duplex communication | 1443 |
| 37.4.13 | Continuous communication using DMA and LPUART | 1443 |
| 37.4.14 | RS232 hardware flow control and RS485 driver enable | 1446 |
| 37.4.15 | LPUART low-power management | 1448 |
| 37.5 | LPUART in low-power modes | 1451 |
| 37.6 | LPUART interrupts | 1452 |
| 37.7 | LPUART registers | 1453 |
| 37.7.1 | LPUART control register 1 (LPUART_CR1) | 1453 |
| 37.7.2 | LPUART control register 1 [alternate] (LPUART_CR1) | 1456 |
| 37.7.3 | LPUART control register 2 (LPUART_CR2) | 1459 |
| 37.7.4 | LPUART control register 3 (LPUART_CR3) | 1461 |
| 37.7.5 | LPUART control register 3 [alternate] (LPUART_CR3) | 1464 |
| 37.7.6 | LPUART baud rate register (LPUART_BRR) | 1467 |
| 37.7.7 | LPUART request register (LPUART_RQR) | 1467 |
| 37.7.8 | LPUART interrupt and status register (LPUART_ISR) | 1468 |
| 37.7.9 | LPUART interrupt and status register [alternate] (LPUART_ISR) | 1472 |
| 37.7.10 | LPUART interrupt flag clear register (LPUART_ICR) | 1475 |
| 37.7.11 | LPUART receive data register (LPUART_RDR) | 1476 |
| 37.7.12 | LPUART transmit data register (LPUART_TDR) | 1477 |
| 37.7.13 | LPUART prescaler register (LPUART_PRESC) | 1477 |
| 37.7.14 | LPUART register map | 1478 |
| 38 | Serial peripheral interface (SPI) | 1480 |
| 38.1 | Introduction | 1480 |
| 38.2 | SPI main features | 1480 |
| 38.3 | SPI implementation | 1481 |
| 38.4 | SPI functional description | 1482 |
| 38.4.1 | SPI block diagram | 1482 |
| 38.4.2 | SPI pins and internal signals | 1483 |
| 38.4.3 | SPI communication general aspects | 1484 |
| 38.4.4 | Communications between one master and one slave | 1484 |
| 38.4.5 | Standard multislave communication | 1487 |
| 38.4.6 | Multimaster communication | 1490 |
| 38.4.7 | Slave select (SS) pin management | 1490 |
| 38.4.8 | Ready pin (RDY) management | 1494 |
| 38.4.9 | Communication formats | 1494 |
| 38.4.10 | Configuring the SPI | 1496 |
| 38.4.11 | Enabling the SPI | 1497 |
| 38.4.12 | SPI data transmission and reception procedures | 1498 |
| 38.4.13 | Disabling the SPI | 1502 |
| 38.4.14 | Communication using DMA (direct memory addressing) | 1503 |
| 38.5 | SPI specific modes and control | 1505 |
| 38.5.1 | TI mode | 1505 |
| 38.5.2 | SPI error flags | 1505 |
| 38.5.3 | CRC computation | 1509 |
| 38.6 | SPI in low-power modes | 1510 |
| 38.7 | SPI interrupts | 1510 |
| 38.8 | I2S main features | 1512 |
| 38.9 | I2S functional description | 1512 |
| 38.9.1 | I2S general description | 1512 |
| 38.9.2 | Pin sharing with SPI function | 1513 |
| 38.9.3 | Bitfields usable in I2S/PCM mode | 1513 |
| 38.9.4 | Slave and master modes | 1514 |
| 38.9.5 | Supported audio protocols | 1514 |
| 38.9.6 | Additional serial interface flexibility | 1520 |
| 38.9.7 | Startup sequence | 1522 |
| 38.9.8 | Stop sequence | 1524 |
| 38.9.9 | Clock generator | 1525 |
| 38.9.10 | Internal FIFOs | 1527 |
| 38.9.11 | FIFO status flags | 1528 |
| 38.9.12 | Handling of underrun situation | 1528 |
| 38.9.13 | Handling of overrun situation | 1529 |
| 38.9.14 | Frame error detection | 1530 |
| 38.9.15 | DMA interface | 1532 |
| 38.9.16 | Programing examples | 1532 |
| 38.10 | I2S interrupts | 1535 |
| 38.11 | SPI/I2S registers | 1535 |
| 38.11.1 | SPI/I2S control register 1 (SPI_CR1) | 1535 |
| 38.11.2 | SPI/I2S control register 2 (SPI_CR2) | 1537 |
| 38.11.3 | SPI/I2S configuration register 1 (SPI_CFG1) | 1538 |
| 38.11.4 | SPI/I2S configuration register 2 (SPI_CFG2) ..... | 1541 |
| 38.11.5 | SPI/I2S interrupt enable register (SPI_IER) ..... | 1543 |
| 38.11.6 | SPI/I2S status register (SPI_SR) ..... | 1544 |
| 38.11.7 | SPI/I2S interrupt/status flags clear register (SPI_IFCR) ..... | 1547 |
| 38.11.8 | SPI/I2S transmit data register (SPI_TXDR) ..... | 1548 |
| 38.11.9 | SPI/I2S receive data register (SPI_RXDR) ..... | 1548 |
| 38.11.10 | SPI/I2S polynomial register (SPI_CRCPOLY) ..... | 1549 |
| 38.11.11 | SPI/I2S transmitter CRC register (SPI_TXCRC) ..... | 1549 |
| 38.11.12 | SPI/I2S receiver CRC register (SPI_RXCRC) ..... | 1550 |
| 38.11.13 | SPI/I2S underrun data register (SPI_UDRDR) ..... | 1551 |
| 38.11.14 | SPI/I2S configuration register (SPI_I2SCFGR) ..... | 1551 |
| 38.11.15 | SPI/I2S register map ..... | 1553 |
| 39 | FD controller area network (FDCAN) ..... | 1555 |
| 39.1 | Introduction ..... | 1555 |
| 39.2 | FDCAN main features ..... | 1557 |
| 39.3 | FDCAN functional description ..... | 1558 |
| 39.3.1 | FDCAN block diagram ..... | 1558 |
| 39.3.2 | FDCAN pins and internal signals ..... | 1559 |
| 39.3.3 | Bit timing ..... | 1560 |
| 39.3.4 | Operating modes ..... | 1561 |
| 39.3.5 | Error management ..... | 1570 |
| 39.3.6 | Message RAM ..... | 1571 |
| 39.3.7 | FIFO acknowledge handling ..... | 1580 |
| 39.3.8 | FDCAN Rx FIFO element ..... | 1580 |
| 39.3.9 | FDCAN Tx buffer element ..... | 1582 |
| 39.3.10 | FDCAN Tx event FIFO element ..... | 1584 |
| 39.3.11 | FDCAN standard message ID filter element ..... | 1585 |
| 39.3.12 | FDCAN extended message ID filter element ..... | 1586 |
| 39.4 | FDCAN registers ..... | 1588 |
| 39.4.1 | FDCAN core release register (FDCAN_CREL) ..... | 1588 |
| 39.4.2 | FDCAN endian register (FDCAN_ENDN) ..... | 1588 |
| 39.4.3 | FDCAN data bit timing and prescaler register (FDCAN_DBTP) .... | 1588 |
| 39.4.4 | FDCAN test register (FDCAN_TEST) ..... | 1589 |
| 39.4.5 | FDCAN RAM watchdog register (FDCAN_RWD) ..... | 1590 |
| 39.4.6 | FDCAN CC control register (FDCAN_CCCR) ..... | 1591 |
| 39.4.7 | FDCAN nominal bit timing and prescaler register (FDCAN_NBTP) .. | 1592 |
| 39.4.8 | FDCAN timestamp counter configuration register (FDCAN_TSCC) . | 1594 |
| 39.4.9 | FDCAN timestamp counter value register (FDCAN_TSCV) . . . . . | 1594 |
| 39.4.10 | FDCAN timeout counter configuration register (FDCAN_TOCC) . . . | 1595 |
| 39.4.11 | FDCAN timeout counter value register (FDCAN_TOCV) . . . . . | 1596 |
| 39.4.12 | FDCAN error counter register (FDCAN_ECR) . . . . . | 1596 |
| 39.4.13 | FDCAN protocol status register (FDCAN_PSR) . . . . . | 1597 |
| 39.4.14 | FDCAN transmitter delay compensation register (FDCAN_TDCR) . . | 1599 |
| 39.4.15 | FDCAN interrupt register (FDCAN_IR) . . . . . | 1599 |
| 39.4.16 | FDCAN interrupt enable register (FDCAN_IE) . . . . . | 1602 |
| 39.4.17 | FDCAN interrupt line select register (FDCAN_ILS) . . . . . | 1604 |
| 39.4.18 | FDCAN interrupt line enable register (FDCAN_ILE) . . . . . | 1605 |
| 39.4.19 | FDCAN global filter configuration register (FDCAN_RXGFC) . . . . . | 1605 |
| 39.4.20 | FDCAN extended ID and mask register (FDCAN_XIDAM) . . . . . | 1607 |
| 39.4.21 | FDCAN high-priority message status register (FDCAN_HPMS) . . . . | 1607 |
| 39.4.22 | FDCAN Rx FIFO 0 status register (FDCAN_RXF0S) . . . . . | 1608 |
| 39.4.23 | CAN Rx FIFO 0 acknowledge register (FDCAN_RXF0A) . . . . . | 1609 |
| 39.4.24 | FDCAN Rx FIFO 1 status register (FDCAN_RXF1S) . . . . . | 1609 |
| 39.4.25 | FDCAN Rx FIFO 1 acknowledge register (FDCAN_RXF1A) . . . . . | 1610 |
| 39.4.26 | FDCAN Tx buffer configuration register (FDCAN_TXBC) . . . . . | 1610 |
| 39.4.27 | FDCAN Tx FIFO/queue status register (FDCAN_TXFQS) . . . . . | 1611 |
| 39.4.28 | FDCAN Tx buffer request pending register (FDCAN_TXBRP) . . . . . | 1611 |
| 39.4.29 | FDCAN Tx buffer add request register (FDCAN_TXBAR) . . . . . | 1612 |
| 39.4.30 | FDCAN Tx buffer cancellation request register (FDCAN_TXBCR) . . | 1613 |
| 39.4.31 | FDCAN Tx buffer transmission occurred register (FDCAN_TXBTO) . | 1613 |
| 39.4.32 | FDCAN Tx buffer cancellation finished register (FDCAN_TXBCF) . . | 1614 |
| 39.4.33 | FDCAN Tx buffer transmission interrupt enable register (FDCAN_TXBTIE) . . . . . | 1614 |
| 39.4.34 | FDCAN Tx buffer cancellation finished interrupt enable register (FDCAN_TXBCIE) . . . . . | 1615 |
| 39.4.35 | FDCAN Tx event FIFO status register (FDCAN_TXEFS) . . . . . | 1615 |
| 39.4.36 | FDCAN Tx event FIFO acknowledge register (FDCAN_TXEFA) . . . | 1616 |
| 39.4.37 | FDCAN CFG clock divider register (FDCAN_CKDIV) . . . . . | 1616 |
| 39.4.38 | FDCAN register map . . . . . | 1617 |