4. Embedded flash memory (FLASH) for category 4 devices . . . . . 149
4.1 Introduction . . . . . 149
4.2 FLASH main features . . . . . 149
4.3 FLASH functional description . . . . . 150
4.3.1 Flash memory organization . . . . . 150
4.3.2 Error code correction (ECC) . . . . . 151
4.3.3 Read access latency . . . . . 151
4.3.4 Adaptive real-time memory accelerator (ART Accelerator) . . . . . 152
4.3.5 Flash program and erase operations . . . . . 155
4.3.6 Flash main memory erase sequences . . . . . 156
4.3.7 Flash main memory programming sequences . . . . . 157
4.4 FLASH option bytes . . . . . 161
4.4.1 Option bytes description . . . . . 161
4.4.2 Option bytes programming . . . . . 165
4.5 FLASH memory protection . . . . . 167
4.5.1 Read protection (RDP) . . . . . 167
4.5.2 Proprietary code readout protection (PCROP) . . . . . 170
4.5.3 Write protection (WRP) . . . . . 171
4.5.4 Securable memory area . . . . . 172
4.5.5 Disabling core debug access . . . . . 173
4.5.6 Forcing boot from flash memory . . . . . 173
4.6 FLASH interrupts . . . . . 173
4.7 FLASH registers . . . . . 174
4.7.1 Flash access control register (FLASH_ACR) . . . . . 174
4.7.2 Flash power-down key register (FLASH_PDKEYR) . . . . . 175
4.7.3 Flash key register (FLASH_KEYR) . . . . . 175
4.7.4 Flash option key register (FLASH_OPTKEYR) . . . . . 176
4.7.5 Flash status register (FLASH_SR) . . . . . 176
4.7.6 Flash control register (FLASH_CR) . . . . . 178
4.7.7 Flash ECC register (FLASH_ECCR) . . . . . 180
4.7.8 Flash option register (FLASH_OPTR) . . . . . 181

| 4.7.9 | Flash PCROP1 Start address register (FLASH_PCROP1SR) . . . . . | 183 |
| 4.7.10 | Flash PCROP1 End address register (FLASH_PCROP1ER) . . . . . | 183 |
| 4.7.11 | Flash WRP area A address register (FLASH_WRP1AR) . . . . . | 184 |
| 4.7.12 | Flash WRP area B address register (FLASH_WRP1BR) . . . . . | 184 |
| 4.7.13 | Flash securable area register (FLASH_SEC1R) . . . . . | 185 |
| 4.7.14 | FLASH register map . . . . . | 186 |
| 5 | Embedded flash memory (FLASH) | |
| for category 2 devices . . . . . | 188 | |
| 5.1 | Introduction . . . . . | 188 |
| 5.2 | FLASH main features . . . . . | 188 |
| 5.3 | FLASH functional description . . . . . | 189 |
| 5.3.1 | Flash memory organization . . . . . | 189 |
| 5.3.2 | Error code correction (ECC) . . . . . | 190 |
| 5.3.3 | Read access latency . . . . . | 190 |
| 5.3.4 | Adaptive real-time memory accelerator (ART Accelerator) . . . . . | 191 |
| 5.3.5 | Flash program and erase operations . . . . . | 194 |
| 5.3.6 | Flash main memory erase sequences . . . . . | 195 |
| 5.3.7 | Flash main memory programming sequences . . . . . | 196 |
| 5.4 | FLASH option bytes . . . . . | 200 |
| 5.4.1 | Option bytes description . . . . . | 200 |
| 5.4.2 | Option bytes programming . . . . . | 205 |
| 5.5 | FLASH memory protection . . . . . | 206 |
| 5.5.1 | Read protection (RDP) . . . . . | 206 |
| 5.5.2 | Proprietary code readout protection (PCROP) . . . . . | 209 |
| 5.5.3 | Write protection (WRP) . . . . . | 210 |
| 5.5.4 | Securable memory area . . . . . | 211 |
| 5.5.5 | Disabling core debug access . . . . . | 212 |
| 5.5.6 | Forcing boot from flash memory . . . . . | 212 |
| 5.6 | FLASH interrupts . . . . . | 213 |
| 5.7 | FLASH registers . . . . . | 214 |
| 5.7.1 | Flash access control register (FLASH_ACR) . . . . . | 214 |
| 5.7.2 | Flash Power-down key register (FLASH_PDKEYR) . . . . . | 215 |
| 5.7.3 | Flash key register (FLASH_KEYR) . . . . . | 216 |
| 5.7.4 | Flash option key register (FLASH_OPTKEYR) . . . . . | 216 |
| 5.7.5 | Flash status register (FLASH_SR) . . . . . | 216 |
| 5.7.6 | Flash control register (FLASH_CR) . . . . . | 218 |
| 5.7.7 | Flash ECC register (FLASH_ECCR) . . . . . | 220 |
| 5.7.8 | Flash option register (FLASH_OPTR) . . . . . | 221 |
| 5.7.9 | Flash PCROP1 Start address register (FLASH_PCROP1SR) . . . . . | 223 |
| 5.7.10 | Flash PCROP1 End address register (FLASH_PCROP1ER) . . . . . | 223 |
| 5.7.11 | Flash WRP area A address register (FLASH_WRP1AR) . . . . . | 224 |
| 5.7.12 | Flash WRP area B address register (FLASH_WRP1BR) . . . . . | 224 |
| 5.7.13 | Flash securable area register (FLASH_SEC1R) . . . . . | 225 |
| 5.7.14 | FLASH register map . . . . . | 226 |
| 6 | Power control (PWR) . . . . . | 228 |
| 6.1 | Power supplies . . . . . | 228 |
| 6.1.1 | Independent analog peripherals supply . . . . . | 229 |
| 6.1.2 | USB transceivers supply . . . . . | 230 |
| 6.1.3 | Battery backup domain . . . . . | 230 |
| 6.1.4 | Voltage regulator . . . . . | 231 |
| 6.1.5 | Dynamic voltage scaling management . . . . . | 232 |
| 6.2 | Power supply supervisor . . . . . | 234 |
| 6.2.1 | Power-on reset (POR) / power-down reset (PDR) / brown-out reset (BOR) . . . . . | 234 |
| 6.2.2 | Programmable voltage detector (PVD) . . . . . | 234 |
| 6.2.3 | Peripheral Voltage Monitoring (PVM) . . . . . | 235 |
| 6.3 | Low-power modes . . . . . | 236 |
| 6.3.1 | Run mode . . . . . | 241 |
| 6.3.2 | Low-power run mode (LP run) . . . . . | 241 |
| 6.3.3 | Low power modes . . . . . | 242 |
| 6.3.4 | Sleep mode . . . . . | 243 |
| 6.3.5 | Low-power sleep mode (LP sleep) . . . . . | 244 |
| 6.3.6 | Stop 0 mode . . . . . | 245 |
| 6.3.7 | Stop 1 mode . . . . . | 247 |
| 6.3.8 | Standby mode . . . . . | 248 |
| 6.3.9 | Shutdown mode . . . . . | 251 |
| 6.3.10 | Auto-wakeup from low-power mode . . . . . | 252 |
| 6.4 | PWR registers . . . . . | 253 |
| 6.4.1 | Power control register 1 (PWR_CR1) . . . . . | 253 |
| 6.4.2 | Power control register 2 (PWR_CR2) . . . . . | 254 |
| 6.4.3 | Power control register 3 (PWR_CR3) . . . . . | 254 |
| 6.4.4 | Power control register 4 (PWR_CR4) . . . . . | 256 |
| 6.4.5 | Power status register 1 (PWR_SR1) . . . . . | 257 |
| 6.4.6 | Power status register 2 (PWR_SR2) . . . . . | 258 |
| 6.4.7 | Power status clear register (PWR_SCR) . . . . . | 259 |
| 6.4.8 | Power Port A pull-up control register (PWR_PUCRA) . . . . . | 260 |
| 6.4.9 | Power Port A pull-down control register (PWR_PDCRA) . . . . . | 260 |
| 6.4.10 | Power Port B pull-up control register (PWR_PUCRB) . . . . . | 261 |
| 6.4.11 | Power Port B pull-down control register (PWR_PDCRB) . . . . . | 261 |
| 6.4.12 | Power Port C pull-up control register (PWR_PUCRC) . . . . . | 262 |
| 6.4.13 | Power Port C pull-down control register (PWR_PDCRC) . . . . . | 262 |
| 6.4.14 | Power Port D pull-up control register (PWR_PUCRD) . . . . . | 263 |
| 6.4.15 | Power Port D pull-down control register (PWR_PDCRD) . . . . . | 263 |
| 6.4.16 | Power Port E pull-up control register (PWR_PUCRE) . . . . . | 264 |
| 6.4.17 | Power Port E pull-down control register (PWR_PDCRE) . . . . . | 264 |
| 6.4.18 | Power Port F pull-up control register (PWR_PUCRF) . . . . . | 265 |
| 6.4.19 | Power Port F pull-down control register (PWR_PDCRF) . . . . . | 265 |
| 6.4.20 | Power Port G pull-up control register (PWR_PUCRG) . . . . . | 266 |
| 6.4.21 | Power Port G pull-down control register (PWR_PDCRG) . . . . . | 266 |
| 6.4.22 | Power control register (PWR_CR5) . . . . . | 267 |
| 6.4.23 | PWR register map and reset value table . . . . . | 268 |
| 7 | Reset and clock control (RCC) . . . . . | 270 |
| 7.1 | Reset . . . . . | 270 |
| 7.1.1 | Power reset . . . . . | 270 |
| 7.1.2 | System reset . . . . . | 270 |
| 7.1.3 | RTC domain reset . . . . . | 272 |
| 7.2 | Clocks . . . . . | 272 |
| 7.2.1 | HSE clock . . . . . | 276 |
| 7.2.2 | HSI16 clock . . . . . | 277 |
| 7.2.3 | HSI48 clock . . . . . | 278 |
| 7.2.4 | PLL . . . . . | 278 |
| 7.2.5 | LSE clock . . . . . | 278 |
| 7.2.6 | LSI clock . . . . . | 279 |
| 7.2.7 | System clock (SYSCLK) selection . . . . . | 279 |
| 7.2.8 | Clock source frequency versus voltage scaling . . . . . | 280 |
| 7.2.9 | Clock security system (CSS) . . . . . | 280 |
| 7.2.10 | Clock security system on LSE . . . . . | 280 |
| 7.2.11 | ADC clock ..... | 281 |
| 7.2.12 | RTC clock ..... | 281 |
| 7.2.13 | Timer clock ..... | 281 |
| 7.2.14 | Watchdog clock ..... | 282 |
| 7.2.15 | Clock-out capability ..... | 282 |
| 7.2.16 | Internal/external clock measurement with TIM5/TIM15/TIM16/TIM17 . | 282 |
| 7.2.17 | Peripheral clock enable register (RCC_AHBxENR, RCC_APBxENRy) ..... | 285 |
| 7.3 | Low-power modes ..... | 286 |
| 7.4 | RCC registers ..... | 287 |
| 7.4.1 | Clock control register (RCC_CR) ..... | 287 |
| 7.4.2 | Internal clock sources calibration register (RCC_ICSCR) ..... | 288 |
| 7.4.3 | Clock configuration register (RCC_CFGR) ..... | 289 |
| 7.4.4 | PLL configuration register (RCC_PLLCFGR) ..... | 291 |
| 7.4.5 | Clock interrupt enable register (RCC_CIER) ..... | 294 |
| 7.4.6 | Clock interrupt flag register (RCC_CIFR) ..... | 295 |
| 7.4.7 | Clock interrupt clear register (RCC_CICR) ..... | 296 |
| 7.4.8 | AHB1 peripheral reset register (RCC_AHB1RSTR) ..... | 297 |
| 7.4.9 | AHB2 peripheral reset register (RCC_AHB2RSTR) ..... | 298 |
| 7.4.10 | AHB3 peripheral reset register (RCC_AHB3RSTR) ..... | 300 |
| 7.4.11 | APB1 peripheral reset register 1 (RCC_APB1RSTR1) ..... | 301 |
| 7.4.12 | APB1 peripheral reset register 2 (RCC_APB1RSTR2) ..... | 303 |
| 7.4.13 | APB2 peripheral reset register (RCC_APB2RSTR) ..... | 303 |
| 7.4.14 | AHB1 peripheral clock enable register (RCC_AHB1ENR) ..... | 305 |
| 7.4.15 | AHB2 peripheral clock enable register (RCC_AHB2ENR) ..... | 306 |
| 7.4.16 | AHB3 peripheral clock enable register(RCC_AHB3ENR) ..... | 308 |
| 7.4.17 | APB1 peripheral clock enable register 1 (RCC_APB1ENR1) ..... | 309 |
| 7.4.18 | APB1 peripheral clock enable register 2 (RCC_APB1ENR2) ..... | 311 |
| 7.4.19 | APB2 peripheral clock enable register (RCC_APB2ENR) ..... | 312 |
| 7.4.20 | AHB1 peripheral clocks enable in Sleep and Stop modes register (RCC_AHB1SMENR) ..... | 313 |
| 7.4.21 | AHB2 peripheral clocks enable in Sleep and Stop modes register (RCC_AHB2SMENR) ..... | 315 |
| 7.4.22 | AHB3 peripheral clocks enable in Sleep and Stop modes register (RCC_AHB3SMENR) ..... | 317 |
| 7.4.23 | APB1 peripheral clocks enable in Sleep and Stop modes register 1 (RCC_APB1SMENR1) ..... | 317 |
| 7.4.24 | APB1 peripheral clocks enable in Sleep and Stop modes register 2 (RCC_APB1SMENR2) ..... | 320 |
| 7.4.25 | APB2 peripheral clocks enable in Sleep and Stop modes register (RCC_APB2SMENR) . . . . . | 321 |
| 7.4.26 | Peripherals independent clock configuration register (RCC_CCIPR) . . . . . | 322 |
| 7.4.27 | RTC domain control register (RCC_BDCR) . . . . . | 325 |
| 7.4.28 | Control/status register (RCC_CSR) . . . . . | 327 |
| 7.4.29 | Clock recovery RC register (RCC_CRRCR) . . . . . | 328 |
| 7.4.30 | Peripherals independent clock configuration register (RCC_CCIPR2) . . . . . | 329 |
| 7.4.31 | RCC register map . . . . . | 330 |
| 8 | Clock recovery system (CRS) . . . . . | 334 |
| 8.1 | CRS introduction . . . . . | 334 |
| 8.2 | CRS main features . . . . . | 334 |
| 8.3 | CRS implementation . . . . . | 334 |
| 8.4 | CRS functional description . . . . . | 335 |
| 8.4.1 | CRS block diagram . . . . . | 335 |
| 8.4.2 | CRS internal signals . . . . . | 335 |
| 8.4.3 | Synchronization input . . . . . | 336 |
| 8.4.4 | Frequency error measurement . . . . . | 336 |
| 8.4.5 | Frequency error evaluation and automatic trimming . . . . . | 337 |
| 8.4.6 | CRS initialization and configuration . . . . . | 338 |
| 8.5 | CRS in low-power modes . . . . . | 339 |
| 8.6 | CRS interrupts . . . . . | 339 |
| 8.7 | CRS registers . . . . . | 339 |
| 8.7.1 | CRS control register (CRS_CR) . . . . . | 339 |
| 8.7.2 | CRS configuration register (CRS_CFGR) . . . . . | 340 |
| 8.7.3 | CRS interrupt and status register (CRS_ISR) . . . . . | 341 |
| 8.7.4 | CRS interrupt flag clear register (CRS_ICR) . . . . . | 343 |
| 8.7.5 | CRS register map . . . . . | 344 |
| 9 | General-purpose I/Os (GPIO) . . . . . | 345 |
| 9.1 | Introduction . . . . . | 345 |
| 9.2 | GPIO main features . . . . . | 345 |
| 9.3 | GPIO functional description . . . . . | 345 |
| 9.3.1 | General-purpose I/O (GPIO) . . . . . | 348 |
| 9.3.2 | I/O pin alternate function multiplexer and mapping . . . . . | 348 |
| 9.3.3 | I/O port control registers . . . . . | 349 |
| 9.3.4 | I/O port data registers . . . . . | 349 |
| 9.3.5 | I/O data bitwise handling . . . . . | 349 |
| 9.3.6 | GPIO locking mechanism . . . . . | 350 |
| 9.3.7 | I/O alternate function input/output . . . . . | 350 |
| 9.3.8 | External interrupt/wakeup lines . . . . . | 350 |
| 9.3.9 | Input configuration . . . . . | 351 |
| 9.3.10 | Output configuration . . . . . | 351 |
| 9.3.11 | Alternate function configuration . . . . . | 352 |
| 9.3.12 | Analog configuration . . . . . | 353 |
| 9.3.13 | Using the HSE or LSE oscillator pins as GPIOs . . . . . | 353 |
| 9.3.14 | Using the GPIO pins in the RTC supply domain . . . . . | 353 |
| 9.3.15 | Using PB8 as GPIO . . . . . | 354 |
| 9.3.16 | Using PG10 as GPIO . . . . . | 354 |
| 9.4 | GPIO registers . . . . . | 355 |
| 9.4.1 | GPIO port mode register (GPIOx_MODER) (x =A to G) . . . . . | 355 |
| 9.4.2 | GPIO port output type register (GPIOx_OTYPER) (x = A to G) . . . . . | 355 |
| 9.4.3 | GPIO port output speed register (GPIOx_OSPEEDR) (x = A to G) . . . . . | 356 |
| 9.4.4 | GPIO port pull-up/pull-down register (GPIOx_PUPDR) (x = A to G) . . . . . | 356 |
| 9.4.5 | GPIO port input data register (GPIOx_IDR) (x = A to G) . . . . . | 357 |
| 9.4.6 | GPIO port output data register (GPIOx_ODR) (x = A to G) . . . . . | 357 |
| 9.4.7 | GPIO port bit set/reset register (GPIOx_BSRR) (x = A to G) . . . . . | 357 |
| 9.4.8 | GPIO port configuration lock register (GPIOx_LCKR) (x = A to G) . . . . . | 358 |
| 9.4.9 | GPIO alternate function low register (GPIOx_AFRL) (x = A to G) . . . . . | 359 |
| 9.4.10 | GPIO alternate function high register (GPIOx_AFRH) (x = A to G) . . . . . | 360 |
| 9.4.11 | GPIO port bit reset register (GPIOx_BRR) (x = A to G) . . . . . | 361 |
| 9.4.12 | GPIO register map . . . . . | 362 |
| 10 | System configuration controller (SYSCFG) . . . . . | 364 |
| 10.1 | SYSCFG main features . . . . . | 364 |
| 10.2 | SYSCFG registers . . . . . | 364 |
| 10.2.1 | SYSCFG memory remap register (SYSCFG_MEMRMP) . . . . . | 364 |
| 10.2.2 | SYSCFG configuration register 1 (SYSCFG_CFGR1) . . . . . | 365 |
| 10.2.3 | SYSCFG external interrupt configuration register 1 (SYSCFG_EXTICR1) . . . . . | 367 |
| 10.2.4 | SYSCFG external interrupt configuration register 2 (SYSCFG_EXTICR2) . . . . . | 368 |
| 10.2.5 | SYSCFG external interrupt configuration register 3 (SYSCFG_EXTICR3) . . . . . | 369 |
| 10.2.6 | SYSCFG external interrupt configuration register 4 (SYSCFG_EXTICR4) . . . . . | 371 |
| 10.2.7 | SYSCFG CCM SRAM control and status register (SYSCFG_SCSR) . | 372 |
| 10.2.8 | SYSCFG configuration register 2 (SYSCFG_CFGR2) . . . . . | 373 |
| 10.2.9 | SYSCFG CCM SRAM write protection register (SYSCFG_SWPR) . . | 374 |
| 10.2.10 | SYSCFG CCM SRAM key register (SYSCFG_SKR) . . . . . | 374 |
| 10.2.11 | SYSCFG register map . . . . . | 375 |
| 11 | Peripherals interconnect matrix . . . . . | 376 |
| 11.1 | Introduction . . . . . | 376 |
| 11.2 | Connection summary . . . . . | 377 |
| 11.3 | Interconnection details . . . . . | 379 |
| 11.3.1 | From timer (TIMx, HRTIM) to timer (TIMx) . . . . . | 379 |
| 11.3.2 | From timer (TIMx, HRTIM) and EXTI to ADC (ADCx) . . . . . | 381 |
| 11.3.3 | From ADC (ADCx) to timer (TIMx, HRTIM) . . . . . | 383 |
| 11.3.4 | From timer (TIMx, HRTIM) and EXTI to DAC (DACx) . . . . . | 383 |
| 11.3.5 | From HSE, LSE, LSI, HSI16, MCO, RTC to timer (TIMx) . . . . . | 384 |
| 11.3.6 | From RTC, COMPx to low-power timer (LPTIM1) . . . . . | 385 |
| 11.3.7 | From timer (TIMx) to comparators (COMPx) . . . . . | 386 |
| 11.3.8 | From internal analog source to ADC (ADCx), comparator (COMPx) and OPAMP (OPAMPx) . . . . . | 386 |
| 11.3.9 | From comparators (COMPx) to timers (TIMx, HRTIM) . . . . . | 390 |
| 11.3.10 | From system errors to timers (TIMx) and HRTIM . . . . . | 396 |
| 11.3.11 | From timers (TIM16/TIM17) to IRTIM . . . . . | 396 |
| 12 | Direct memory access controller (DMA) . . . . . | 397 |
| 12.1 | Introduction . . . . . | 397 |
| 12.2 | DMA main features . . . . . | 397 |
| 12.3 | DMA implementation . . . . . | 398 |
| 12.3.1 | DMA1 and DMA2 . . . . . | 398 |
| 12.3.2 | DMA request mapping . . . . . | 398 |
| 12.4 | DMA functional description . . . . . | 399 |
| 12.4.1 | DMA block diagram . . . . . | 399 |
| 12.4.2 | DMA pins and internal signals . . . . . | 400 |
| 12.4.3 | DMA transfers . . . . . | 400 |
| 12.4.4 | DMA arbitration . . . . . | 401 |
| 12.4.5 | DMA channels . . . . . | 401 |
| 12.4.6 | DMA data width, alignment, and endianness . . . . . | 405 |
| 12.4.7 | DMA error management . . . . . | 406 |
| 12.5 | DMA interrupts . . . . . | 407 |
| 12.6 | DMA registers . . . . . | 407 |
| 12.6.1 | DMA interrupt status register (DMA_ISR) . . . . . | 407 |
| 12.6.2 | DMA interrupt flag clear register (DMA_IFCR) . . . . . | 409 |
| 12.6.3 | DMA channel x configuration register (DMA_CCRx) . . . . . | 411 |
| 12.6.4 | DMA channel x number of data to transfer register (DMA_CNDTRx) . . . . . | 413 |
| 12.6.5 | DMA channel x peripheral address register (DMA_CPARx) . . . . . | 414 |
| 12.6.6 | DMA channel x memory address register (DMA_CMARx) . . . . . | 415 |
| 12.6.7 | DMA register map . . . . . | 415 |
| 13 | DMA request multiplexer (DMAMUX) . . . . . | 418 |
| 13.1 | Introduction . . . . . | 418 |
| 13.2 | DMAMUX main features . . . . . | 419 |
| 13.3 | DMAMUX implementation . . . . . | 419 |
| 13.3.1 | DMAMUX instantiation . . . . . | 419 |
| 13.3.2 | DMAMUX mapping . . . . . | 419 |
| 13.4 | DMAMUX functional description . . . . . | 423 |
| 13.4.1 | DMAMUX block diagram . . . . . | 423 |
| 13.4.2 | DMAMUX signals . . . . . | 424 |
| 13.4.3 | DMAMUX channels . . . . . | 424 |
| 13.4.4 | DMAMUX request line multiplexer . . . . . | 424 |
| 13.4.5 | DMAMUX request generator . . . . . | 427 |
| 13.5 | DMAMUX interrupts . . . . . | 428 |
| 13.6 | DMAMUX registers . . . . . | 429 |
| 13.6.1 | DMAMUX request line multiplexer channel x configuration register (DMAMUX_CxCR) . . . . . | 429 |
| 13.6.2 | DMAMUX request line multiplexer interrupt channel status register (DMAMUX_CSR) . . . . . | 430 |
| 13.6.3 | DMAMUX request line multiplexer interrupt clear flag register (DMAMUX_CFR) . . . . . | 430 |
| 13.6.4 | DMAMUX request generator channel x configuration register (DMAMUX_RGxCR) . . . . . | 431 |
| 13.6.5 | DMAMUX request generator interrupt status register (DMAMUX_RGSR) . . . . . | 432 |
| 13.6.6 | DMAMUX request generator interrupt clear flag register (DMAMUX_RGCFR) . . . . . | 432 |
| 13.6.7 | DMAMUX register map . . . . . | 433 |
| 14 | Nested vectored interrupt controller (NVIC) . . . . . | 436 |
| 14.1 | NVIC main features . . . . . | 436 |
| 14.2 | SysTick calibration value register . . . . . | 436 |
| 14.3 | Interrupt and exception vectors . . . . . | 437 |
| 15 | Extended interrupts and events controller (EXTI) . . . . . | 441 |
| 15.1 | Introduction . . . . . | 441 |
| 15.2 | EXTI main features . . . . . | 441 |
| 15.3 | EXTI functional description . . . . . | 441 |
| 15.3.1 | EXTI block diagram . . . . . | 442 |
| 15.3.2 | Wake-up event management . . . . . | 442 |
| 15.3.3 | Peripherals asynchronous Interrupts . . . . . | 443 |
| 15.3.4 | Hardware interrupt selection . . . . . | 443 |
| 15.3.5 | Hardware event selection . . . . . | 443 |
| 15.3.6 | Software interrupt/event selection . . . . . | 443 |
| 15.4 | EXTI interrupt/event line mapping . . . . . | 443 |
| 15.5 | EXTI registers . . . . . | 446 |
| 15.5.1 | Interrupt mask register 1 (EXTI_IMR1) . . . . . | 446 |
| 15.5.2 | Event mask register 1 (EXTI_EM1) . . . . . | 446 |
| 15.5.3 | Rising trigger selection register 1 (EXTI_RTSR1) . . . . . | 446 |
| 15.5.4 | Falling trigger selection register 1 (EXTI_FTSR1) . . . . . | 447 |
| 15.5.5 | Software interrupt event register 1 (EXTI_SWIER1) . . . . . | 448 |
| 15.5.6 | Pending register 1 (EXTI_PR1) . . . . . | 449 |
| 15.5.7 | Interrupt mask register 2 (EXTI_IMR2) . . . . . | 449 |
| 15.5.8 | Event mask register 2 (EXTI_EM2) . . . . . | 450 |
| 15.5.9 | Rising trigger selection register 2 (EXTI_RTSR2) . . . . . | 450 |
| 15.5.10 | Falling trigger selection register 2 (EXTI_FTSR2) . . . . . | 451 |
- 15.5.11 Software interrupt event register 2 (EXTI_SWIER2) . . . . . 451
- 15.5.12 Pending register 2 (EXTI_PR2) . . . . . 452
- 15.5.13 EXTI register map . . . . . 453
- 16 Cyclic redundancy check calculation unit (CRC) . . . . . 454
- 16.1 Introduction . . . . . 454
- 16.2 CRC main features . . . . . 454
- 16.3 CRC functional description . . . . . 455
- 16.3.1 CRC block diagram . . . . . 455
- 16.3.2 CRC internal signals . . . . . 455
- 16.3.3 CRC operation . . . . . 455
- 16.4 CRC registers . . . . . 457
- 16.4.1 CRC data register (CRC_DR) . . . . . 457
- 16.4.2 CRC independent data register (CRC_IDR) . . . . . 457
- 16.4.3 CRC control register (CRC_CR) . . . . . 458
- 16.4.4 CRC initial value (CRC_INIT) . . . . . 459
- 16.4.5 CRC polynomial (CRC_POL) . . . . . 459
- 16.4.6 CRC register map . . . . . 460
- 17 CORDIC coprocessor (CORDIC) . . . . . 461
- 17.1 CORDIC introduction . . . . . 461
- 17.2 CORDIC main features . . . . . 461
- 17.3 CORDIC functional description . . . . . 461
- 17.3.1 General description . . . . . 461
- 17.3.2 CORDIC functions . . . . . 461
- 17.3.3 Fixed point representation . . . . . 468
- 17.3.4 Scaling factor . . . . . 468
- 17.3.5 Precision . . . . . 469
- 17.3.6 Zero-overhead mode . . . . . 472
- 17.3.7 Polling mode . . . . . 473
- 17.3.8 Interrupt mode . . . . . 474
- 17.3.9 DMA mode . . . . . 474
- 17.4 CORDIC registers . . . . . 475
- 17.4.1 CORDIC control/status register (CORDIC_CSR) . . . . . 475
- 17.4.2 CORDIC argument register (CORDIC_WDATA) . . . . . 477
- 17.4.3 CORDIC result register (CORDIC_RDATA) . . . . . 478
| 17.4.4 | CORDIC register map ..... | 478 |
| 18 | Filter math accelerator (FMAC) ..... | 479 |
| 18.1 | FMAC introduction ..... | 479 |
| 18.2 | FMAC main features ..... | 479 |
| 18.3 | FMAC functional description ..... | 480 |
| 18.3.1 | General description ..... | 480 |
| 18.3.2 | Local memory and buffers ..... | 481 |
| 18.3.3 | Input buffers ..... | 481 |
| 18.3.4 | Output buffer ..... | 484 |
| 18.3.5 | Initialization functions ..... | 486 |
| 18.3.6 | Filter functions ..... | 487 |
| 18.3.7 | Fixed point representation ..... | 491 |
| 18.3.8 | Implementing FIR filters with the FMAC ..... | 491 |
| 18.3.9 | Implementing IIR filters with the FMAC ..... | 493 |
| 18.3.10 | Examples of filter initialization ..... | 495 |
| 18.3.11 | Examples of filter operation ..... | 496 |
| 18.3.12 | Filter design tips ..... | 498 |
| 18.4 | FMAC registers ..... | 499 |
| 18.4.1 | FMAC X1 buffer configuration register (FMAC_X1BUFCFG) ..... | 499 |
| 18.4.2 | FMAC X2 buffer configuration register (FMAC_X2BUFCFG) ..... | 499 |
| 18.4.3 | FMAC Y buffer configuration register (FMAC_YBUFCFG) ..... | 500 |
| 18.4.4 | FMAC parameter register (FMAC_PARAM) ..... | 501 |
| 18.4.5 | FMAC control register (FMAC_CR) ..... | 502 |
| 18.4.6 | FMAC status register (FMAC_SR) ..... | 503 |
| 18.4.7 | FMAC write data register (FMAC_WDATA) ..... | 504 |
| 18.4.8 | FMAC read data register (FMAC_RDATA) ..... | 505 |
| 18.4.9 | FMAC register map ..... | 505 |
| 19 | Flexible static memory controller (FSMC) ..... | 507 |
| 19.1 | Introduction ..... | 507 |
| 19.2 | FMC main features ..... | 507 |
| 19.3 | FMC block diagram ..... | 508 |
| 19.4 | AHB interface ..... | 508 |
| 19.4.1 | Supported memories and transactions ..... | 509 |
| 19.5 | External device address mapping ..... | 510 |
- 19.5.1 NOR/PSRAM address mapping . . . . . 510
- 19.5.2 NAND flash memory address mapping . . . . . 511
- 19.6 NOR flash/PSRAM controller . . . . . 512
- 19.6.1 External memory interface signals . . . . . 513
- 19.6.2 Supported memories and transactions . . . . . 515
- 19.6.3 General timing rules . . . . . 517
- 19.6.4 NOR flash/PSRAM controller asynchronous transactions . . . . . 517
- 19.6.5 Synchronous transactions . . . . . 535
- 19.6.6 NOR/PSRAM controller registers . . . . . 542
- 19.7 NAND flash controller . . . . . 550
- 19.7.1 External memory interface signals . . . . . 550
- 19.7.2 NAND flash supported memories and transactions . . . . . 551
- 19.7.3 Timing diagrams for NAND flash memory . . . . . 552
- 19.7.4 NAND flash operations . . . . . 552
- 19.7.5 NAND flash prewait functionality . . . . . 553
- 19.7.6 Computation of the error correction code (ECC)
in NAND flash memory . . . . . 554 - 19.7.7 NAND flash controller registers . . . . . 555
- 19.7.8 FMC register map . . . . . 561
- 20 Quad-SPI interface (QUADSPI) . . . . . 563
- 20.1 Introduction . . . . . 563
- 20.2 QUADSPI main features . . . . . 563
- 20.3 QUADSPI functional description . . . . . 563
- 20.3.1 QUADSPI block diagram . . . . . 563
- 20.3.2 QUADSPI pins . . . . . 564
- 20.3.3 QUADSPI command sequence . . . . . 564
- 20.3.4 QUADSPI signal interface protocol modes . . . . . 567
- 20.3.5 QUADSPI indirect mode . . . . . 569
- 20.3.6 QUADSPI automatic status-polling mode . . . . . 570
- 20.3.7 QUADSPI memory-mapped mode . . . . . 571
- 20.3.8 QUADSPI flash memory configuration . . . . . 572
- 20.3.9 QUADSPI delayed data sampling . . . . . 572
- 20.3.10 QUADSPI configuration . . . . . 572
- 20.3.11 QUADSPI use . . . . . 573
- 20.3.12 Sending the instruction only once . . . . . 575
- 20.3.13 QUADSPI error management . . . . . 575
| 20.3.14 | QUADSPI busy bit and abort functionality . . . . . | 575 |
| 20.3.15 | NCS behavior . . . . . | 576 |
| 20.4 | QUADSPI interrupts . . . . . | 578 |
| 20.5 | QUADSPI registers . . . . . | 578 |
| 20.5.1 | QUADSPI control register (QUADSPI_CR) . . . . . | 578 |
| 20.5.2 | QUADSPI device configuration register (QUADSPI_DCR) . . . . . | 581 |
| 20.5.3 | QUADSPI status register (QUADSPI_SR) . . . . . | 582 |
| 20.5.4 | QUADSPI flag clear register (QUADSPI_FCR) . . . . . | 583 |
| 20.5.5 | QUADSPI data length register (QUADSPI_DLR) . . . . . | 583 |
| 20.5.6 | QUADSPI communication configuration register (QUADSPI_CCR) . . . . . | 584 |
| 20.5.7 | QUADSPI address register (QUADSPI_AR) . . . . . | 586 |
| 20.5.8 | QUADSPI alternate-byte register (QUADSPI_ABR) . . . . . | 586 |
| 20.5.9 | QUADSPI data register (QUADSPI_DR) . . . . . | 587 |
| 20.5.10 | QUADSPI polling status mask register (QUADSPI_PSMKR) . . . . . | 587 |
| 20.5.11 | QUADSPI polling status match register (QUADSPI_PSMAR) . . . . . | 588 |
| 20.5.12 | QUADSPI polling interval register (QUADSPI_PIR) . . . . . | 588 |
| 20.5.13 | QUADSPI low-power timeout register (QUADSPI_LPTR) . . . . . | 589 |
| 20.5.14 | QUADSPI register map . . . . . | 589 |
| 21 | Analog-to-digital converters (ADC) . . . . . | 591 |
| 21.1 | Introduction . . . . . | 591 |
| 21.2 | ADC main features . . . . . | 592 |
| 21.3 | ADC implementation . . . . . | 593 |
| 21.4 | ADC functional description . . . . . | 594 |
| 21.4.1 | ADC block diagram . . . . . | 594 |
| 21.4.2 | ADC pins and internal signals . . . . . | 595 |
| 21.4.3 | ADC clocks . . . . . | 596 |
| 21.4.4 | ADC1/2/3/4/5 connectivity . . . . . | 598 |
| 21.4.5 | Slave AHB interface . . . . . | 603 |
| 21.4.6 | ADC Deep-power-down mode (DEEPPWD) and ADC voltage regulator (ADVREGEN) . . . . . | 603 |
| 21.4.7 | Single-ended and differential input channels . . . . . | 604 |
| 21.4.8 | Calibration (ADCAL, ADCALDIF, ADC_CALFACT) . . . . . | 604 |
| 21.4.9 | ADC on-off control (ADEN, ADDIS, ADRDY) . . . . . | 607 |
| 21.4.10 | Constraints when writing the ADC control bits . . . . . | 608 |
| 21.4.11 | Channel selection (ADC_SQRy, ADC_JSQR) . . . . . | 609 |
| 21.4.12 | Channel-wise programmable sampling time (SMPR1, SMPR2) . . . . . | 610 |
| 21.4.13 | Single conversion mode (CONT = 0) . . . . . | 612 |
| 21.4.14 | Continuous conversion mode (CONT = 1) . . . . . | 612 |
| 21.4.15 | Starting conversions (ADSTART, JADSTART) . . . . . | 613 |
| 21.4.16 | ADC timing . . . . . | 614 |
| 21.4.17 | Stopping an ongoing conversion (ADSTP, JADSTP) . . . . . | 614 |
| 21.4.18 | Conversion on external trigger and trigger polarity (EXTSEL, EXTEN, JEXTSEL, JEXTEN) . . . . . | 616 |
| 21.4.19 | Injected channel management . . . . . | 621 |
| 21.4.20 | Discontinuous mode (DISCEN, DISCNUM, JDISCEN) . . . . . | 623 |
| 21.4.21 | Queue of context for injected conversions . . . . . | 624 |
| 21.4.22 | Programmable resolution (RES) - Fast conversion mode . . . . . | 632 |
| 21.4.23 | End of conversion, end of sampling phase (EOC, JEOC, EOSMP) . . . . . | 633 |
| 21.4.24 | End of conversion sequence (EOS, JEOS) . . . . . | 633 |
| 21.4.25 | Timing diagrams example (single/continuous modes, hardware/software triggers) . . . . . | 634 |
| 21.4.26 | Data management . . . . . | 636 |
| 21.4.27 | Dynamic low-power features . . . . . | 642 |
| 21.4.28 | Analog window watchdog (AWD1EN, JAWD1EN, AWD1SGL, AWD1CH, AWD2CH, AWD3CH, AWD_HTx, AWD_LTx, AWDx) . . . . . | 647 |
| 21.4.29 | Oversampler . . . . . | 651 |
| 21.4.30 | Dual ADC modes . . . . . | 657 |
| 21.4.31 | Temperature sensor . . . . . | 671 |
| 21.4.32 | VBAT supply monitoring . . . . . | 673 |
| 21.4.33 | Monitoring the internal voltage reference . . . . . | 674 |
| 21.5 | ADC in low-power mode . . . . . | 675 |
| 21.6 | ADC interrupts . . . . . | 676 |
| 21.7 | ADC registers (for each ADC) . . . . . | 677 |
| 21.7.1 | ADC interrupt and status register (ADC_ISR) . . . . . | 677 |
| 21.7.2 | ADC interrupt enable register (ADC_IER) . . . . . | 679 |
| 21.7.3 | ADC control register (ADC_CR) . . . . . | 681 |
| 21.7.4 | ADC configuration register (ADC_CFGR) . . . . . | 684 |
| 21.7.5 | ADC configuration register 2 (ADC_CFGR2) . . . . . | 688 |
| 21.7.6 | ADC sample time register 1 (ADC_SMPR1) . . . . . | 691 |
| 21.7.7 | ADC sample time register 2 (ADC_SMPR2) . . . . . | 691 |
| 21.7.8 | ADC watchdog threshold register 1 (ADC_TR1) . . . . . | 692 |
| 21.7.9 | ADC watchdog threshold register 2 (ADC_TR2) . . . . . | 693 |
| 21.7.10 | ADC watchdog threshold register 3 (ADC_TR3) . . . . . | 694 |
| 21.7.11 | ADC regular sequence register 1 (ADC_SQR1) . . . . . | 694 |
| 21.7.12 | ADC regular sequence register 2 (ADC_SQR2) . . . . . | 695 |
| 21.7.13 | ADC regular sequence register 3 (ADC_SQR3) . . . . . | 696 |
| 21.7.14 | ADC regular sequence register 4 (ADC_SQR4) . . . . . | 697 |
| 21.7.15 | ADC regular data register (ADC_DR) . . . . . | 698 |
| 21.7.16 | ADC injected sequence register (ADC_JSQR) . . . . . | 698 |
| 21.7.17 | ADC offset y register (ADC_OFRy) . . . . . | 700 |
| 21.7.18 | ADC injected channel y data register (ADC_JDRy) . . . . . | 701 |
| 21.7.19 | ADC analog watchdog 2 configuration register (ADC_AWD2CR) . . . . . | 702 |
| 21.7.20 | ADC analog watchdog 3 configuration register (ADC_AWD3CR) . . . . . | 702 |
| 21.7.21 | ADC differential mode selection register (ADC_DIFSEL) . . . . . | 703 |
| 21.7.22 | ADC calibration factors (ADC_CALFACT) . . . . . | 703 |
| 21.7.23 | ADC Gain compensation Register (ADC_GCOMP) . . . . . | 704 |
| 21.8 | ADC common registers . . . . . | 705 |
| 21.8.1 | ADCx common status register (ADCx_CSR) (x = 12 or 345) . . . . . | 705 |
| 21.8.2 | ADCx common control register (ADCx_CCR) (x = 12 or 345) . . . . . | 706 |
| 21.8.3 | ADCx common regular data register for dual mode (ADCx_CDR) (x = 12 or 345) . . . . . | 710 |
| 21.9 | ADC register map . . . . . | 710 |
| 22 | Digital-to-analog converter (DAC) . . . . . | 714 |
| 22.1 | Introduction . . . . . | 714 |
| 22.2 | DAC main features . . . . . | 714 |
| 22.3 | DAC implementation . . . . . | 715 |
| 22.4 | DAC functional description . . . . . | 716 |
| 22.4.1 | DAC block diagram . . . . . | 716 |
| 22.4.2 | DAC pins and internal signals . . . . . | 717 |
| 22.4.3 | DAC channel enable . . . . . | 723 |
| 22.4.4 | DAC data format . . . . . | 723 |
| 22.4.5 | DAC conversion . . . . . | 725 |
| 22.4.6 | DAC output voltage . . . . . | 726 |
| 22.4.7 | DAC trigger selection . . . . . | 726 |
| 22.4.8 | DMA requests . . . . . | 727 |
| 22.4.9 | Noise generation . . . . . | 728 |
| 22.4.10 | Triangle-wave generation . . . . . | 729 |
| 22.4.11 | DAC sawtooth wave generation . . . . . | 730 |
| 22.4.12 | DAC channel modes . . . . . | 731 |
| 22.4.13 | DAC channel buffer calibration . . . . . | 734 |
| 22.4.14 | DAC channel conversion modes . . . . . | 735 |
| 22.4.15 | Dual DAC channel conversion modes (if dual channels are available) . . . . . | 737 |
| 22.5 | DAC in low-power modes . . . . . | 742 |
| 22.6 | DAC interrupts . . . . . | 742 |
| 22.7 | DAC registers . . . . . | 742 |
| 22.7.1 | DAC control register (DAC_CR) . . . . . | 742 |
| 22.7.2 | DAC software trigger register (DAC_SWTRGR) . . . . . | 746 |
| 22.7.3 | DAC channel1 12-bit right-aligned data holding register (DAC_DHR12R1) . . . . . | 747 |
| 22.7.4 | DAC channel1 12-bit left aligned data holding register (DAC_DHR12L1) . . . . . | 747 |
| 22.7.5 | DAC channel1 8-bit right aligned data holding register (DAC_DHR8R1) . . . . . | 748 |
| 22.7.6 | DAC channel2 12-bit right aligned data holding register (DAC_DHR12R2) . . . . . | 748 |
| 22.7.7 | DAC channel2 12-bit left aligned data holding register (DAC_DHR12L2) . . . . . | 749 |
| 22.7.8 | DAC channel2 8-bit right-aligned data holding register (DAC_DHR8R2) . . . . . | 749 |
| 22.7.9 | Dual DAC 12-bit right-aligned data holding register (DAC_DHR12RD) . . . . . | 750 |
| 22.7.10 | Dual DAC 12-bit left aligned data holding register (DAC_DHR12LD) . . . . . | 750 |
| 22.7.11 | Dual DAC 8-bit right aligned data holding register (DAC_DHR8RD) . . . . . | 751 |
| 22.7.12 | DAC channel1 data output register (DAC_DOR1) . . . . . | 751 |
| 22.7.13 | DAC channel2 data output register (DAC_DOR2) . . . . . | 752 |
| 22.7.14 | DAC status register (DAC_SR) . . . . . | 752 |
| 22.7.15 | DAC calibration control register (DAC_CCR) . . . . . | 754 |
| 22.7.16 | DAC mode control register (DAC_MCR) . . . . . | 755 |
| 22.7.17 | DAC channel1 sample and hold sample time register (DAC_SHSR1) . . . . . | 756 |
| 22.7.18 | DAC channel2 sample and hold sample time register (DAC_SHSR2) . . . . . | 757 |
| 22.7.19 | DAC sample and hold time register (DAC_SHHR) . . . . . | 757 |
| 22.7.20 | DAC sample and hold refresh time register (DAC_SHRR) . . . . . | 758 |
| 22.7.21 | DAC channel1 sawtooth register (DAC_STR1) . . . . . | 759 |
| 22.7.22 | DAC channel2 sawtooth register (DAC_STR2) . . . . . | 759 |
| 22.7.23 | DAC sawtooth mode register (DAC_STMODR) . . . . . | 760 |
| 22.7.24 | DAC register map ..... | 761 |
| 23 | Voltage reference buffer (VREFBUF) ..... | 764 |
| 23.1 | Introduction ..... | 764 |
| 23.2 | VREFBUF functional description ..... | 764 |
| 23.3 | VREFBUF trimming ..... | 765 |
| 23.4 | VREFBUF registers ..... | 766 |
| 23.4.1 | VREFBUF control and status register (VREFBUF_CSR) ..... | 766 |
| 23.4.2 | VREFBUF calibration control register (VREFBUF_CCR) ..... | 767 |
| 23.4.3 | VREFBUF register map ..... | 767 |
| 24 | Comparator (COMP) ..... | 768 |
| 24.1 | COMP introduction ..... | 768 |
| 24.2 | COMP main features ..... | 768 |
| 24.3 | COMP functional description ..... | 768 |
| 24.3.1 | COMP block diagram ..... | 768 |
| 24.3.2 | COMP pins and internal signals ..... | 769 |
| 24.3.3 | COMP reset and clocks ..... | 769 |
| 24.3.4 | COMP LOCK mechanism ..... | 770 |
| 24.3.5 | COMP hysteresis ..... | 770 |
| 24.3.6 | COMP output blanking ..... | 770 |
| 24.4 | COMP low-power modes ..... | 771 |
| 24.5 | COMP interrupts ..... | 772 |
| 24.6 | COMP registers ..... | 772 |
| 24.6.1 | Comparator x control and status register (COMP_CxCSR) ..... | 772 |
| 24.6.2 | COMP register map ..... | 774 |
| 25 | Operational amplifiers (OPAMP) ..... | 776 |
| 25.1 | Introduction ..... | 776 |
| 25.2 | OPAMP main features ..... | 776 |
| 25.3 | OPAMP functional description ..... | 776 |
| 25.3.1 | OPAMP output redirection to internal ADC channels ..... | 776 |
| 25.3.2 | OPAMP reset and clocks ..... | 776 |
| 25.3.3 | Initial configuration ..... | 777 |
| 25.3.4 | Signal routing ..... | 777 |
| 25.3.5 | OPAMP modes ..... | 779 |
| 25.3.6 | OPAMP PGA gain . . . . . | 784 |
| 25.3.7 | Calibration . . . . . | 785 |
| 25.3.8 | Timer controlled Multiplexer mode . . . . . | 786 |
| 25.4 | OPAMP low-power modes . . . . . | 787 |
| 25.5 | OPAMP registers . . . . . | 788 |
| 25.5.1 | OPAMP1 control/status register (OPAMP1_CSR) . . . . . | 788 |
| 25.5.2 | OPAMP2 control/status register (OPAMP2_CSR) . . . . . | 791 |
| 25.5.3 | OPAMP3 control/status register (OPAMP3_CSR) . . . . . | 794 |
| 25.5.4 | OPAMP4 control/status register (OPAMP4_CSR) . . . . . | 797 |
| 25.5.5 | OPAMP5 control/status register (OPAMP5_CSR) . . . . . | 800 |
| 25.5.6 | OPAMP6 control/status register (OPAMP6_CSR) . . . . . | 803 |
| 25.5.7 | OPAMP1 timer controlled mode register (OPAMPx_TCMR) (x = 1...6) . . . . . | 806 |
| 25.5.8 | OPAMP2 timer controlled mode register (OPAMPx_TCMR) (x = 1...6) . . . . . | 808 |
| 25.5.9 | OPAMP3 timer controlled mode register (OPAMPx_TCMR) (x = 1...6) . . . . . | 810 |
| 25.5.10 | OPAMP4 timer controlled mode register (OPAMPx_TCMR) (x = 1...6) . . . . . | 812 |
| 25.5.11 | OPAMP5 timer controlled mode register (OPAMPx_TCMR) (x = 1...6) . . . . . | 814 |
| 25.5.12 | OPAMP6 timer controlled mode register (OPAMPx_TCMR) (x = 1...6) . . . . . | 816 |
| 25.5.13 | OPAMP register map . . . . . | 818 |
| 26 | True random number generator (RNG) . . . . . | 820 |
| 26.1 | Introduction . . . . . | 820 |
| 26.2 | RNG main features . . . . . | 820 |
| 26.3 | RNG functional description . . . . . | 821 |
| 26.3.1 | RNG block diagram . . . . . | 821 |
| 26.3.2 | RNG internal signals . . . . . | 821 |
| 26.3.3 | Random number generation . . . . . | 822 |
| 26.3.4 | RNG initialization . . . . . | 824 |
| 26.3.5 | RNG operation . . . . . | 825 |
| 26.3.6 | RNG clocking . . . . . | 826 |
| 26.3.7 | Error management . . . . . | 826 |
| 26.3.8 | RNG low-power use . . . . . | 827 |
| 26.4 | RNG interrupts . . . . . | 827 |
| 26.5 | RNG processing time . . . . . | 827 |
| 26.6 | RNG entropy source validation . . . . . | 828 |
| 26.6.1 | Introduction . . . . . | 828 |
| 26.6.2 | Validation conditions . . . . . | 828 |
| 26.6.3 | Data collection ..... | 828 |
| 26.7 | RNG registers ..... | 829 |
| 26.7.1 | RNG control register (RNG_CR) ..... | 829 |
| 26.7.2 | RNG status register (RNG_SR) ..... | 829 |
| 26.7.3 | RNG data register (RNG_DR) ..... | 830 |
| 26.7.4 | RNG register map ..... | 831 |
| 27 | AES hardware accelerator (AES) ..... | 832 |
| 27.1 | Introduction ..... | 832 |
| 27.2 | AES main features ..... | 832 |
| 27.3 | AES implementation ..... | 832 |
| 27.4 | AES functional description ..... | 833 |
| 27.4.1 | AES block diagram ..... | 833 |
| 27.4.2 | AES internal signals ..... | 833 |
| 27.4.3 | AES cryptographic core ..... | 833 |
| 27.4.4 | AES procedure to perform a cipher operation ..... | 839 |
| 27.4.5 | AES decryption round key preparation ..... | 842 |
| 27.4.6 | AES ciphertext stealing and data padding ..... | 843 |
| 27.4.7 | AES task suspend and resume ..... | 843 |
| 27.4.8 | AES basic chaining modes (ECB, CBC) ..... | 844 |
| 27.4.9 | AES counter (CTR) mode ..... | 849 |
| 27.4.10 | AES Galois/counter mode (GCM) ..... | 851 |
| 27.4.11 | AES Galois message authentication code (GMAC) ..... | 856 |
| 27.4.12 | AES counter with CBC-MAC (CCM) ..... | 858 |
| 27.4.13 | AES data registers and data swapping ..... | 863 |
| 27.4.14 | AES key registers ..... | 865 |
| 27.4.15 | AES initialization vector registers ..... | 865 |
| 27.4.16 | AES DMA interface ..... | 866 |
| 27.4.17 | AES error management ..... | 867 |
| 27.5 | AES interrupts ..... | 868 |
| 27.6 | AES processing latency ..... | 868 |
| 27.7 | AES registers ..... | 869 |
| 27.7.1 | AES control register (AES_CR) ..... | 869 |
| 27.7.2 | AES status register (AES_SR) ..... | 872 |
| 27.7.3 | AES data input register (AES_DINR) ..... | 873 |
| 27.7.4 | AES data output register (AES_DOUTR) ..... | 873 |
27.7.5 AES key register 0 (AES_KEYR0) . . . . . 874
27.7.6 AES key register 1 (AES_KEYR1) . . . . . 875
27.7.7 AES key register 2 (AES_KEYR2) . . . . . 875
27.7.8 AES key register 3 (AES_KEYR3) . . . . . 875
27.7.9 AES initialization vector register 0 (AES_IVR0) . . . . . 876
27.7.10 AES initialization vector register 1 (AES_IVR1) . . . . . 876
27.7.11 AES initialization vector register 2 (AES_IVR2) . . . . . 876
27.7.12 AES initialization vector register 3 (AES_IVR3) . . . . . 877
27.7.13 AES key register 4 (AES_KEYR4) . . . . . 877
27.7.14 AES key register 5 (AES_KEYR5) . . . . . 877
27.7.15 AES key register 6 (AES_KEYR6) . . . . . 878
27.7.16 AES key register 7 (AES_KEYR7) . . . . . 878
27.7.17 AES suspend registers (AES_SUSPxR) . . . . . 878
27.7.18 AES register map . . . . . 879
28 High-resolution timer (HRTIM) . . . . . 881
28.1 Introduction . . . . . 881
28.2 Main features . . . . . 882
28.3 Functional description . . . . . 883
28.3.1 General description . . . . . 883
28.3.2 HRTIM pins and internal signals . . . . . 885
28.3.3 Clocks . . . . . 889
28.3.4 Timer A..F timing units . . . . . 892
28.3.5 Master timer . . . . . 913
28.3.6 Up-down counting mode . . . . . 915
28.3.7 Set / reset events priorities and narrow pulses management . . . . . 922
28.3.8 External events global conditioning . . . . . 925
28.3.9 External event filtering in timing units . . . . . 929
28.3.10 Delayed protection . . . . . 935
28.3.11 Register preload and update management . . . . . 942
28.3.12 PWM mode with “greater than” comparison . . . . . 946
28.3.13 Events propagation within or across multiple timers . . . . . 947
28.3.14 Output management . . . . . 952
28.3.15 Burst mode controller . . . . . 954
28.3.16 Chopper . . . . . 962
28.3.17 Fault protection . . . . . 963
28.3.18 Auxiliary outputs . . . . . 967
| 28.3.19 | Synchronizing the HRTIM with other timers or HRTIM instances . . . . | 970 |
| 28.3.20 | ADC triggers . . . . . | 973 |
| 28.3.21 | DAC triggers . . . . . | 977 |
| 28.3.22 | Interrupts . . . . . | 981 |
| 28.3.23 | DMA . . . . . | 983 |
| 28.3.24 | HRTIM initialization . . . . . | 987 |
| 28.3.25 | Debug . . . . . | 988 |
| 28.4 | Application use cases . . . . . | 989 |
| 28.4.1 | Buck converter . . . . . | 989 |
| 28.4.2 | Buck converter with synchronous rectification . . . . . | 990 |
| 28.4.3 | Multiphase converters . . . . . | 991 |
| 28.4.4 | Transition mode power factor correction . . . . . | 992 |
| 28.5 | HRTIM registers . . . . . | 995 |
| 28.5.1 | HRTIM master timer control register (HRTIM_MCR) . . . . . | 995 |
| 28.5.2 | HRTIM master timer interrupt status register (HRTIM_MISR) . . . . . | 998 |
| 28.5.3 | HRTIM master timer interrupt clear register (HRTIM_MICR) . . . . . | 999 |
| 28.5.4 | HRTIM master timer DMA interrupt enable register (HRTIM_MDIER) . . . . . | 1000 |
| 28.5.5 | HRTIM master timer counter register (HRTIM_MCNTR) . . . . . | 1002 |
| 28.5.6 | HRTIM master timer period register (HRTIM_MPER) . . . . . | 1002 |
| 28.5.7 | HRTIM master timer repetition register (HRTIM_MREP) . . . . . | 1003 |
| 28.5.8 | HRTIM master timer compare 1 register (HRTIM_MCMP1R) . . . . . | 1003 |
| 28.5.9 | HRTIM master timer compare 2 register (HRTIM_MCMP2R) . . . . . | 1004 |
| 28.5.10 | HRTIM master timer compare 3 register (HRTIM_MCMP3R) . . . . . | 1004 |
| 28.5.11 | HRTIM master timer compare 4 register (HRTIM_MCMP4R) . . . . . | 1005 |
| 28.5.12 | HRTIM timer x control register (HRTIM_TIMxCR) (x = A to F) . . . . . | 1006 |
| 28.5.13 | HRTIM timer x interrupt status register (HRTIM_TIMxISR) (x = A to F) . . . . . | 1010 |
| 28.5.14 | HRTIM timer x interrupt clear register (HRTIM_TIMxICR) (x = A to F) . . . . . | 1012 |
| 28.5.15 | HRTIM timer x DMA interrupt enable register (HRTIM_TIMxDIER) (x = A to F) . . . . . | 1013 |
| 28.5.16 | HRTIM timer x counter register (HRTIM_CNTxR) (x = A to F) . . . . . | 1017 |
| 28.5.17 | HRTIM timer x period register (HRTIM_PERxR) (x = A to F) . . . . . | 1017 |
| 28.5.18 | HRTIM timer x repetition register (HRTIM_REPxR) (x = A to F) . . . . . | 1019 |
| 28.5.19 | HRTIM timer x compare 1 register (HRTIM_CMP1xR) (x = A to F) . . . . . | 1019 |
| 28.5.20 | HRTIM timer x compare 1 compound register (HRTIM_CMP1CxR) (x = A to F) . . . . . | 1021 |
| 28.5.21 | HRTIM timer x compare 2 register (HRTIM_CMP2xR) (x = A to F) . . . | 1021 |
| 28.5.22 | HRTIM timer x compare 3 register (HRTIM_CMP3xR) (x = A to F) . . . | 1023 |
| 28.5.23 | HRTIM timer x compare 4 register (HRTIM_CMP4xR) (x = A to F) . . . | 1024 |
| 28.5.24 | HRTIM timer x capture 1 register (HRTIM_CPT1xR) (x = A to F) . . . | 1025 |
| 28.5.25 | HRTIM timer x capture 2 register (HRTIM_CPT2xR) (x = A to F) . . . . . | 1026 |
| 28.5.26 | HRTIM timer x deadtime register (HRTIM_DTxR) (x = A to F) . . . . . | 1027 |
| 28.5.27 | HRTIM timer x output 1 set register (HRTIM_SETx1R) (x = A to F) . . | 1029 |
| 28.5.28 | HRTIM timer x output 1 reset register (HRTIM_RSTx1R) (x = A to F) | 1032 |
| 28.5.29 | HRTIM timer x output 2 set register (HRTIM_SETx2R) (x = A to F) . . | 1034 |
| 28.5.30 | HRTIM timer x output 2 reset register (HRTIM_RSTx2R) (x = A to F) | 1037 |
| 28.5.31 | HRTIM timer x external event filtering register 1 (HRTIM_EEFxR1) (x = A to F) . . . . . | 1040 |
| 28.5.32 | HRTIM timer x external event filtering register 2 (HRTIM_EEFxR2) (x = A to F) . . . . . | 1042 |
| 28.5.33 | HRTIM timer A reset register (HRTIM_RSTAR) . . . . . | 1043 |
| 28.5.34 | HRTIM timer B reset register (HRTIM_RSTBR) . . . . . | 1045 |
| 28.5.35 | HRTIM timer C reset register (HRTIM_RSTCR) . . . . . | 1047 |
| 28.5.36 | HRTIM timer D reset register (HRTIM_RSTDR) . . . . . | 1049 |
| 28.5.37 | HRTIM timer E reset register (HRTIM_RSTER) . . . . . | 1051 |
| 28.5.38 | HRTIM timer F reset register (HRTIM_RSTFR) . . . . . | 1053 |
| 28.5.39 | HRTIM timer x chopper register (HRTIM_CHPxR) (x = A to F) . . . . . | 1055 |
| 28.5.40 | HRTIM timer A capture 1 control register (HRTIM_CPT1ACR) . . . . . | 1056 |
| 28.5.41 | HRTIM timer B capture 1 control register (HRTIM_CPT1BCR) . . . . . | 1058 |
| 28.5.42 | HRTIM timer C capture 1 control register (HRTIM_CPT1CCR) . . . . . | 1060 |
| 28.5.43 | HRTIM timer D capture 1 control register (HRTIM_CPT1DCR) . . . . . | 1062 |
| 28.5.44 | HRTIM timer E capture 1 control register (HRTIM_CPT1ECR) . . . . . | 1064 |
| 28.5.45 | HRTIM timer F capture 1 control register (HRTIM_CPT1FCR) . . . . . | 1066 |
| 28.5.46 | HRTIM timer A capture 2 control register (HRTIM_CPT2ACR) . . . . . | 1068 |
| 28.5.47 | HRTIM timer B capture 2 control register (HRTIM_CPT2BCR) . . . . . | 1070 |
| 28.5.48 | HRTIM timer C capture 2 control register (HRTIM_CPT2CCR) . . . . . | 1072 |
| 28.5.49 | HRTIM timer D capture 2 control register (HRTIM_CPT2DCR) . . . . . | 1074 |
| 28.5.50 | HRTIM timer E capture 2 control register (HRTIM_CPT2ECR) . . . . . | 1076 |
| 28.5.51 | HRTIM timer F capture 2 control register (HRTIM_CPT2FCR) . . . . . | 1078 |
| 28.5.52 | HRTIM timer x output register (HRTIM_OUTxR) (x = A to F) . . . . . | 1080 |
| 28.5.53 | HRTIM timer x fault register (HRTIM_FLTxR) (x = A to F) . . . . . | 1083 |
| 28.5.54 | HRTIM timer x control register 2 (HRTIM_TIMxCR2) (x = A to F) . . . | 1084 |
| 28.5.55 | HRTIM timer x external event filtering register 3 (HRTIM_TIMxEEFR3) (x = A to F) . . . . . | 1087 |
| 28.5.56 | HRTIM control register 1 (HRTIM_CR1) . . . . . | 1088 |
| 28.5.57 | HRTIM control register 2 (HRTIM_CR2) . . . . . | 1090 |
| 28.5.58 | HRTIM interrupt status register (HRTIM_ISR) . . . . . | 1091 |
| 28.5.59 | HRTIM interrupt clear register (HRTIM_ICR) . . . . . | 1093 |
| 28.5.60 | HRTIM interrupt enable register (HRTIM_IER) . . . . . | 1094 |
| 28.5.61 | HRTIM output enable register (HRTIM_OENR) . . . . . | 1095 |
| 28.5.62 | HRTIM output disable register (HRTIM_ODISR) . . . . . | 1096 |
| 28.5.63 | HRTIM output disable status register (HRTIM_ODSR) . . . . . | 1097 |
| 28.5.64 | HRTIM burst mode control register (HRTIM_BMCR) . . . . . | 1098 |
| 28.5.65 | HRTIM burst mode trigger register (HRTIM_BMTRGR) . . . . . | 1100 |
| 28.5.66 | HRTIM burst mode compare register (HRTIM_BMCMR) . . . . . | 1102 |
| 28.5.67 | HRTIM burst mode period register (HRTIM_BMPER) . . . . . | 1102 |
| 28.5.68 | HRTIM timer external event control register 1 (HRTIM_EECR1) . . . . . | 1103 |
| 28.5.69 | HRTIM timer external event control register 2 (HRTIM_EECR2) . . . . . | 1105 |
| 28.5.70 | HRTIM timer external event control register 3 (HRTIM_EECR3) . . . . . | 1106 |
| 28.5.71 | HRTIM ADC trigger 1 register (HRTIM_ADC1R) . . . . . | 1107 |
| 28.5.72 | HRTIM ADC trigger 2 register (HRTIM_ADC2R) . . . . . | 1110 |
| 28.5.73 | HRTIM ADC trigger 3 register (HRTIM_ADC3R) . . . . . | 1112 |
| 28.5.74 | HRTIM ADC trigger 4 register (HRTIM_ADC4R) . . . . . | 1114 |
| 28.5.75 | HRTIM DLL control register (HRTIM_DLLCR) . . . . . | 1116 |
| 28.5.76 | HRTIM fault input register 1 (HRTIM_FLTINR1) . . . . . | 1117 |
| 28.5.77 | HRTIM fault input register 2 (HRTIM_FLTINR2) . . . . . | 1119 |
| 28.5.78 | HRTIM burst DMA master timer update register (HRTIM_BDMUPR) . . . . . | 1121 |
| 28.5.79 | HRTIM burst DMA timer x update register (HRTIM_BDTxUPR) (x = A to F) . . . . . | 1122 |
| 28.5.80 | HRTIM burst DMA data register (HRTIM_BDMADR) . . . . . | 1123 |
| 28.5.81 | HRTIM ADC extended trigger register (HRTIM_ADCER) . . . . . | 1124 |
| 28.5.82 | HRTIM ADC trigger update register (HRTIM_ADCUR) . . . . . | 1127 |
| 28.5.83 | HRTIM ADC post scaler register 1 (HRTIM_ADCPS1) . . . . . | 1128 |
| 28.5.84 | HRTIM ADC post scaler register 2 (HRTIM_ADCPS2) . . . . . | 1129 |
| 28.5.85 | HRTIM fault input register 3 (HRTIM_FLTINR3) . . . . . | 1130 |
| 28.5.86 | HRTIM fault input register 4 (HRTIM_FLTINR4) . . . . . | 1132 |
| 28.5.87 | HRTIM register map . . . . . | 1134 |
| 29 | Advanced-control timers (TIM1/TIM8/TIM20) . . . . . | 1144 |
| 29.1 | TIM1/TIM8/TIM20 introduction . . . . . | 1144 |
- 29.2 TIM1/TIM8/TIM20 main features . . . . .1144
- 29.3 TIM1/TIM8/TIM20 functional description . . . . .1145
- 29.3.1 Block diagram . . . . . 1145
- 29.3.2 TIM1/TIM8/TIM20 pins and internal signals . . . . . 1146
- 29.3.3 Time-base unit . . . . . 1151
- 29.3.4 Counter modes . . . . . 1153
- 29.3.5 Repetition counter . . . . . 1165
- 29.3.6 External trigger input . . . . . 1166
- 29.3.7 Clock selection . . . . . 1167
- 29.3.8 Capture/compare channels . . . . . 1171
- 29.3.9 Input capture mode . . . . . 1174
- 29.3.10 PWM input mode . . . . . 1175
- 29.3.11 Forced output mode . . . . . 1176
- 29.3.12 Output compare mode . . . . . 1176
- 29.3.13 PWM mode . . . . . 1178
- 29.3.14 Asymmetric PWM mode . . . . . 1186
- 29.3.15 Combined PWM mode . . . . . 1187
- 29.3.16 Combined 3-phase PWM mode . . . . . 1188
- 29.3.17 Complementary outputs and dead-time insertion . . . . . 1189
- 29.3.18 Using the break function . . . . . 1192
- 29.3.19 Bidirectional break inputs . . . . . 1198
- 29.3.20 Clearing the tim_ocxref signal on an external event . . . . . 1199
- 29.3.21 6-step PWM generation . . . . . 1201
- 29.3.22 One-pulse mode . . . . . 1202
- 29.3.23 Retriggerable One-pulse mode . . . . . 1204
- 29.3.24 Pulse on compare mode . . . . . 1205
- 29.3.25 Encoder interface mode . . . . . 1207
- 29.3.26 Direction bit output . . . . . 1224
- 29.3.27 UIF bit remapping . . . . . 1225
- 29.3.28 Timer input XOR function . . . . . 1225
- 29.3.29 Interfacing with Hall sensors . . . . . 1225
- 29.3.30 Timer synchronization . . . . . 1227
- 29.3.31 ADC triggers . . . . . 1232
- 29.3.32 DMA burst mode . . . . . 1232
- 29.3.33 TIM1/TIM8/TIM20 DMA requests . . . . . 1233
- 29.3.34 Debug mode . . . . . 1233
- 29.4 TIM1/TIM8/TIM20 low-power modes . . . . . 1234
| 29.5 | TIM1/TIM8/TIM20 interrupts . . . . . | 1234 |
| 29.6 | TIM1/TIM8/TIM20 registers . . . . . | 1235 |
| 29.6.1 | TIMx control register 1 (TIMx_CR1)(x = 1, 8, 20) . . . . . | 1235 |
| 29.6.2 | TIMx control register 2 (TIMx_CR2)(x = 1, 8, 20) . . . . . | 1236 |
| 29.6.3 | TIMx slave mode control register (TIMx_SMCR)(x = 1, 8, 20) . . . . . | 1240 |
| 29.6.4 | TIMx DMA/interrupt enable register (TIMx_DIER)(x = 1, 8, 20) . . . . . | 1244 |
| 29.6.5 | TIMx status register (TIMx_SR)(x = 1, 8, 20) . . . . . | 1245 |
| 29.6.6 | TIMx event generation register (TIMx_EGR)(x = 1, 8, 20) . . . . . | 1248 |
| 29.6.7 | TIMx capture/compare mode register 1 (TIMx_CCMR1) (x = 1, 8, 20) . . . . . | 1249 |
| 29.6.8 | TIMx capture/compare mode register 1 [alternate] (TIMx_CCMR1)(x = 1, 8, 20) . . . . . | 1251 |
| 29.6.9 | TIMx capture/compare mode register 2 (TIMx_CCMR2) (x = 1, 8, 20) . . . . . | 1254 |
| 29.6.10 | TIMx capture/compare mode register 2 [alternate] (TIMx_CCMR2)(x = 1, 8, 20) . . . . . | 1255 |
| 29.6.11 | TIMx capture/compare enable register (TIMx_CCER)(x = 1, 8, 20) . . . . . | 1258 |
| 29.6.12 | TIMx counter (TIMx_CNT)(x = 1, 8, 20) . . . . . | 1262 |
| 29.6.13 | TIMx prescaler (TIMx_PSC)(x = 1, 8, 20) . . . . . | 1262 |
| 29.6.14 | TIMx autoreload register (TIMx_ARR)(x = 1, 8, 20) . . . . . | 1263 |
| 29.6.15 | TIMx repetition counter register (TIMx_RCR)(x = 1, 8, 20) . . . . . | 1263 |
| 29.6.16 | TIMx capture/compare register 1 (TIMx_CCR1)(x = 1, 8, 20) . . . . . | 1264 |
| 29.6.17 | TIMx capture/compare register 2 (TIMx_CCR2)(x = 1, 8, 20) . . . . . | 1264 |
| 29.6.18 | TIMx capture/compare register 3 (TIMx_CCR3)(x = 1, 8, 20) . . . . . | 1265 |
| 29.6.19 | TIMx capture/compare register 4 (TIMx_CCR4)(x = 1, 8, 20) . . . . . | 1266 |
| 29.6.20 | TIMx break and dead-time register (TIMx_BDTR)(x = 1, 8, 20) . . . . . | 1267 |
| 29.6.21 | TIMx capture/compare register 5 (TIMx_CCR5)(x = 1, 8, 20) . . . . . | 1271 |
| 29.6.22 | TIMx capture/compare register 6 (TIMx_CCR6)(x = 1, 8, 20) . . . . . | 1272 |
| 29.6.23 | TIMx capture/compare mode register 3 (TIMx_CCMR3) (x = 1, 8, 20) . . . . . | 1273 |
| 29.6.24 | TIMx timer deadtime register 2 (TIMx_DTR2)(x = 1, 8, 20) . . . . . | 1274 |
| 29.6.25 | TIMx timer encoder control register (TIMx_ECR)(x = 1, 8, 20) . . . . . | 1275 |
| 29.6.26 | TIMx timer input selection register (TIMx_TISEL)(x = 1, 8, 20) . . . . . | 1276 |
| 29.6.27 | TIMx alternate function option register 1 (TIMx_AF1)(x = 1, 8, 20) . . . . . | 1277 |
| 29.6.28 | TIMx alternate function register 2 (TIMx_AF2)(x = 1, 8, 20) . . . . . | 1280 |
| 29.6.29 | TIMx DMA control register (TIMx_DCR)(x = 1, 8, 20) . . . . . | 1282 |
| 29.6.30 | TIMx DMA address for full transfer (TIMx_DMAR)(x = 1, 8, 20) . . . . . | 1283 |
| 29.6.31 | TIMx register map . . . . . | 1284 |
| 30 | General-purpose timers (TIM2/TIM3/TIM4/TIM5) . . . . . | 1287 |
| 30.1 | TIM2/TIM3/TIM4/TIM5 introduction . . . . . | 1287 |
| 30.2 | TIM2/TIM3/TIM4/TIM5 main features . . . . . | 1287 |
| 30.3 | TIM2/TIM3/TIM4/TIM5 implementation . . . . . | 1288 |
| 30.4 | TIM2/TIM3/TIM4/TIM5 functional description . . . . . | 1289 |
| 30.4.1 | Block diagram . . . . . | 1289 |
| 30.4.2 | TIM2/TIM3/TIM4/TIM5 pins and internal signals . . . . . | 1290 |
| 30.4.3 | Time-base unit . . . . . | 1294 |
| 30.4.4 | Counter modes . . . . . | 1296 |
| 30.4.5 | Clock selection . . . . . | 1308 |
| 30.4.6 | Capture/compare channels . . . . . | 1312 |
| 30.4.7 | Input capture mode . . . . . | 1314 |
| 30.4.8 | PWM input mode . . . . . | 1315 |
| 30.4.9 | Forced output mode . . . . . | 1316 |
| 30.4.10 | Output compare mode . . . . . | 1316 |
| 30.4.11 | PWM mode . . . . . | 1318 |
| 30.4.12 | Asymmetric PWM mode . . . . . | 1326 |
| 30.4.13 | Combined PWM mode . . . . . | 1327 |
| 30.4.14 | Clearing the tim_ocxref signal on an external event . . . . . | 1328 |
| 30.4.15 | One-pulse mode . . . . . | 1330 |
| 30.4.16 | Retriggerable one-pulse mode . . . . . | 1331 |
| 30.4.17 | Pulse on compare mode . . . . . | 1332 |
| 30.4.18 | Encoder interface mode . . . . . | 1334 |
| 30.4.19 | Direction bit output . . . . . | 1352 |
| 30.4.20 | UIF bit remapping . . . . . | 1353 |
| 30.4.21 | Timer input XOR function . . . . . | 1353 |
| 30.4.22 | Timers and external trigger synchronization . . . . . | 1353 |
| 30.4.23 | Timer synchronization . . . . . | 1357 |
| 30.4.24 | ADC triggers . . . . . | 1362 |
| 30.4.25 | DMA burst mode . . . . . | 1363 |
| 30.4.26 | TIM2/TIM3/TIM4/TIM5 DMA requests . . . . . | 1364 |
| 30.4.27 | Debug mode . . . . . | 1364 |
| 30.4.28 | TIM2/TIM3/TIM4/TIM5 low-power modes . . . . . | 1364 |
| 30.4.29 | TIM2/TIM3/TIM4/TIM5 interrupts . . . . . | 1365 |
| 30.5 | TIM2/TIM3/TIM4/TIM5 registers . . . . . | 1366 |
| 30.5.1 | TIMx control register 1 (TIMx_CR1)(x = 2 to 5) . . . . . | 1366 |
| 30.5.2 | TIMx control register 2 (TIMx_CR2)(x = 2 to 5) . . . . . | 1367 |
| 30.5.3 | TIMx slave mode control register (TIMx_SMCR)(x = 2 to 5) . . . . . | 1369 |
| 30.5.4 | TIMx DMA/Interrupt enable register (TIMx_DIER)(x = 2 to 5) . . . . . | 1373 |
| 30.5.5 | TIMx status register (TIMx_SR)(x = 2 to 5) . . . . . | 1374 |
| 30.5.6 | TIMx event generation register (TIMx_EGR)(x = 2 to 5) . . . . . | 1376 |
| 30.5.7 | TIMx capture/compare mode register 1 (TIMx_CCMR1)(x = 2 to 5) . . . . . | 1377 |
| 30.5.8 | TIMx capture/compare mode register 1 [alternate] (TIMx_CCMR1)(x = 2 to 5) . . . . . | 1379 |
| 30.5.9 | TIMx capture/compare mode register 2 (TIMx_CCMR2)(x = 2 to 5) . . . . . | 1381 |
| 30.5.10 | TIMx capture/compare mode register 2 [alternate] (TIMx_CCMR2)(x = 2 to 5) . . . . . | 1382 |
| 30.5.11 | TIMx capture/compare enable register (TIMx_CCER)(x = 2 to 5) . . . . . | 1385 |
| 30.5.12 | TIMx counter (TIMx_CNT)(x = 3, 4) . . . . . | 1386 |
| 30.5.13 | TIMx counter (TIMx_CNT)(x = 2, 5) . . . . . | 1387 |
| 30.5.14 | TIMx prescaler (TIMx_PSC)(x = 2 to 5) . . . . . | 1387 |
| 30.5.15 | TIMx autoreload register (TIMx_ARR)(x = 3, 4) . . . . . | 1388 |
| 30.5.16 | TIMx autoreload register (TIMx_ARR)(x = 2, 5) . . . . . | 1388 |
| 30.5.17 | TIMx capture/compare register 1 (TIMx_CCR1)(x = 3, 4) . . . . . | 1389 |
| 30.5.18 | TIMx capture/compare register 1 (TIMx_CCR1)(x = 2, 5) . . . . . | 1390 |
| 30.5.19 | TIMx capture/compare register 2 (TIMx_CCR2)(x = 3, 4) . . . . . | 1390 |
| 30.5.20 | TIMx capture/compare register 2 (TIMx_CCR2)(x = 2, 5) . . . . . | 1391 |
| 30.5.21 | TIMx capture/compare register 3 (TIMx_CCR3)(x = 3, 4) . . . . . | 1392 |
| 30.5.22 | TIMx capture/compare register 3 (TIMx_CCR3)(x = 2, 5) . . . . . | 1393 |
| 30.5.23 | TIMx capture/compare register 4 (TIMx_CCR4)(x = 3, 4) . . . . . | 1394 |
| 30.5.24 | TIMx capture/compare register 4 (TIMx_CCR4)(x = 2, 5) . . . . . | 1395 |
| 30.5.25 | TIMx timer encoder control register (TIMx_ECR)(x = 2 to 5) . . . . . | 1396 |
| 30.5.26 | TIMx timer input selection register (TIMx_TISEL)(x = 2 to 5) . . . . . | 1397 |
| 30.5.27 | TIMx alternate function register 1 (TIMx_AF1)(x = 2 to 5) . . . . . | 1398 |
| 30.5.28 | TIMx alternate function register 2 (TIMx_AF2)(x = 2 to 5) . . . . . | 1399 |
| 30.5.29 | TIMx DMA control register (TIMx_DCR)(x = 2 to 5) . . . . . | 1400 |
| 30.5.30 | TIMx DMA address for full transfer (TIMx_DMAR)(x = 2 to 5) . . . . . | 1401 |
| 30.5.31 | TIMx register map . . . . . | 1401 |
| 31 | General purpose timers (TIM15/TIM16/TIM17) . . . . . | 1404 |
| 31.1 | TIM15/TIM16/TIM17 introduction . . . . . | 1404 |
| 31.2 | TIM15 main features . . . . . | 1404 |
| 31.3 | TIM16/TIM17 main features . . . . . | 1405 |
| 31.4 | TIM15/TIM16/TIM17 functional description . . . . . | 1406 |
| 31.4.1 | Block diagram . . . . . | 1406 |
| 31.4.2 | TIM15/TIM16/TIM17 pins and internal signals . . . . . | 1407 |
| 31.4.3 | Time-base unit . . . . . | 1411 |
| 31.4.4 | Counter modes . . . . . | 1413 |
| 31.4.5 | Repetition counter . . . . . | 1417 |
| 31.4.6 | Clock selection . . . . . | 1418 |
| 31.4.7 | Capture/compare channels . . . . . | 1420 |
| 31.4.8 | Input capture mode . . . . . | 1422 |
| 31.4.9 | PWM input mode (only for TIM15) . . . . . | 1424 |
| 31.4.10 | Forced output mode . . . . . | 1425 |
| 31.4.11 | Output compare mode . . . . . | 1425 |
| 31.4.12 | PWM mode . . . . . | 1427 |
| 31.4.13 | Combined PWM mode (TIM15 only) . . . . . | 1432 |
| 31.4.14 | Complementary outputs and dead-time insertion . . . . . | 1433 |
| 31.4.15 | Using the break function . . . . . | 1436 |
| 31.4.16 | Bidirectional break input . . . . . | 1440 |
| 31.4.17 | Clearing the tim_ocxref signal on an external event . . . . . | 1441 |
| 31.4.18 | 6-step PWM generation . . . . . | 1442 |
| 31.4.19 | One-pulse mode . . . . . | 1444 |
| 31.4.20 | Retriggerable one pulse mode (TIM15 only) . . . . . | 1445 |
| 31.4.21 | UIF bit remapping . . . . . | 1446 |
| 31.4.22 | Timer input XOR function (TIM15 only) . . . . . | 1446 |
| 31.4.23 | External trigger synchronization (TIM15 only) . . . . . | 1446 |
| 31.4.24 | Slave mode – combined reset + trigger mode (TIM15 only) . . . . . | 1449 |
| 31.4.25 | Slave mode – combined reset + gated mode (TIM15 only) . . . . . | 1449 |
| 31.4.26 | Timer synchronization (TIM15 only) . . . . . | 1450 |
| 31.4.27 | Using timer output as trigger for other timers (TIM16/TIM17 only) . . . . . | 1450 |
| 31.4.28 | ADC triggers (TIM15 only) . . . . . | 1450 |
| 31.4.29 | DMA burst mode . . . . . | 1450 |
| 31.4.30 | TIM15/TIM16/TIM17 DMA requests . . . . . | 1451 |
| 31.4.31 | Debug mode . . . . . | 1451 |
| 31.5 | TIM15/TIM16/TIM17 low-power modes . . . . . | 1452 |
| 31.6 | TIM15/TIM16/TIM17 interrupts . . . . . | 1452 |
| 31.7 | TIM15 registers . . . . . | 1453 |
| 31.7.1 | TIM15 control register 1 (TIM15_CR1) . . . . . | 1453 |
| 31.7.2 | TIM15 control register 2 (TIM15_CR2) . . . . . | 1454 |
| 31.7.3 | TIM15 slave mode control register (TIM15_SMCR) . . . . . | 1456 |
| 31.7.4 | TIM15 DMA/interrupt enable register (TIM15_DIER) . . . . . | 1458 |
| 31.7.5 | TIM15 status register (TIM15_SR) . . . . . | 1459 |
| 31.7.6 | TIM15 event generation register (TIM15_EGR) . . . . . | 1461 |
| 31.7.7 | TIM15 capture/compare mode register 1 (TIM15_CCMR1) . . . . . | 1462 |
| 31.7.8 | TIM15 capture/compare mode register 1 [alternate] (TIM15_CCMR1) . . . . . | 1463 |
| 31.7.9 | TIM15 capture/compare enable register (TIM15_CCER) . . . . . | 1466 |
| 31.7.10 | TIM15 counter (TIM15_CNT) . . . . . | 1469 |
| 31.7.11 | TIM15 prescaler (TIM15_PSC) . . . . . | 1469 |
| 31.7.12 | TIM15 autoreload register (TIM15_ARR) . . . . . | 1470 |
| 31.7.13 | TIM15 repetition counter register (TIM15_RCR) . . . . . | 1470 |
| 31.7.14 | TIM15 capture/compare register 1 (TIM15_CCR1) . . . . . | 1471 |
| 31.7.15 | TIM15 capture/compare register 2 (TIM15_CCR2) . . . . . | 1472 |
| 31.7.16 | TIM15 break and dead-time register (TIM15_BDTR) . . . . . | 1472 |
| 31.7.17 | TIM15 timer deadtime register 2 (TIM15_DTR2) . . . . . | 1475 |
| 31.7.18 | TIM15 input selection register (TIM15_TISEL) . . . . . | 1476 |
| 31.7.19 | TIM15 alternate function register 1 (TIM15_AF1) . . . . . | 1477 |
| 31.7.20 | TIM15 alternate function register 2 (TIM15_AF2) . . . . . | 1479 |
| 31.7.21 | TIM15 DMA control register (TIM15_DCR) . . . . . | 1480 |
| 31.7.22 | TIM15 DMA address for full transfer (TIM15_DMAR) . . . . . | 1480 |
| 31.7.23 | TIM15 register map . . . . . | 1481 |
| 31.8 | TIM16/TIM17 registers . . . . . | 1484 |
| 31.8.1 | TIMx control register 1 (TIMx_CR1)(x = 16 to 17) . . . . . | 1484 |
| 31.8.2 | TIMx control register 2 (TIMx_CR2)(x = 16 to 17) . . . . . | 1485 |
| 31.8.3 | TIMx DMA/interrupt enable register (TIMx_DIER)(x = 16 to 17) . . . . . | 1486 |
| 31.8.4 | TIMx status register (TIMx_SR)(x = 16 to 17) . . . . . | 1487 |
| 31.8.5 | TIMx event generation register (TIMx_EGR)(x = 16 to 17) . . . . . | 1488 |
| 31.8.6 | TIMx capture/compare mode register 1 (TIMx_CCMR1) (x = 16 to 17) . . . . . | 1489 |
| 31.8.7 | TIMx capture/compare mode register 1 [alternate] (TIMx_CCMR1)(x = 16 to 17) . . . . . | 1490 |
| 31.8.8 | TIMx capture/compare enable register (TIMx_CCER)(x = 16 to 17) . . . . . | 1492 |
| 31.8.9 | TIMx counter (TIMx_CNT)(x = 16 to 17) . . . . . | 1495 |
| 31.8.10 | TIMx prescaler (TIMx_PSC)(x = 16 to 17) . . . . . | 1495 |
| 31.8.11 | TIMx auto-reautoreload register (TIMx_ARR)(x = 16 to 17) . . . . . | 1496 |
| 31.8.12 | TIMx repetition counter register (TIMx_RCR)(x = 16 to 17) . . . . . | 1496 |
| 31.8.13 | TIMx capture/compare register 1 (TIMx_CCR1)(x = 16 to 17) . . . . . | 1497 |
| 31.8.14 | TIMx break and dead-time register (TIMx_BDTR)(x = 16 to 17) . . . . | 1498 |
| 31.8.15 | TIMx timer deadtime register 2 (TIMx_DTR2)(x = 16 to 17) . . . . . | 1501 |
| 31.8.16 | TIMx input selection register (TIMx_TISEL)(x = 16 to 17) . . . . . | 1502 |
| 31.8.17 | TIMx alternate function register 1 (TIMx_AF1)(x = 16 to 17) . . . . . | 1502 |
| 31.8.18 | TIMx alternate function register 2 (TIMx_AF2)(x = 16 to 17) . . . . . | 1505 |
| 31.8.19 | TIMx option register 1 (TIMx_OR1)(x = 16 to 17) . . . . . | 1505 |
| 31.8.20 | TIMx DMA control register (TIMx_DCR)(x = 16 to 17) . . . . . | 1506 |
| 31.8.21 | TIM16/TIM17 DMA address for full transfer (TIMx_DMAR)(x = 16 to 17) . . . . . | 1506 |
| 31.8.22 | TIM16/TIM17 register map . . . . . | 1508 |
| 32 | Basic timers (TIM6/TIM7) . . . . . | 1510 |
| 32.1 | TIM6/TIM7 introduction . . . . . | 1510 |
| 32.2 | TIM6/TIM7 main features . . . . . | 1510 |
| 32.3 | TIM6/TIM7 functional description . . . . . | 1511 |
| 32.3.1 | TIM6/TIM7 block diagram . . . . . | 1511 |
| 32.3.2 | TIM6/TIM7 internal signals . . . . . | 1511 |
| 32.3.3 | TIM6/TIM7 clocks . . . . . | 1512 |
| 32.3.4 | Time-base unit . . . . . | 1512 |
| 32.3.5 | Counting mode . . . . . | 1514 |
| 32.3.6 | UIF bit remapping . . . . . | 1522 |
| 32.3.7 | ADC triggers . . . . . | 1523 |
| 32.3.8 | TIM6/TIM7 DMA requests . . . . . | 1523 |
| 32.3.9 | Debug mode . . . . . | 1523 |
| 32.3.10 | TIM6/TIM7 low-power modes . . . . . | 1523 |
| 32.3.11 | TIM6/TIM7 interrupts . . . . . | 1523 |
| 32.4 | TIM6/TIM7 registers . . . . . | 1524 |
| 32.4.1 | TIMx control register 1 (TIMx_CR1)(x = 6 to 7) . . . . . | 1524 |
| 32.4.2 | TIMx control register 2 (TIMx_CR2)(x = 6 to 7) . . . . . | 1526 |
| 32.4.3 | TIMx DMA/Interrupt enable register (TIMx_DIER)(x = 6 to 7) . . . . . | 1526 |
| 32.4.4 | TIMx status register (TIMx_SR)(x = 6 to 7) . . . . . | 1527 |
| 32.4.5 | TIMx event generation register (TIMx_EGR)(x = 6 to 7) . . . . . | 1527 |
| 32.4.6 | TIMx counter (TIMx_CNT)(x = 6 to 7) . . . . . | 1527 |
| 32.4.7 | TIMx prescaler (TIMx_PSC)(x = 6 to 7) . . . . . | 1528 |
| 32.4.8 | TIMx autoreload register (TIMx_ARR)(x = 6 to 7) . . . . . | 1528 |
| 32.4.9 | TIMx register map . . . . . | 1529 |
| 33 | Low-power timer (LPTIM) . . . . . | 1530 |
| 33.1 | Introduction . . . . . | 1530 |
| 33.2 | LPTIM main features . . . . . | 1530 |
| 33.3 | LPTIM implementation . . . . . | 1531 |
| 33.4 | LPTIM functional description . . . . . | 1531 |
| 33.4.1 | LPTIM block diagram . . . . . | 1531 |
| 33.4.2 | LPTIM input and trigger mapping . . . . . | 1531 |
| 33.4.3 | LPTIM reset and clocks . . . . . | 1532 |
| 33.4.4 | Glitch filter . . . . . | 1533 |
| 33.4.5 | Prescaler . . . . . | 1534 |
| 33.4.6 | Trigger multiplexer . . . . . | 1534 |
| 33.4.7 | Operating mode . . . . . | 1535 |
| 33.4.8 | Timeout function . . . . . | 1537 |
| 33.4.9 | Waveform generation . . . . . | 1537 |
| 33.4.10 | Register update . . . . . | 1538 |
| 33.4.11 | Counter mode . . . . . | 1539 |
| 33.4.12 | Timer enable . . . . . | 1539 |
| 33.4.13 | Timer counter reset . . . . . | 1540 |
| 33.4.14 | Encoder mode . . . . . | 1540 |
| 33.4.15 | Debug mode . . . . . | 1542 |
| 33.5 | LPTIM low-power modes . . . . . | 1542 |
| 33.6 | LPTIM interrupts . . . . . | 1543 |
| 33.7 | LPTIM registers . . . . . | 1543 |
| 33.7.1 | LPTIM interrupt and status register (LPTIM_ISR) . . . . . | 1544 |
| 33.7.2 | LPTIM interrupt clear register (LPTIM_ICR) . . . . . | 1545 |
| 33.7.3 | LPTIM interrupt enable register (LPTIM_IER) . . . . . | 1545 |
| 33.7.4 | LPTIM configuration register (LPTIM_CFGR) . . . . . | 1546 |
| 33.7.5 | LPTIM control register (LPTIM_CR) . . . . . | 1549 |
| 33.7.6 | LPTIM compare register (LPTIM_CMP) . . . . . | 1551 |
| 33.7.7 | LPTIM autoreload register (LPTIM_ARR) . . . . . | 1551 |
| 33.7.8 | LPTIM counter register (LPTIM_CNT) . . . . . | 1552 |
| 33.7.9 | LPTIM option register (LPTIM_OR) . . . . . | 1552 |
| 33.7.10 | LPTIM register map . . . . . | 1554 |
| 34 | Infrared interface (IRTIM) . . . . . | 1555 |
35 Independent watchdog (IWDG) . . . . . 1556
35.1 Introduction . . . . . 1556
35.2 IWDG main features . . . . . 1556
35.3 IWDG functional description . . . . . 1556
35.3.1 IWDG block diagram . . . . . 1556
35.3.2 Window option . . . . . 1557
35.3.3 Hardware watchdog . . . . . 1558
35.3.4 Low-power freeze . . . . . 1558
35.3.5 Register access protection . . . . . 1558
35.3.6 Debug mode . . . . . 1558
35.4 IWDG registers . . . . . 1559
35.4.1 IWDG key register (IWDG_KR) . . . . . 1559
35.4.2 IWDG prescaler register (IWDG_PR) . . . . . 1560
35.4.3 IWDG reload register (IWDG_RLR) . . . . . 1561
35.4.4 IWDG status register (IWDG_SR) . . . . . 1562
35.4.5 IWDG window register (IWDG_WINR) . . . . . 1563
35.4.6 IWDG register map . . . . . 1564
36 System window watchdog (WWDG) . . . . . 1565
36.1 Introduction . . . . . 1565
36.2 WWDG main features . . . . . 1565
36.3 WWDG functional description . . . . . 1565
36.3.1 WWDG block diagram . . . . . 1566
36.3.2 Enabling the watchdog . . . . . 1566
36.3.3 Controlling the down-counter . . . . . 1566
36.3.4 How to program the watchdog timeout . . . . . 1566
36.3.5 Debug mode . . . . . 1568
36.4 WWDG interrupts . . . . . 1568
36.5 WWDG registers . . . . . 1568
36.5.1 WWDG control register (WWDG_CR) . . . . . 1569
36.5.2 WWDG configuration register (WWDG_CFR) . . . . . 1569
36.5.3 WWDG status register (WWDG_SR) . . . . . 1570
36.5.4 WWDG register map . . . . . 1570
37 Real-time clock (RTC) . . . . . 1571
37.1 Introduction . . . . . 1571
| 37.2 | RTC main features . . . . . | 1571 |
| 37.3 | RTC functional description . . . . . | 1572 |
| 37.3.1 | RTC block diagram . . . . . | 1572 |
| 37.3.2 | RTC pins and internal signals . . . . . | 1573 |
| 37.3.3 | GPIOs controlled by the RTC and TAMP . . . . . | 1574 |
| 37.3.4 | Clock and prescalers . . . . . | 1576 |
| 37.3.5 | Real-time clock and calendar . . . . . | 1577 |
| 37.3.6 | Programmable alarms . . . . . | 1578 |
| 37.3.7 | Periodic auto-wakeup . . . . . | 1578 |
| 37.3.8 | RTC initialization and configuration . . . . . | 1579 |
| 37.3.9 | Reading the calendar . . . . . | 1581 |
| 37.3.10 | Resetting the RTC . . . . . | 1582 |
| 37.3.11 | RTC synchronization . . . . . | 1582 |
| 37.3.12 | RTC reference clock detection . . . . . | 1583 |
| 37.3.13 | RTC smooth digital calibration . . . . . | 1583 |
| 37.3.14 | Timestamp function . . . . . | 1585 |
| 37.3.15 | Calibration clock output . . . . . | 1586 |
| 37.3.16 | Tamper and alarm output . . . . . | 1586 |
| 37.4 | RTC low-power modes . . . . . | 1587 |
| 37.5 | RTC interrupts . . . . . | 1588 |
| 37.6 | RTC registers . . . . . | 1588 |
| 37.6.1 | RTC time register (RTC_TR) . . . . . | 1588 |
| 37.6.2 | RTC date register (RTC_DR) . . . . . | 1589 |
| 37.6.3 | RTC sub second register (RTC_SSR) . . . . . | 1590 |
| 37.6.4 | RTC initialization control and status register (RTC_ICSR) . . . . . | 1590 |
| 37.6.5 | RTC prescaler register (RTC_PRER) . . . . . | 1592 |
| 37.6.6 | RTC wakeup timer register (RTC_WUTR) . . . . . | 1593 |
| 37.6.7 | RTC control register (RTC_CR) . . . . . | 1593 |
| 37.6.8 | RTC write protection register (RTC_WPR) . . . . . | 1596 |
| 37.6.9 | RTC calibration register (RTC_CALR) . . . . . | 1597 |
| 37.6.10 | RTC shift control register (RTC_SHIFTTR) . . . . . | 1598 |
| 37.6.11 | RTC timestamp time register (RTC_TSTR) . . . . . | 1599 |
| 37.6.12 | RTC timestamp date register (RTC_TSDR) . . . . . | 1599 |
| 37.6.13 | RTC timestamp sub second register (RTC_TSSSR) . . . . . | 1600 |
| 37.6.14 | RTC alarm A register (RTC_ALRMAR) . . . . . | 1601 |
| 37.6.15 | RTC alarm A sub second register (RTC_ALRMASSR) . . . . . | 1602 |
| 37.6.16 | RTC alarm B register (RTC_ALRMBR) ..... | 1603 |
| 37.6.17 | RTC alarm B sub second register (RTC_ALRMBSSR) ..... | 1604 |
| 37.6.18 | RTC status register (RTC_SR) ..... | 1604 |
| 37.6.19 | RTC masked interrupt status register (RTC_MISR) ..... | 1605 |
| 37.6.20 | RTC status clear register (RTC_SCR) ..... | 1606 |
| 37.6.21 | RTC register map ..... | 1608 |
| 38 | Tamper and backup registers (TAMP) ..... | 1610 |
| 38.1 | Introduction ..... | 1610 |
| 38.2 | TAMP main features ..... | 1610 |
| 38.3 | TAMP functional description ..... | 1611 |
| 38.3.1 | TAMP block diagram ..... | 1611 |
| 38.3.2 | TAMP pins and internal signals ..... | 1612 |
| 38.3.3 | TAMP register write protection ..... | 1612 |
| 38.3.4 | Tamper detection ..... | 1613 |
| 38.4 | TAMP low-power modes ..... | 1615 |
| 38.5 | TAMP interrupts ..... | 1615 |
| 38.6 | TAMP registers ..... | 1615 |
| 38.6.1 | TAMP control register 1 (TAMP_CR1) ..... | 1616 |
| 38.6.2 | TAMP control register 2 (TAMP_CR2) ..... | 1617 |
| 38.6.3 | TAMP filter control register (TAMP_FLTCR) ..... | 1618 |
| 38.6.4 | TAMP interrupt enable register (TAMP_IER) ..... | 1619 |
| 38.6.5 | TAMP status register (TAMP_SR) ..... | 1620 |
| 38.6.6 | TAMP masked interrupt status register (TAMP_MISR) ..... | 1621 |
| 38.6.7 | TAMP status clear register (TAMP_SCR) ..... | 1622 |
| 38.6.8 | TAMP backup x register (TAMP_BKPxR) ..... | 1623 |
| 38.6.9 | TAMP register map ..... | 1624 |
| 39 | Inter-integrated circuit interface (I2C) ..... | 1625 |
| 39.1 | I2C introduction ..... | 1625 |
| 39.2 | I2C main features ..... | 1625 |
| 39.3 | I2C implementation ..... | 1626 |
| 39.4 | I2C functional description ..... | 1626 |
| 39.4.1 | I2C block diagram ..... | 1627 |
| 39.4.2 | I2C pins and internal signals ..... | 1627 |
| 39.4.3 | I2C clock requirements ..... | 1628 |
| 39.4.4 | I2C mode selection . . . . . | 1628 |
| 39.4.5 | I2C initialization . . . . . | 1629 |
| 39.4.6 | I2C reset . . . . . | 1633 |
| 39.4.7 | I2C data transfer . . . . . | 1634 |
| 39.4.8 | I2C target mode . . . . . | 1636 |
| 39.4.9 | I2C controller mode . . . . . | 1645 |
| 39.4.10 | I2C_TIMINGR register configuration examples . . . . . | 1656 |
| 39.4.11 | SMBus specific features . . . . . | 1658 |
| 39.4.12 | SMBus initialization . . . . . | 1661 |
| 39.4.13 | SMBus I2C_TIMEOUTR register configuration examples . . . . . | 1663 |
| 39.4.14 | SMBus target mode . . . . . | 1663 |
| 39.4.15 | SMBus controller mode . . . . . | 1667 |
| 39.4.16 | Wake-up from Stop mode on address match . . . . . | 1670 |
| 39.4.17 | Error conditions . . . . . | 1671 |
| 39.5 | I2C in low-power modes . . . . . | 1673 |
| 39.6 | I2C interrupts . . . . . | 1673 |
| 39.7 | I2C DMA requests . . . . . | 1674 |
| 39.7.1 | Transmission using DMA . . . . . | 1674 |
| 39.7.2 | Reception using DMA . . . . . | 1674 |
| 39.8 | I2C debug modes . . . . . | 1674 |
| 39.9 | I2C registers . . . . . | 1675 |
| 39.9.1 | I2C control register 1 (I2C_CR1) . . . . . | 1675 |
| 39.9.2 | I2C control register 2 (I2C_CR2) . . . . . | 1677 |
| 39.9.3 | I2C own address 1 register (I2C_OAR1) . . . . . | 1679 |
| 39.9.4 | I2C own address 2 register (I2C_OAR2) . . . . . | 1680 |
| 39.9.5 | I2C timing register (I2C_TIMINGR) . . . . . | 1681 |
| 39.9.6 | I2C timeout register (I2C_TIMEOUTR) . . . . . | 1682 |
| 39.9.7 | I2C interrupt and status register (I2C_ISR) . . . . . | 1683 |
| 39.9.8 | I2C interrupt clear register (I2C_ICR) . . . . . | 1685 |
| 39.9.9 | I2C PEC register (I2C_PECR) . . . . . | 1686 |
| 39.9.10 | I2C receive data register (I2C_RXDR) . . . . . | 1686 |
| 39.9.11 | I2C transmit data register (I2C_TXDR) . . . . . | 1687 |
| 39.9.12 | I2C register map . . . . . | 1688 |
| 40 | Universal synchronous/asynchronous receiver transmitter (USART/UART) . . . . . | 1689 |
| 40.1 | USART introduction . . . . . | 1689 |
- 40.2 USART main features . . . . . 1690
- 40.3 USART extended features . . . . . 1691
- 40.4 USART implementation . . . . . 1691
- 40.5 USART functional description . . . . . 1692
- 40.5.1 USART block diagram . . . . . 1692
- 40.5.2 USART signals . . . . . 1693
- 40.5.3 USART character description . . . . . 1694
- 40.5.4 USART FIFOs and thresholds . . . . . 1696
- 40.5.5 USART transmitter . . . . . 1696
- 40.5.6 USART receiver . . . . . 1700
- 40.5.7 USART baud rate generation . . . . . 1707
- 40.5.8 Tolerance of the USART receiver to clock deviation . . . . . 1708
- 40.5.9 USART auto baud rate detection . . . . . 1710
- 40.5.10 USART multiprocessor communication . . . . . 1712
- 40.5.11 USART Modbus communication . . . . . 1714
- 40.5.12 USART parity control . . . . . 1715
- 40.5.13 USART LIN (local interconnection network) mode . . . . . 1716
- 40.5.14 USART synchronous mode . . . . . 1718
- 40.5.15 USART single-wire half-duplex communication . . . . . 1722
- 40.5.16 USART receiver timeout . . . . . 1722
- 40.5.17 USART smartcard mode . . . . . 1723
- 40.5.18 USART IrDA SIR ENDEC block . . . . . 1727
- 40.5.19 Continuous communication using USART and DMA . . . . . 1730
- 40.5.20 RS232 hardware flow control and RS485 Driver Enable . . . . . 1732
- 40.5.21 USART low-power management . . . . . 1735
- 40.6 USART in low-power modes . . . . . 1738
- 40.7 USART interrupts . . . . . 1739
- 40.8 USART registers . . . . . 1740
- 40.8.1 USART control register 1 (USART_CR1) . . . . . 1740
- 40.8.2 USART control register 1 [alternate] (USART_CR1) . . . . . 1743
- 40.8.3 USART control register 2 (USART_CR2) . . . . . 1747
- 40.8.4 USART control register 3 (USART_CR3) . . . . . 1751
- 40.8.5 USART baud rate register (USART_BRR) . . . . . 1755
- 40.8.6 USART guard time and prescaler register (USART_GTPR) . . . . . 1755
- 40.8.7 USART receiver timeout register (USART_RTOR) . . . . . 1756
- 40.8.8 USART request register (USART_RQR) . . . . . 1757
| 40.8.9 | USART interrupt and status register (USART_ISR) ..... | 1758 |
| 40.8.10 | USART interrupt and status register [alternate] (USART_ISR) ..... | 1764 |
| 40.8.11 | USART interrupt flag clear register (USART_ICR) ..... | 1769 |
| 40.8.12 | USART receive data register (USART_RDR) ..... | 1771 |
| 40.8.13 | USART transmit data register (USART_TDR) ..... | 1771 |
| 40.8.14 | USART prescaler register (USART_PRESC) ..... | 1772 |
| 40.8.15 | USART register map ..... | 1773 |
| 41 | Low-power universal asynchronous receiver transmitter (LPUART) ..... | 1775 |
| 41.1 | LPUART introduction ..... | 1775 |
| 41.2 | LPUART main features ..... | 1776 |
| 41.3 | LPUART implementation ..... | 1777 |
| 41.4 | LPUART functional description ..... | 1778 |
| 41.4.1 | LPUART block diagram ..... | 1778 |
| 41.4.2 | LPUART signals ..... | 1779 |
| 41.4.3 | LPUART character description ..... | 1780 |
| 41.4.4 | LPUART FIFOs and thresholds ..... | 1781 |
| 41.4.5 | LPUART transmitter ..... | 1782 |
| 41.4.6 | LPUART receiver ..... | 1785 |
| 41.4.7 | LPUART baud rate generation ..... | 1789 |
| 41.4.8 | Tolerance of the LPUART receiver to clock deviation ..... | 1790 |
| 41.4.9 | LPUART multiprocessor communication ..... | 1791 |
| 41.4.10 | LPUART parity control ..... | 1793 |
| 41.4.11 | LPUART single-wire half-duplex communication ..... | 1794 |
| 41.4.12 | Continuous communication using DMA and LPUART ..... | 1794 |
| 41.4.13 | RS232 hardware flow control and RS485 Driver Enable ..... | 1797 |
| 41.4.14 | LPUART low-power management ..... | 1799 |
| 41.5 | LPUART in low-power modes ..... | 1802 |
| 41.6 | LPUART interrupts ..... | 1803 |
| 41.7 | LPUART registers ..... | 1804 |
| 41.7.1 | LPUART control register 1 (LPUART_CR1) ..... | 1804 |
| 41.7.2 | LPUART control register 1 [alternate] (LPUART_CR1) ..... | 1807 |
| 41.7.3 | LPUART control register 2 (LPUART_CR2) ..... | 1810 |
| 41.7.4 | LPUART control register 3 (LPUART_CR3) ..... | 1812 |
| 41.7.5 | LPUART baud rate register (LPUART_BRR) ..... | 1815 |
| 41.7.6 | LPUART request register (LPUART_RQR) . . . . . | 1815 |
| 41.7.7 | LPUART interrupt and status register (LPUART_ISR) . . . . . | 1816 |
| 41.7.8 | LPUART interrupt and status register [alternate] (LPUART_ISR) . . . . . | 1820 |
| 41.7.9 | LPUART interrupt flag clear register (LPUART_ICR) . . . . . | 1823 |
| 41.7.10 | LPUART receive data register (LPUART_RDR) . . . . . | 1824 |
| 41.7.11 | LPUART transmit data register (LPUART_TDR) . . . . . | 1824 |
| 41.7.12 | LPUART prescaler register (LPUART_PRESC) . . . . . | 1825 |
| 41.7.13 | LPUART register map . . . . . | 1826 |
| 42 | Serial peripheral interface / integrated interchip sound (SPI/I2S) . . . . . | 1828 |
| 42.1 | Introduction . . . . . | 1828 |
| 42.2 | SPI main features . . . . . | 1828 |
| 42.3 | I2S main features . . . . . | 1829 |
| 42.4 | SPI/I2S implementation . . . . . | 1829 |
| 42.5 | SPI functional description . . . . . | 1830 |
| 42.5.1 | General description . . . . . | 1830 |
| 42.5.2 | Communications between one master and one slave . . . . . | 1831 |
| 42.5.3 | Standard multislave communication . . . . . | 1833 |
| 42.5.4 | Multimaster communication . . . . . | 1834 |
| 42.5.5 | Slave select (NSS) pin management . . . . . | 1835 |
| 42.5.6 | Communication formats . . . . . | 1836 |
| 42.5.7 | Configuration of SPI . . . . . | 1838 |
| 42.5.8 | Procedure for enabling SPI . . . . . | 1839 |
| 42.5.9 | Data transmission and reception procedures . . . . . | 1839 |
| 42.5.10 | SPI status flags . . . . . | 1849 |
| 42.5.11 | SPI error flags . . . . . | 1850 |
| 42.5.12 | NSS pulse mode . . . . . | 1851 |
| 42.5.13 | TI mode . . . . . | 1851 |
| 42.5.14 | CRC calculation . . . . . | 1852 |
| 42.6 | SPI interrupts . . . . . | 1854 |
| 42.7 | I2S functional description . . . . . | 1855 |
| 42.7.1 | I2S general description . . . . . | 1855 |
| 42.7.2 | Supported audio protocols . . . . . | 1856 |
| 42.7.3 | Start-up description . . . . . | 1863 |
| 42.7.4 | Clock generator . . . . . | 1865 |
| 42.7.5 | I 2 S master mode . . . . . | 1868 |
| 42.7.6 | I 2 S slave mode ..... | 1869 |
| 42.7.7 | I 2 S status flags ..... | 1871 |
| 42.7.8 | I 2 S error flags ..... | 1872 |
| 42.7.9 | DMA features ..... | 1873 |
| 42.8 | I 2 S interrupts ..... | 1873 |
| 42.9 | SPI and I 2 S registers ..... | 1874 |
| 42.9.1 | SPI control register 1 (SPIx_CR1) ..... | 1874 |
| 42.9.2 | SPI control register 2 (SPIx_CR2) ..... | 1876 |
| 42.9.3 | SPI status register (SPIx_SR) ..... | 1878 |
| 42.9.4 | SPI data register (SPIx_DR) ..... | 1880 |
| 42.9.5 | SPI CRC polynomial register (SPIx_CRCPR) ..... | 1880 |
| 42.9.6 | SPI Rx CRC register (SPIx_RXCRCR) ..... | 1880 |
| 42.9.7 | SPI Tx CRC register (SPIx_TXCRCR) ..... | 1881 |
| 42.9.8 | SPIx_I 2 S configuration register (SPIx_I 2 SCFGR) ..... | 1881 |
| 42.9.9 | SPIx_I 2 S prescaler register (SPIx_I 2 SPR) ..... | 1883 |
| 42.9.10 | SPI/I 2 S register map ..... | 1885 |
| 43 | Serial audio interface (SAI) ..... | 1886 |
| 43.1 | Introduction ..... | 1886 |
| 43.2 | SAI main features ..... | 1886 |
| 43.3 | SAI implementation ..... | 1887 |
| 43.4 | SAI functional description ..... | 1888 |
| 43.4.1 | SAI block diagram ..... | 1888 |
| 43.4.2 | SAI pins and internal signals ..... | 1889 |
| 43.4.3 | Main SAI modes ..... | 1889 |
| 43.4.4 | SAI synchronization mode ..... | 1890 |
| 43.4.5 | Audio data size ..... | 1891 |
| 43.4.6 | Frame synchronization ..... | 1891 |
| 43.4.7 | Slot configuration ..... | 1894 |
| 43.4.8 | SAI clock generator ..... | 1896 |
| 43.4.9 | Internal FIFOs ..... | 1899 |
| 43.4.10 | PDM interface ..... | 1901 |
| 43.4.11 | AC'97 link controller ..... | 1909 |
| 43.4.12 | SPDIF output ..... | 1910 |
| 43.4.13 | Specific features ..... | 1913 |
| 43.4.14 | Error flags ..... | 1917 |
- 43.4.15 Disabling the SAI ..... 1920
- 43.4.16 SAI DMA interface ..... 1920
- 43.5 SAI interrupts ..... 1921
- 43.6 SAI registers ..... 1923
- 43.6.1 SAI configuration register 1 (SAI_ACR1) ..... 1923
- 43.6.2 SAI configuration register 2 (SAI_ACR2) ..... 1925
- 43.6.3 SAI frame configuration register (SAI_AFRCR) ..... 1927
- 43.6.4 SAI slot register (SAI_ASLOTR) ..... 1928
- 43.6.5 SAI interrupt mask register (SAI_AIM) ..... 1929
- 43.6.6 SAI status register (SAI_ASR) ..... 1931
- 43.6.7 SAI clear flag register (SAI_ACLRFR) ..... 1933
- 43.6.8 SAI data register (SAI_ADR) ..... 1934
- 43.6.9 SAI configuration register 1 (SAI_BCR1) ..... 1934
- 43.6.10 SAI configuration register 2 (SAI_BCR2) ..... 1937
- 43.6.11 SAI frame configuration register (SAI_BFRCR) ..... 1939
- 43.6.12 SAI slot register (SAI_BSLOTR) ..... 1940
- 43.6.13 SAI interrupt mask register (SAI_BIM) ..... 1941
- 43.6.14 SAI status register (SAI_BSR) ..... 1942
- 43.6.15 SAI clear flag register (SAI_BCLRFR) ..... 1944
- 43.6.16 SAI data register (SAI_BDR) ..... 1945
- 43.6.17 SAI PDM control register (SAI_PDMCR) ..... 1946
- 43.6.18 SAI PDM delay register (SAI_PDMDLY) ..... 1947
- 43.6.19 SAI register map ..... 1949
- 44 FD controller area network (FDCAN) ..... 1951
- 44.1 Introduction ..... 1951
- 44.2 FDCAN main features ..... 1953
- 44.3 FDCAN functional description ..... 1954
- 44.3.1 FDCAN block diagram ..... 1954
- 44.3.2 FDCAN pins and internal signals ..... 1955
- 44.3.3 Bit timing ..... 1956
- 44.3.4 Operating modes ..... 1957
- 44.3.5 Error management ..... 1966
- 44.3.6 Message RAM ..... 1967
- 44.3.7 FIFO acknowledge handling ..... 1976
- 44.3.8 FDCAN Rx FIFO element ..... 1976
- 44.3.9 FDCAN Tx buffer element ..... 1978
| 44.3.10 | FDCAN Tx event FIFO element . . . . . | 1980 |
| 44.3.11 | FDCAN standard message ID filter element . . . . . | 1981 |
| 44.3.12 | FDCAN extended message ID filter element . . . . . | 1982 |
| 44.4 | FDCAN registers . . . . . | 1984 |
| 44.4.1 | FDCAN core release register (FDCAN_CREL) . . . . . | 1984 |
| 44.4.2 | FDCAN endian register (FDCAN_ENDN) . . . . . | 1984 |
| 44.4.3 | FDCAN data bit timing and prescaler register (FDCAN_DBTP) . . . . . | 1984 |
| 44.4.4 | FDCAN test register (FDCAN_TEST) . . . . . | 1985 |
| 44.4.5 | FDCAN RAM watchdog register (FDCAN_RWD) . . . . . | 1986 |
| 44.4.6 | FDCAN CC control register (FDCAN_CCCR) . . . . . | 1987 |
| 44.4.7 | FDCAN nominal bit timing and prescaler register (FDCAN_NBTP) . . . . . | 1988 |
| 44.4.8 | FDCAN timestamp counter configuration register (FDCAN_TSCC) . . . . . | 1990 |
| 44.4.9 | FDCAN timestamp counter value register (FDCAN_TSCV) . . . . . | 1990 |
| 44.4.10 | FDCAN timeout counter configuration register (FDCAN_TOCC) . . . . . | 1991 |
| 44.4.11 | FDCAN timeout counter value register (FDCAN_TOCV) . . . . . | 1992 |
| 44.4.12 | FDCAN error counter register (FDCAN_ECR) . . . . . | 1992 |
| 44.4.13 | FDCAN protocol status register (FDCAN_PSR) . . . . . | 1993 |
| 44.4.14 | FDCAN transmitter delay compensation register (FDCAN_TDCR) . . . . . | 1995 |
| 44.4.15 | FDCAN interrupt register (FDCAN_IR) . . . . . | 1995 |
| 44.4.16 | FDCAN interrupt enable register (FDCAN_IE) . . . . . | 1998 |
| 44.4.17 | FDCAN interrupt line select register (FDCAN_ILS) . . . . . | 2000 |
| 44.4.18 | FDCAN interrupt line enable register (FDCAN_ILE) . . . . . | 2001 |
| 44.4.19 | FDCAN global filter configuration register (FDCAN_RXGFC) . . . . . | 2001 |
| 44.4.20 | FDCAN extended ID and mask register (FDCAN_XIDAM) . . . . . | 2003 |
| 44.4.21 | FDCAN high-priority message status register (FDCAN_HPMS) . . . . . | 2003 |
| 44.4.22 | FDCAN Rx FIFO 0 status register (FDCAN_RXF0S) . . . . . | 2004 |
| 44.4.23 | CAN Rx FIFO 0 acknowledge register (FDCAN_RXF0A) . . . . . | 2005 |
| 44.4.24 | FDCAN Rx FIFO 1 status register (FDCAN_RXF1S) . . . . . | 2005 |
| 44.4.25 | FDCAN Rx FIFO 1 acknowledge register (FDCAN_RXF1A) . . . . . | 2006 |
| 44.4.26 | FDCAN Tx buffer configuration register (FDCAN_TXBC) . . . . . | 2006 |
| 44.4.27 | FDCAN Tx FIFO/queue status register (FDCAN_TXFQS) . . . . . | 2007 |
| 44.4.28 | FDCAN Tx buffer request pending register (FDCAN_TXBRP) . . . . . | 2007 |
| 44.4.29 | FDCAN Tx buffer add request register (FDCAN_TXBAR) . . . . . | 2008 |
| 44.4.30 | FDCAN Tx buffer cancellation request register (FDCAN_TXBCR) . . . . . | 2009 |
| 44.4.31 | FDCAN Tx buffer transmission occurred register (FDCAN_TXBTO) . . . . . | 2009 |
| 44.4.32 | FDCAN Tx buffer cancellation finished register (FDCAN_TXBCF) . . . . . | 2010 |
- 44.4.33 FDCAN Tx buffer transmission interrupt enable register (FDCAN_TXBTIE) . . . . . 2010
- 44.4.34 FDCAN Tx buffer cancellation finished interrupt enable register (FDCAN_TXBCIE) . . . . . 2011
- 44.4.35 FDCAN Tx event FIFO status register (FDCAN_TXEFS) . . . . . 2011
- 44.4.36 FDCAN Tx event FIFO acknowledge register (FDCAN_TXEFA) . . . . . 2012
- 44.4.37 FDCAN CFG clock divider register (FDCAN_CKDIV) . . . . . 2012
- 44.4.38 FDCAN register map . . . . . 2013
- 45 Universal serial bus full-speed device interface (USB) . . . . . 2017
- 45.1 Introduction . . . . . 2017
- 45.2 USB main features . . . . . 2017
- 45.3 USB implementation . . . . . 2017
- 45.4 USB functional description . . . . . 2018
- 45.4.1 Description of USB blocks . . . . . 2019
- 45.5 Programming considerations . . . . . 2020
- 45.5.1 Generic USB device programming . . . . . 2020
- 45.5.2 System and power-on reset . . . . . 2021
- 45.5.3 Double-buffered endpoints . . . . . 2026
- 45.5.4 Isochronous transfers . . . . . 2028
- 45.5.5 Suspend/Resume events . . . . . 2029
- 45.6 USB and USB SRAM registers . . . . . 2032
- 45.6.1 Common registers . . . . . 2032
- 45.6.2 Buffer descriptor table . . . . . 2045
- 45.6.3 USB register map . . . . . 2048
- 46 USB Type-C
®
/USB Power Delivery interface (UCPD) . . . . . 2050
- 46.1 Introduction . . . . . 2050
- 46.2 UCPD main features . . . . . 2050
- 46.3 UCPD implementation . . . . . 2051
- 46.4 UCPD functional description . . . . . 2051
- 46.4.1 UCPD block diagram . . . . . 2052
- 46.4.2 UCPD reset and clocks . . . . . 2053
- 46.4.3 Physical layer protocol . . . . . 2054
- 46.4.4 UCPD BMC transmitter . . . . . 2060
- 46.4.5 UCPD BMC receiver . . . . . 2062
- 46.4.6 UCPD Type-C pull-ups (Rp) and pull-downs (Rd) . . . . . 2063
| 46.4.7 | UCPD Type-C voltage monitoring and de-bouncing . . . . . | 2064 |
| 46.4.8 | UCPD fast role swap (FRS) . . . . . | 2064 |
| 46.4.9 | UCPD DMA Interface . . . . . | 2064 |
| 46.4.10 | Wake-up from Stop mode . . . . . | 2064 |
| 46.5 | UCPD programming sequences . . . . . | 2065 |
| 46.5.1 | Initialization phase . . . . . | 2065 |
| 46.5.2 | Type-C state machine handling . . . . . | 2065 |
| 46.5.3 | USB PD transmit . . . . . | 2067 |
| 46.5.4 | USB PD receive . . . . . | 2068 |
| 46.6 | UCPD low-power modes . . . . . | 2069 |
| 46.7 | UCPD interrupts . . . . . | 2070 |
| 46.8 | UCPD registers . . . . . | 2071 |
| 46.8.1 | UCPD configuration register 1 (UCPD_CFGR1) . . . . . | 2071 |
| 46.8.2 | UCPD configuration register 2 (UCPD_CFGR2) . . . . . | 2073 |
| 46.8.3 | UCPD control register (UCPD_CR) . . . . . | 2073 |
| 46.8.4 | UCPD interrupt mask register (UCPD_IMR) . . . . . | 2076 |
| 46.8.5 | UCPD status register (UCPD_SR) . . . . . | 2077 |
| 46.8.6 | UCPD interrupt clear register (UCPD_ICR) . . . . . | 2080 |
| 46.8.7 | UCPD Tx ordered set type register (UCPD_TX_ORDSETR) . . . . . | 2081 |
| 46.8.8 | UCPD Tx payload size register (UCPD_TX_PAYSZR) . . . . . | 2081 |
| 46.8.9 | UCPD Tx data register (UCPD_TXDR) . . . . . | 2082 |
| 46.8.10 | UCPD Rx ordered set register (UCPD_RX_ORDSETR) . . . . . | 2082 |
| 46.8.11 | UCPD Rx payload size register (UCPD_RX_PAYSZR) . . . . . | 2083 |
| 46.8.12 | UCPD receive data register (UCPD_RXDR) . . . . . | 2084 |
| 46.8.13 | UCPD Rx ordered set extension register 1 (UCPD_RX_ORDEXTR1) . . . . . | 2084 |
| 46.8.14 | UCPD Rx ordered set extension register 2 (UCPD_RX_ORDEXTR2) . . . . . | 2085 |
| 46.8.15 | UCPD register map . . . . . | 2085 |
| 47 | Debug support (DBG) . . . . . | 2088 |
| 47.1 | Overview . . . . . | 2088 |
| 47.2 | Reference Arm® documentation . . . . . | 2089 |
| 47.3 | SWJ debug port (serial wire and JTAG) . . . . . | 2089 |
| 47.3.1 | Mechanism to select the JTAG-DP or the SW-DP . . . . . | 2090 |
| 47.4 | Pinout and debug port pins . . . . . | 2090 |
| 47.4.1 | SWJ debug port pins . . . . . | 2091 |
| 47.4.2 | Flexible SWJ-DP pin assignment . . . . . | 2091 |
| 47.4.3 | Internal pull-up and pull-down on JTAG pins . . . . . | 2092 |
| 47.4.4 | Using serial wire and releasing the unused debug pins as GPIOs . . . . . | 2093 |
| 47.5 | STM32G4 series JTAG TAP connection . . . . . | 2093 |
| 47.6 | ID codes and locking mechanism . . . . . | 2094 |
| 47.6.1 | MCU device ID code . . . . . | 2095 |
| 47.6.2 | Boundary scan TAP . . . . . | 2095 |
| 47.6.3 | Cortex ® -M4 with FPU TAP . . . . . | 2095 |
| 47.6.4 | Cortex ® -M4 with FPU JEDEC-106 ID code . . . . . | 2096 |
| 47.7 | JTAG debug port . . . . . | 2096 |
| 47.8 | SW debug port . . . . . | 2098 |
| 47.8.1 | SW protocol introduction . . . . . | 2098 |
| 47.8.2 | SW protocol sequence . . . . . | 2098 |
| 47.8.3 | SW-DP state machine (reset, idle states, ID code) . . . . . | 2099 |
| 47.8.4 | DP and AP read/write accesses . . . . . | 2099 |
| 47.8.5 | SW-DP registers . . . . . | 2100 |
| 47.8.6 | SW-AP registers . . . . . | 2101 |
| 47.9 | AHB-AP (AHB access port) - valid for both JTAG-DP and SW-DP . . . . . | 2101 |
| 47.10 | Core debug . . . . . | 2102 |
| 47.11 | Capability of the debugger host to connect under system reset . . . . . | 2102 |
| 47.12 | FPB (Flash patch breakpoint) . . . . . | 2103 |
| 47.13 | DWT (data watchpoint trigger) . . . . . | 2103 |
| 47.14 | ITM (instrumentation trace macrocell) . . . . . | 2104 |
| 47.14.1 | General description . . . . . | 2104 |
| 47.14.2 | Time stamp packets, synchronization and overflow packets . . . . . | 2104 |
| 47.15 | ETM (Embedded Trace Macrocell ™ ) . . . . . | 2106 |
| 47.15.1 | General description . . . . . | 2106 |
| 47.15.2 | Signal protocol, packet types . . . . . | 2106 |
| 47.15.3 | Main ETM registers . . . . . | 2106 |
| 47.15.4 | Configuration example . . . . . | 2107 |
| 47.16 | MCU debug component (DBGMCU) . . . . . | 2107 |
| 47.16.1 | Debug support for low-power modes . . . . . | 2107 |
| 47.16.2 | Debug support for timers, RTC, watchdog and I 2 C . . . . . | 2108 |
| 47.16.3 | Debug MCU configuration register (DBGMCU_CR) . . . . . | 2108 |
| 47.16.4 | Debug MCU APB1 freeze register1 (DBGMCU_APB1FZR1) . . . . . | 2109 |
| 47.16.5 | Debug MCU APB1 freeze register 2 (DBGMCU_APB1FZR2) . . . . . | 2111 |
| 47.16.6 | Debug MCU APB2 freeze register (DBGMCU_APB2FZR) . . . . . | 2111 |
| 47.17 | TPIU (trace port interface unit) . . . . . | 2113 |
| 47.17.1 | Introduction . . . . . | 2113 |
| 47.17.2 | TRACE pin assignment . . . . . | 2113 |
| 47.17.3 | TPUI formatter . . . . . | 2115 |
| 47.17.4 | TPUI frame synchronization packets . . . . . | 2116 |
| 47.17.5 | Transmission of the synchronization frame packet . . . . . | 2116 |
| 47.17.6 | Synchronous mode . . . . . | 2116 |
| 47.17.7 | Asynchronous mode . . . . . | 2117 |
| 47.17.8 | TRACECLKIN connection inside the STM32G4 series . . . . . | 2117 |
| 47.17.9 | TPIU registers . . . . . | 2118 |
| 47.17.10 | Example of configuration . . . . . | 2119 |
| 47.18 | DBG register map . . . . . | 2120 |
| 48 | Device electronic signature . . . . . | 2121 |
| 48.1 | Unique device ID register (96 bits) . . . . . | 2121 |
| 48.2 | Flash size data register . . . . . | 2122 |
| 48.3 | Package data register . . . . . | 2122 |
| 49 | Important security notice . . . . . | 2124 |
| 50 | Revision history . . . . . | 2125 |
List of tables
| Table 1. | STM32G4 series memory density . . . . . | 75 |
| Table 2. | Product specific features . . . . . | 76 |
| Table 3. | Memory map and peripheral register boundary addresses . . . . . | 84 |
| Table 4. | CCM SRAM organization . . . . . | 89 |
| Table 5. | Boot modes . . . . . | 91 |
| Table 6. | Memory mapping versus boot mode/physical remap . . . . . | 93 |
| Table 7. | Flash module - 512/256/128 KB dual bank organization (64 bits read width). . . . . | 96 |
| Table 8. | Flash module - 512/256/128 KB single bank organization (128 bits read width) . . . . . | 96 |
| Table 9. | Number of wait states according to CPU clock (HCLK) frequency. . . . . | 98 |
| Table 10. | Option byte format . . . . . | 110 |
| Table 11. | Option byte organization. . . . . | 110 |
| Table 12. | Flash memory read protection status . . . . . | 121 |
| Table 13. | Access status versus protection level and execution modes . . . . . | 123 |
| Table 14. | PCROP protection . . . . . | 125 |
| Table 15. | WRP protection. . . . . | 127 |
| Table 16. | Flash interrupt request . . . . . | 129 |
| Table 17. | Flash interface - register map and reset values . . . . . | 147 |
| Table 18. | Flash module - 256/512 Kbytes organization (64 bits read width) . . . . . | 150 |
| Table 19. | Number of wait states according to CPU clock (HCLK) frequency. . . . . | 151 |
| Table 20. | Option byte format . . . . . | 161 |
| Table 21. | Option byte organization. . . . . | 161 |
| Table 22. | Flash memory read protection status . . . . . | 167 |
| Table 23. | Access status versus protection level and execution modes . . . . . | 169 |
| Table 24. | PCROP protection . . . . . | 171 |
| Table 25. | WRP protection. . . . . | 172 |
| Table 26. | Flash interrupt request . . . . . | 173 |
| Table 27. | Flash interface - register map and reset values . . . . . | 186 |
| Table 28. | Flash module - 32/64/128 Kbytes organization (64-bit read width). . . . . | 189 |
| Table 29. | Number of wait states according to CPU clock (HCLK) frequency. . . . . | 190 |
| Table 30. | Option byte format . . . . . | 200 |
| Table 31. | Option byte organization. . . . . | 200 |
| Table 32. | Flash memory read protection status . . . . . | 206 |
| Table 33. | Access status versus protection level and execution modes . . . . . | 208 |
| Table 34. | PCROP protection . . . . . | 210 |
| Table 35. | WRP protection. . . . . | 211 |
| Table 36. | Flash interrupt request . . . . . | 213 |
| Table 37. | Flash interface - Register map and reset values . . . . . | 226 |
| Table 38. | Range 1 boost mode configuration. . . . . | 232 |
| Table 39. | PVM features . . . . . | 235 |
| Table 40. | Low-power mode summary . . . . . | 238 |
| Table 41. | Functionalities depending on the working mode. . . . . | 239 |
| Table 42. | Low-power run . . . . . | 242 |
| Table 43. | Sleep. . . . . | 244 |
| Table 44. | Low-power sleep. . . . . | 245 |
| Table 45. | Stop 0 mode . . . . . | 247 |
| Table 46. | Stop 1 mode . . . . . | 248 |
| Table 47. | Standby mode. . . . . | 250 |
| Table 48. | Shutdown mode . . . . . | 252 |
| Table 49. | PWR register map . . . . . | 268 |
| Table 50. | Clock source frequency . . . . . | 280 |
| Table 51. | RCC register map and reset values . . . . . | 330 |
| Table 52. | CRS features . . . . . | 334 |
| Table 53. | CRS internal input/output signals . . . . . | 335 |
| Table 54. | CRS interconnection . . . . . | 336 |
| Table 55. | Effect of low-power modes on CRS . . . . . | 339 |
| Table 56. | Interrupt control bits . . . . . | 339 |
| Table 57. | CRS register map and reset values . . . . . | 344 |
| Table 58. | Port bit configuration table . . . . . | 347 |
| Table 59. | GPIO register map and reset values . . . . . | 362 |
| Table 60. | BOOSTEN and ANASWVDD set/reset . . . . . | 367 |
| Table 61. | SYSCFG register map and reset values . . . . . | 375 |
| Table 62. | STM32G4 series peripherals interconnect matrix . . . . . | 377 |
| Table 63. | Interconnect 1 . . . . . | 379 |
| Table 64. | Interconnect 12 . . . . . | 380 |
| Table 65. | Interconnect 13 . . . . . | 380 |
| Table 66. | Interconnect 14 . . . . . | 380 |
| Table 67. | Interconnect 19 . . . . . | 381 |
| Table 68. | Interconnect 20 . . . . . | 383 |
| Table 69. | Interconnect 17 . . . . . | 385 |
| Table 70. | Interconnect 15 . . . . . | 386 |
| Table 71. | Interconnect 21 . . . . . | 386 |
| Table 72. | Interconnect 22 . . . . . | 387 |
| Table 73. | Interconnect 23 . . . . . | 388 |
| Table 74. | Interconnect 24 . . . . . | 389 |
| Table 75. | Interconnect 2 . . . . . | 390 |
| Table 76. | Interconnect 3 . . . . . | 391 |
| Table 77. | Interconnect 4 . . . . . | 392 |
| Table 78. | Interconnect 5 . . . . . | 393 |
| Table 79. | Interconnect 6 . . . . . | 393 |
| Table 80. | Interconnect 7 . . . . . | 393 |
| Table 81. | Interconnect 8 . . . . . | 394 |
| Table 82. | Interconnect 9 . . . . . | 394 |
| Table 83. | Interconnect 10 . . . . . | 395 |
| Table 84. | Interconnect 11 . . . . . | 395 |
| Table 85. | Interconnect 18 . . . . . | 396 |
| Table 86. | Interconnect 16 . . . . . | 396 |
| Table 87. | DMA1 and DMA2 implementation . . . . . | 398 |
| Table 88. | DMA internal input/output signals . . . . . | 400 |
| Table 89. | Programmable data width and endian behavior (when PINC = MINC = 1) . . . . . | 405 |
| Table 90. | DMA interrupt requests . . . . . | 407 |
| Table 91. | DMA register map and reset values . . . . . | 415 |
| Table 92. | DMAMUX instantiation . . . . . | 419 |
| Table 93. | DMAMUX: assignment of multiplexer inputs to resources . . . . . | 420 |
| Table 95. | DMAMUX: assignment of synchronization inputs to resources . . . . . | 421 |
| Table 94. | DMAMUX: assignment of trigger inputs to resources . . . . . | 421 |
| Table 96. | DMAMUX signals . . . . . | 424 |
| Table 97. | DMAMUX interrupts . . . . . | 428 |
| Table 98. | DMAMUX register map and reset values for category 2 devices . . . . . | 433 |
| Table 99. | DMAMUX register map and reset values for category 3 and 4 devices . . . . . | 434 |
| Table 100. | STM32G4 series vector table . . . . . | 437 |
| Table 101. | EXTI lines connections . . . . . | 444 |
| Table 102. | Extended interrupt/event controller register map and reset values. . . . . | 453 |
| Table 103. | CRC internal input/output signals . . . . . | 455 |
| Table 104. | CRC register map and reset values . . . . . | 460 |
| Table 105. | CORDIC functions . . . . . | 462 |
| Table 106. | Cosine parameters . . . . . | 462 |
| Table 107. | Sine parameters . . . . . | 463 |
| Table 108. | Phase parameters . . . . . | 463 |
| Table 109. | Modulus parameters . . . . . | 464 |
| Table 110. | Arctangent parameters . . . . . | 465 |
| Table 111. | Hyperbolic cosine parameters . . . . . | 465 |
| Table 112. | Hyperbolic sine parameters . . . . . | 466 |
| Table 113. | Hyperbolic arctangent parameters . . . . . | 466 |
| Table 114. | Natural logarithm parameters . . . . . | 467 |
| Table 115. | Natural log scaling factors and corresponding ranges . . . . . | 467 |
| Table 116. | Square root parameters . . . . . | 468 |
| Table 117. | Square root scaling factors and corresponding ranges . . . . . | 468 |
| Table 118. | Precision vs. number of iterations. . . . . | 471 |
| Table 119. | CORDIC register map and reset value . . . . . | 478 |
| Table 120. | Valid combinations for read and write methods . . . . . | 492 |
| Table 121. | FMAC register map and reset values . . . . . | 505 |
| Table 122. | NOR/PSRAM bank selection . . . . . | 510 |
| Table 123. | NOR/PSRAM External memory address . . . . . | 511 |
| Table 124. | NAND memory mapping and timing registers. . . . . | 511 |
| Table 125. | NAND bank selection . . . . . | 511 |
| Table 126. | Programmable NOR/PSRAM access parameters . . . . . | 513 |
| Table 127. | Non-multiplexed I/O NOR flash memory. . . . . | 513 |
| Table 128. | 16-bit multiplexed I/O NOR flash memory . . . . . | 514 |
| Table 129. | Non-multiplexed I/Os PSRAM/SRAM . . . . . | 514 |
| Table 130. | 16-Bit multiplexed I/O PSRAM . . . . . | 515 |
| Table 131. | NOR flash/PSRAM: example of supported memories and transactions . . . . . | 516 |
| Table 132. | FMC_BCRx bitfields (mode 1) . . . . . | 519 |
| Table 133. | FMC_BTRx bitfields (mode 1) . . . . . | 519 |
| Table 134. | FMC_BCRx bitfields (mode A) . . . . . | 521 |
| Table 135. | FMC_BTRx bitfields (mode A) . . . . . | 521 |
| Table 136. | FMC_BWTRx bitfields (mode A). . . . . | 522 |
| Table 137. | FMC_BCRx bitfields (mode 2/B). . . . . | 524 |
| Table 138. | FMC_BTRx bitfields (mode 2/B). . . . . | 524 |
| Table 139. | FMC_BWTRx bitfields (mode 2/B) . . . . . | 525 |
| Table 140. | FMC_BCRx bitfields (mode C) . . . . . | 526 |
| Table 141. | FMC_BTRx bitfields (mode C) . . . . . | 527 |
| Table 142. | FMC_BWTRx bitfields (mode C). . . . . | 527 |
| Table 143. | FMC_BCRx bitfields (mode D) . . . . . | 529 |
| Table 144. | FMC_BTRx bitfields (mode D) . . . . . | 530 |
| Table 145. | FMC_BWTRx bitfields (mode D). . . . . | 530 |
| Table 146. | FMC_BCRx bitfields (Muxed mode) . . . . . | 532 |
| Table 147. | FMC_BTRx bitfields (Muxed mode) . . . . . | 533 |
| Table 148. | FMC_BCRx bitfields (Synchronous multiplexed read mode) . . . . . | 538 |
| Table 149. | FMC_BTRx bitfields (Synchronous multiplexed read mode) . . . . . | 539 |
| Table 150. | FMC_BCRx bitfields (Synchronous multiplexed write mode) . . . . . | 540 |
| Table 151. | FMC_BTRx bitfields (Synchronous multiplexed write mode) . . . . . | 541 |
| Table 152. | Programmable NAND flash access parameters . . . . . | 550 |
| Table 153. | 8-bit NAND flash . . . . . | 550 |
| Table 154. | 16-bit NAND flash . . . . . | 551 |
| Table 155. | Supported memories and transactions . . . . . | 551 |
| Table 156. | ECC result relevant bits . . . . . | 560 |
| Table 157. | FMC register map and reset values . . . . . | 561 |
| Table 158. | QUADSPI pins . . . . . | 564 |
| Table 159. | QUADSPI interrupt requests. . . . . | 578 |
| Table 160. | QUADSPI register map and reset values . . . . . | 589 |
| Table 161. | ADC features . . . . . | 593 |
| Table 162. | ADC internal input/output signals . . . . . | 595 |
| Table 163. | ADC input/output pins. . . . . | 595 |
| Table 164. | Configuring the trigger polarity for regular external triggers . . . . . | 616 |
| Table 165. | Configuring the trigger polarity for injected external triggers . . . . . | 616 |
| Table 166. | ADC1/2 - External triggers for regular channels . . . . . | 617 |
| Table 167. | ADC1/2 - External trigger for injected channels . . . . . | 618 |
| Table 168. | ADC3/4/5 - External triggers for regular channels . . . . . | 619 |
| Table 169. | ADC3/4/5 - External triggers for injected channels . . . . . | 620 |
| Table 170. | TSAR timings depending on resolution . . . . . | 633 |
| Table 171. | Offset computation versus data resolution . . . . . | 636 |
| Table 172. | Analog watchdog channel selection . . . . . | 647 |
| Table 173. | Analog watchdog 1 comparison . . . . . | 648 |
| Table 174. | Analog watchdog 2 and 3 comparison . . . . . | 649 |
| Table 175. | Maximum output results versus N and M (gray cells indicate truncation). . . . . | 652 |
| Table 176. | Oversampler operating modes summary . . . . . | 657 |
| Table 177. | Effect of low-power modes on the ADC . . . . . | 675 |
| Table 178. | ADC interrupts per each ADC. . . . . | 676 |
| Table 179. | DELAY bits versus ADC resolution. . . . . | 708 |
| Table 180. | ADC global register map. . . . . | 710 |
| Table 181. | ADC register map and reset values for each ADC (offset = 0x000 for master ADC, 0x100 for slave ADC). . . . . | 711 |
| Table 182. | ADC register map and reset values (master and slave ADC common registers) offset = 0x300 . . . . . | 713 |
| Table 183. | DAC features . . . . . | 715 |
| Table 184. | DAC input/output pins. . . . . | 717 |
| Table 185. | DAC input/output signals . . . . . | 717 |
| Table 186. | DAC1 interconnection. . . . . | 718 |
| Table 187. | DAC2 interconnection. . . . . | 719 |
| Table 188. | DAC3 interconnection. . . . . | 720 |
| Table 189. | DAC4 interconnection. . . . . | 721 |
| Table 190. | Data format (case of 12-bit data) . . . . . | 724 |
| Table 191. | HFSEL description . . . . . | 725 |
| Table 192. | Sample and refresh timings . . . . . | 732 |
| Table 193. | Channel output modes summary . . . . . | 734 |
| Table 194. | Effect of low-power modes on DAC . . . . . | 742 |
| Table 195. | DAC interrupts . . . . . | 742 |
| Table 196. | DAC register map and reset values . . . . . | 761 |
| Table 197. | VREF buffer modes . . . . . | 764 |
| Table 198. | VREFBUF register map and reset values. . . . . | 767 |
| Table 199. | COMPx non-inverting input assignment . . . . . | 769 |
| Table 200. | COMPx inverting input assignment . . . . . | 769 |
| Table 201. | Blanking sources . . . . . | 771 |
| Table 202. | Comparator behavior in low-power modes . . . . . | 771 |
| Table 203. | COMP register map and reset values . . . . . | 774 |
| Table 204. | Operational amplifier possible connection . . . . . | 777 |
| Table 205. | Operating modes and calibration . . . . . | 785 |
| Table 206. | Effect of low-power modes on the OPAMP . . . . . | 787 |
| Table 207. | OPAMP register map and reset values . . . . . | 818 |
| Table 208. | RNG internal input/output signals . . . . . | 821 |
| Table 209. | RNG interrupt requests . . . . . | 827 |
| Table 210. | RNG configurations . . . . . | 828 |
| Table 211. | RNG register map and reset map . . . . . | 831 |
| Table 212. | AES internal input/output signals . . . . . | 833 |
| Table 213. | CTR mode initialization vector definition . . . . . | 850 |
| Table 214. | GCM last block definition . . . . . | 852 |
| Table 215. | Initialization of AES_IVRx registers in GCM mode . . . . . | 853 |
| Table 216. | Initialization of AES_IVRx registers in CCM mode . . . . . | 860 |
| Table 217. | Key endianness in AES_KEYRx registers (128- or 256-bit key length) . . . . . | 865 |
| Table 218. | AES interrupt requests . . . . . | 868 |
| Table 219. | Processing latency for ECB, CBC and CTR . . . . . | 868 |
| Table 220. | Processing latency for GCM and CCM (in clock cycles) . . . . . | 869 |
| Table 221. | AES register map and reset values . . . . . | 879 |
| Table 222. | HRTIM inputs/outputs summary . . . . . | 885 |
| Table 223. | External events mapping and associated features . . . . . | 887 |
| Table 224. | Update enable inputs and sources . . . . . | 887 |
| Table 225. | Burst mode clock sources . . . . . | 887 |
| Table 226. | Burst mode trigger source . . . . . | 888 |
| Table 227. | Internal synchronization source . . . . . | 888 |
| Table 228. | Fault inputs . . . . . | 888 |
| Table 229. | HRTIM DAC triggers connections . . . . . | 888 |
| Table 230. | System fault connected to hrtim_sys_fltr input . . . . . | 889 |
| Table 231. | Timer resolution and min. PWM frequency for \( f_{HRTIM} = 170 \) MHz . . . . . | 889 |
| Table 232. | Period and compare registers min and max values . . . . . | 893 |
| Table 233. | Timer operating modes . . . . . | 893 |
| Table 234. | Events mapping across timer A to F . . . . . | 899 |
| Table 235. | Interleaved mode selection . . . . . | 900 |
| Table 236. | Compare 1..3 values in interleaved mode . . . . . | 901 |
| Table 237. | Deadtime resolution and max absolute values . . . . . | 912 |
| Table 238. | Roll-over event destination and mode programming . . . . . | 919 |
| Table 239. | EExFLTR[3:0] codes depending on UDM bit setting . . . . . | 921 |
| Table 240. | External events features . . . . . | 927 |
| Table 241. | Output set/reset latency and jitter versus external event operating mode . . . . . | 928 |
| Table 242. | Filtering signals mapping per timer . . . . . | 931 |
| Table 243. | Windowing signals mapping per timer (EEFLTR[3:0] = 1111) . . . . . | 933 |
| Table 244. | HRTIM preloadable control registers and associated update sources . . . . . | 943 |
| Table 245. | Master timer update event propagation . . . . . | 948 |
| Table 246. | TIMx update event propagation . . . . . | 948 |
| Table 247. | Reset events able to generate an update . . . . . | 950 |
| Table 248. | Update event propagation for a timer reset . . . . . | 950 |
| Table 249. | Output state programming, x= A..F, y = 1 or 2 . . . . . | 952 |
| Table 250. | Timer output programming for burst mode . . . . . | 955 |
| Table 251. | Sampling rate and filter length vs FLTFxF[3:0] and clock setting . . . . . | 965 |
| Table 252. | Fault input blanking events . . . . . | 966 |
| Table 253. | Fault 1..6 counter reset source . . . . . | 967 |
| Table 254. | Effect of sync event versus timer operating modes . . . . . | 971 |
| Table 255. | DAC dual channel trigger example . . . . . | 979 |
| Table 256. | HRTIM interrupt summary . . . . . | 982 |
| Table 257. | HRTIM DMA request summary . . . . . | 984 |
| Table 258. | HRTIM Register map and reset values – master timer. . . . . | 1134 |
| Table 259. | HRTIM register map and reset values – TIMx (x= A..F) . . . . . | 1135 |
| Table 260. | HRTIM register map and reset values – common functions . . . . . | 1140 |
| Table 261. | TIM input/output pins . . . . . | 1146 |
| Table 262. | TIM internal input/output signals . . . . . | 1146 |
| Table 263. | Interconnect to the tim_ti1 input multiplexer . . . . . | 1147 |
| Table 264. | Interconnect to the tim_ti2 input multiplexer . . . . . | 1148 |
| Table 265. | Interconnect to the tim_ti3 input multiplexer . . . . . | 1148 |
| Table 266. | Interconnect to the tim_ti4 input multiplexer . . . . . | 1148 |
| Table 267. | Internal trigger connection . . . . . | 1148 |
| Table 268. | Interconnect to the tim_etr input multiplexer . . . . . | 1149 |
| Table 269. | Timer break interconnect . . . . . | 1149 |
| Table 270. | Timer break2 interconnect . . . . . | 1150 |
| Table 271. | System break interconnect . . . . . | 1150 |
| Table 272. | Interconnect to the ocref_clr input multiplexer . . . . . | 1150 |
| Table 273. | CCR and ARR register change dithering pattern . . . . . | 1184 |
| Table 274. | CCR register change dithering pattern in center-aligned PWM mode . . . . . | 1185 |
| Table 275. | Behavior of timer outputs versus tim_brk/tim_brk2 inputs . . . . . | 1197 |
| Table 276. | Break protection disarming conditions . . . . . | 1199 |
| Table 277. | Counting direction versus encoder signals (CC1P = CC2P = 0) . . . . . | 1208 |
| Table 278. | Counting direction versus encoder signals and polarity settings . . . . . | 1212 |
| Table 279. | DMA request . . . . . | 1233 |
| Table 280. | Effect of low-power modes on TIM1/TIM8/TIM20 . . . . . | 1234 |
| Table 281. | Interrupt requests . . . . . | 1234 |
| Table 282. | Output control bits for complementary tim_ocx and tim_ocxn channels with break feature . . . . . | 1261 |
| Table 283. | TIMx register map and reset values . . . . . | 1284 |
| Table 284. | STM32G4 series general purpose timers . . . . . | 1288 |
| Table 285. | TIM input/output pins . . . . . | 1290 |
| Table 286. | TIM internal input/output signals . . . . . | 1290 |
| Table 287. | Interconnect to the tim_ti1 input multiplexer . . . . . | 1291 |
| Table 288. | Interconnect to the tim_ti2 input multiplexer . . . . . | 1291 |
| Table 289. | Interconnect to the tim_ti3 input multiplexer . . . . . | 1292 |
| Table 290. | Interconnect to the tim_ti4 input multiplexer . . . . . | 1292 |
| Table 291. | TIMx internal trigger connection . . . . . | 1292 |
| Table 292. | Interconnect to the tim_etr input multiplexer . . . . . | 1293 |
| Table 293. | Interconnect to the tim_ocref_clr input multiplexer . . . . . | 1294 |
| Table 294. | CCR and ARR register change dithering pattern . . . . . | 1325 |
| Table 295. | CCR register change dithering pattern in center-aligned PWM mode . . . . . | 1326 |
| Table 296. | Counting direction versus encoder signals(CC1P = CC2P = 0) . . . . . | 1335 |
| Table 297. | Counting direction versus encoder signals and polarity settings . . . . . | 1340 |
| Table 298. | DMA request . . . . . | 1364 |
| Table 299. | Effect of low-power modes on TIM2/TIM3/TIM4/TIM5 . . . . . | 1364 |
| Table 300. | Interrupt requests . . . . . | 1365 |
| Table 301. | Output control bit for standard tim_ocx channels . . . . . | 1386 |
| Table 302. | TIM2/TIM3/TIM4/TIM5 register map and reset values . . . . . | 1401 |
| Table 303. | TIM input/output pins . . . . . | 1407 |
| Table 304. | TIM internal input/output signals . . . . . | 1408 |
| Table 305. | Interconnect to the tim_ti1 input multiplexer . . . . . | 1408 |
| Table 306. | Interconnect to the tim_ti2 input multiplexer . . . . . | 1409 |
| Table 307. | TIMx internal trigger connection . . . . . | 1409 |
| Table 308. | Timer break interconnect . . . . . | 1410 |
| Table 309. | System break interconnect . . . . . | 1410 |
| Table 310. | Interconnect to the ocref_clr input multiplexer . . . . . | 1410 |
| Table 311. | CCR and ARR register change dithering pattern . . . . . | 1431 |
| Table 312. | Break protection disarming conditions . . . . . | 1440 |
| Table 313. | DMA request . . . . . | 1451 |
| Table 314. | Effect of low-power modes on TIM15/TIM16/TIM17 . . . . . | 1452 |
| Table 315. | Interrupt requests . . . . . | 1452 |
| Table 316. | Output control bits for complementary tim_ocx and tim_ocxn channels with break feature (TIM15). . . . . | 1468 |
| Table 317. | TIM15 register map and reset values . . . . . | 1481 |
| Table 318. | Output control bits for complementary tim_oc1 and tim_oc1n channels with break feature (TIM16/TIM17) . . . . . | 1494 |
| Table 319. | TIM16/TIM17 register map and reset values . . . . . | 1508 |
| Table 320. | TIM internal input/output signals . . . . . | 1511 |
| Table 321. | TIMx_ARR register change dithering pattern . . . . . | 1521 |
| Table 322. | DMA request . . . . . | 1523 |
| Table 323. | Effect of low-power modes on TIM6/TIM7 . . . . . | 1523 |
| Table 324. | Interrupt request . . . . . | 1523 |
| Table 325. | TIMx register map and reset values . . . . . | 1529 |
| Table 326. | STM32G4 series LPTIM features . . . . . | 1531 |
| Table 327. | LPTIM1 external trigger connection . . . . . | 1531 |
| Table 328. | LPTIM1 input 1 connection . . . . . | 1532 |
| Table 329. | LPTIM1 input 2 connection . . . . . | 1532 |
| Table 330. | Prescaler division ratios . . . . . | 1534 |
| Table 331. | Encoder counting scenarios . . . . . | 1541 |
| Table 332. | Effect of low-power modes on the LPTIM . . . . . | 1542 |
| Table 333. | Interrupt events . . . . . | 1543 |
| Table 334. | LPTIM register map and reset values . . . . . | 1554 |
| Table 335. | IWDG register map and reset values . . . . . | 1564 |
| Table 336. | WWDG register map and reset values . . . . . | 1570 |
| Table 337. | RTC input/output pins . . . . . | 1573 |
| Table 338. | RTC internal input/output signals . . . . . | 1573 |
| Table 339. | RTC interconnection . . . . . | 1574 |
| Table 340. | PC13 configuration . . . . . | 1574 |
| Table 341. | RTC_OUT mapping . . . . . | 1576 |
| Table 342. | Effect of low-power modes on RTC . . . . . | 1587 |
| Table 343. | RTC pins functionality over modes . . . . . | 1587 |
| Table 344. | Interrupt requests . . . . . | 1588 |
| Table 345. | RTC register map and reset values . . . . . | 1608 |
| Table 346. | TAMP input/output pins . . . . . | 1612 |
| Table 347. | TAMP internal input/output signals . . . . . | 1612 |
| Table 348. | TAMP interconnection . . . . . | 1612 |
| Table 349. | Effect of low-power modes on TAMP . . . . . | 1615 |
| Table 350. | Interrupt requests . . . . . | 1615 |
| Table 351. | TAMP register map and reset values . . . . . | 1624 |
| Table 352. | I2C implementation . . . . . | 1626 |
| Table 353. | I2C input/output pins . . . . . | 1627 |
| Table 354. | I2C internal input/output signals . . . . . | 1628 |
| Table 355. | Comparison of analog and digital filters . . . . . | 1630 |
| Table 356. | I 2 C-bus and SMBus specification data setup and hold times . . . . . | 1632 |
| Table 357. | I 2 C configuration. . . . . | 1636 |
| Table 358. | I 2 C-bus and SMBus specification clock timings . . . . . | 1647 |
| Table 359. | Timing settings for f I2CCLK of 8 MHz. . . . . | 1657 |
| Table 360. | Timing settings for f I2CCLK of 16 MHz. . . . . | 1657 |
| Table 361. | Timing settings for f I2CCLK of 48 MHz. . . . . | 1658 |
| Table 362. | SMBus timeout specifications . . . . . | 1660 |
| Table 363. | SMBus with PEC configuration . . . . . | 1662 |
| Table 364. | TIMEOUTA[11:0] for maximum t TIMEOUT of 25 ms. . . . . | 1663 |
| Table 365. | TIMEOUTB[11:0] for maximum t LOW:SEXT and t LOW:MEXT of 8 ms . . . . . | 1663 |
| Table 366. | TIMEOUTA[11:0] for maximum t IDLE of 50 µs . . . . . | 1663 |
| Table 367. | Effect of low-power modes to I 2 C. . . . . | 1673 |
| Table 368. | I 2 C interrupt requests . . . . . | 1673 |
| Table 369. | I 2 C register map and reset values . . . . . | 1688 |
| Table 370. | USART / LPUART features . . . . . | 1691 |
| Table 371. | USART/UART input/output pins . . . . . | 1694 |
| Table 372. | USART internal input/output signals . . . . . | 1694 |
| Table 373. | Noise detection from sampled data . . . . . | 1706 |
| Table 374. | Tolerance of the USART receiver when BRR [3:0] = 0000. . . . . | 1709 |
| Table 375. | Tolerance of the USART receiver when BRR[3:0] is different from 0000. . . . . | 1710 |
| Table 376. | USART frame formats . . . . . | 1715 |
| Table 377. | Effect of low-power modes on the USART . . . . . | 1738 |
| Table 378. | USART interrupt requests. . . . . | 1739 |
| Table 379. | USART register map and reset values . . . . . | 1773 |
| Table 380. | USART / LPUART features . . . . . | 1777 |
| Table 381. | LPUART input/output pins . . . . . | 1779 |
| Table 382. | LPUART internal input/output signals . . . . . | 1779 |
| Table 383. | Error calculation for programmed baud rates at lpuart_ker_ck_pres = 32.768 kHz . . . . . | 1789 |
| Table 384. | Error calculation for programmed baud rates at f CK = 100 MHz . . . . . | 1790 |
| Table 385. | Tolerance of the LPUART receiver. . . . . | 1791 |
| Table 387. | Effect of low-power modes on the LPUART . . . . . | 1802 |
| Table 388. | LPUART interrupt requests. . . . . | 1803 |
| Table 389. | LPUART register map and reset values . . . . . | 1826 |
| Table 390. | STM32G4 series SPI and SPI/I2S implementation . . . . . | 1829 |
| Table 391. | SPI interrupt requests . . . . . | 1854 |
| Table 392. | Audio-frequency precision using 48 MHz clock derived from HSE. . . . . | 1867 |
| Table 393. | I2S interrupt requests . . . . . | 1873 |
| Table 394. | SPI/I2S register map and reset values . . . . . | 1885 |
| Table 395. | STM32G4 series SAI features . . . . . | 1887 |
| Table 396. | SAI internal input/output signals . . . . . | 1889 |
| Table 397. | SAI input/output pins. . . . . | 1889 |
| Table 398. | MCLK_x activation conditions. . . . . | 1896 |
| Table 399. | Clock generator programming examples . . . . . | 1899 |
| Table 400. | SAI_A configuration for TDM mode . . . . . | 1906 |
| Table 401. | TDM frame configuration examples . . . . . | 1908 |
| Table 402. | SOPD pattern . . . . . | 1911 |
| Table 403. | Parity bit calculation . . . . . | 1911 |
| Table 404. | Audio sampling frequency versus symbol rates . . . . . | 1912 |
| Table 405. | SAI interrupt sources . . . . . | 1921 |
| Table 406. | SAI register map and reset values . . . . . | 1949 |
| Table 407. | CAN subsystem I/O signals . . . . . | 1955 |
| Table 408. | CAN subsystem I/O pins. . . . . | 1955 |
| Table 409. | DLC coding in FDCAN . . . . . | 1959 |
| Table 410. | Possible configurations for frame transmission . . . . . | 1973 |
| Table 411. | Rx FIFO element . . . . . | 1976 |
| Table 412. | Rx FIFO element description . . . . . | 1976 |
| Table 413. | Tx buffer and FIFO element . . . . . | 1978 |
| Table 414. | Tx buffer element description . . . . . | 1978 |
| Table 415. | Tx event FIFO element. . . . . | 1980 |
| Table 416. | Tx event FIFO element description. . . . . | 1980 |
| Table 417. | Standard message ID filter element . . . . . | 1981 |
| Table 418. | Standard message ID filter element field description . . . . . | 1982 |
| Table 419. | Extended message ID filter element. . . . . | 1982 |
| Table 420. | Extended message ID filter element field description. . . . . | 1983 |
| Table 421. | FDCAN register map and reset values . . . . . | 2013 |
| Table 422. | STM32G4 series USB implementation . . . . . | 2017 |
| Table 423. | Double-buffering buffer flag definition. . . . . | 2027 |
| Table 424. | Bulk double-buffering memory buffers usage . . . . . | 2027 |
| Table 425. | Isochronous memory buffers usage . . . . . | 2029 |
| Table 426. | Resume event detection. . . . . | 2030 |
| Table 427. | Reception status encoding . . . . . | 2043 |
| Table 428. | Endpoint type encoding . . . . . | 2043 |
| Table 429. | Endpoint kind meaning . . . . . | 2043 |
| Table 430. | Transmission status encoding . . . . . | 2044 |
| Table 431. | Definition of allocated buffer memory . . . . . | 2047 |
| Table 432. | USB register map and reset values . . . . . | 2048 |
| Table 433. | UCPD implementation . . . . . | 2051 |
| Table 434. | UCPD signals on pins. . . . . | 2052 |
| Table 435. | UCPD internal signals. . . . . | 2053 |
| Table 436. | 4b5b symbol encoding table. . . . . | 2054 |
| Table 437. | Ordered sets . . . . . | 2056 |
| Table 438. | Validation of ordered sets. . . . . | 2056 |
| Table 439. | Data size. . . . . | 2057 |
| Table 440. | Coding for ANAMODE, ANASUBMODE and link with TYPEC_VSTATE_CCx . . . . . | 2065 |
| Table 441. | Type-C sequence (source: 3A); cable/sink connected (Rd on CC1; Ra on CC2) . . . . . | 2067 |
| Table 442. | Effect of low power modes on the UCPD . . . . . | 2069 |
| Table 443. | UCPD interrupt requests. . . . . | 2070 |
| Table 444. | UCPD register map and reset values . . . . . | 2085 |
| Table 445. | SWJ debug port pins . . . . . | 2091 |
| Table 446. | Flexible SWJ-DP pin assignment . . . . . | 2091 |
| Table 447. | JTAG debug port data registers . . . . . | 2096 |
| Table 448. | 32-bit debug port registers addressed through the shifted value A[3:2] . . . . . | 2097 |
| Table 449. | Packet request (8-bits) . . . . . | 2098 |
| Table 450. | ACK response (3 bits). . . . . | 2099 |
| Table 451. | DATA transfer (33 bits). . . . . | 2099 |
| Table 452. | SW-DP registers. . . . . | 2100 |
| Table 453. | Cortex ® -M4 with FPU AHB-AP registers . . . . . | 2101 |
| Table 454. | Core debug registers . . . . . | 2102 |
| Table 455. | Main ITM registers . . . . . | 2105 |
| Table 456. | Main ETM registers. . . . . | 2106 |
| Table 457. | Asynchronous TRACE pin assignment. . . . . | 2113 |
| Table 458. | Synchronous TRACE pin assignment . . . . . | 2114 |
| Table 459. | Flexible TRACE pin assignment. . . . . | 2114 |
| Table 460. Important TPIU registers. . . . . | 2118 |
| Table 461. DBG register map and reset values . . . . . | 2120 |
| Table 462. Document revision history . . . . . | 2125 |
List of figures
| Figure 1. | System architecture . . . . . | 80 |
| Figure 2. | Memory map . . . . . | 83 |
| Figure 3. | Sequential 16-bit instructions execution (64-bit read data width) . . . . . | 101 |
| Figure 4. | Changing the read protection (RDP) level . . . . . | 123 |
| Figure 5. | Example of disabling core debug access . . . . . | 128 |
| Figure 6. | Sequential 16-bit instructions execution (64-bit read data width) . . . . . | 154 |
| Figure 7. | Changing the read protection (RDP) level . . . . . | 169 |
| Figure 8. | Example of disabling core debug access . . . . . | 173 |
| Figure 9. | Sequential 16-bit instructions execution (64-bit read data width) . . . . . | 193 |
| Figure 10. | Changing the read protection (RDP) level . . . . . | 208 |
| Figure 11. | Example of disabling core debug access . . . . . | 212 |
| Figure 12. | STM32G4 series power supply overview . . . . . | 229 |
| Figure 13. | Brown-out reset waveform . . . . . | 234 |
| Figure 14. | PVD thresholds . . . . . | 235 |
| Figure 15. | Low-power modes possible transitions . . . . . | 237 |
| Figure 16. | Simplified diagram of the reset circuit . . . . . | 271 |
| Figure 17. | Clock tree . . . . . | 275 |
| Figure 18. | HSE/ LSE clock sources . . . . . | 276 |
| Figure 19. | Frequency measurement with TIM15 in capture mode . . . . . | 283 |
| Figure 20. | Frequency measurement with TIM16 in capture mode . . . . . | 283 |
| Figure 21. | Frequency measurement with TIM17 in capture mode . . . . . | 284 |
| Figure 22. | Frequency measurement with TIM5 in capture mode . . . . . | 284 |
| Figure 23. | CRS block diagram . . . . . | 335 |
| Figure 24. | CRS counter behavior . . . . . | 337 |
| Figure 25. | Basic structure of an I/O port bit . . . . . | 346 |
| Figure 26. | Basic structure of a 3- or 5-Volt tolerant I/O port bit . . . . . | 346 |
| Figure 27. | Input floating/pull up/pull down configurations . . . . . | 351 |
| Figure 28. | Output configuration . . . . . | 352 |
| Figure 29. | Alternate function configuration . . . . . | 352 |
| Figure 30. | High impedance-analog configuration . . . . . | 353 |
| Figure 31. | DMA block diagram . . . . . | 399 |
| Figure 32. | DMAMUX block diagram . . . . . | 423 |
| Figure 33. | Synchronization mode of the DMAMUX request line multiplexer channel . . . . . | 426 |
| Figure 34. | Event generation of the DMA request line multiplexer channel . . . . . | 426 |
| Figure 35. | Configurable interrupt/event block diagram . . . . . | 442 |
| Figure 36. | External interrupt/event GPIO mapping . . . . . | 444 |
| Figure 37. | CRC calculation unit block diagram . . . . . | 455 |
| Figure 38. | CORDIC convergence for trigonometric functions . . . . . | 469 |
| Figure 39. | CORDIC convergence for hyperbolic functions . . . . . | 470 |
| Figure 40. | CORDIC convergence for square root . . . . . | 471 |
| Figure 41. | Block diagram . . . . . | 480 |
| Figure 42. | Input buffer areas . . . . . | 482 |
| Figure 43. | Circular input buffer . . . . . | 483 |
| Figure 44. | Circular input buffer operation . . . . . | 484 |
| Figure 45. | Circular output buffer . . . . . | 485 |
| Figure 46. | Circular output buffer operation . . . . . | 486 |
| Figure 47. | FIR filter structure . . . . . | 488 |
| Figure 48. | IIR filter structure (direct form 1) . . . . . | 490 |
| Figure 49. | X1 buffer initialization . . . . . | 495 |
| Figure 50. | Filtering example 1 . . . . . | 496 |
| Figure 51. | Filtering example 2 . . . . . | 497 |
| Figure 52. | FMC block diagram. . . . . | 508 |
| Figure 53. | FMC memory banks . . . . . | 510 |
| Figure 54. | Mode 1 read access waveforms . . . . . | 518 |
| Figure 55. | Mode 1 write access waveforms. . . . . | 518 |
| Figure 56. | Mode A read access waveforms. . . . . | 520 |
| Figure 57. | Mode A write access waveforms . . . . . | 520 |
| Figure 58. | Mode 2 and mode B read access waveforms. . . . . | 522 |
| Figure 59. | Mode 2 write access waveforms. . . . . | 523 |
| Figure 60. | Mode B write access waveforms . . . . . | 523 |
| Figure 61. | Mode C read access waveforms . . . . . | 525 |
| Figure 62. | Mode C write access waveforms . . . . . | 526 |
| Figure 63. | Mode D read access waveforms . . . . . | 528 |
| Figure 64. | Mode D write access waveforms . . . . . | 529 |
| Figure 65. | Muxed read access waveforms . . . . . | 531 |
| Figure 66. | Muxed write access waveforms . . . . . | 532 |
| Figure 67. | Asynchronous wait during a read access waveforms. . . . . | 534 |
| Figure 68. | Asynchronous wait during a write access waveforms. . . . . | 535 |
| Figure 69. | Wait configuration waveforms. . . . . | 537 |
| Figure 70. | Synchronous multiplexed read mode waveforms - NOR, PSRAM (CRAM). . . . . | 538 |
| Figure 71. | Synchronous multiplexed write mode waveforms - PSRAM (CRAM). . . . . | 540 |
| Figure 72. | NAND flash controller waveforms for common memory access. . . . . | 552 |
| Figure 73. | Access to non 'CE don't care' NAND-flash. . . . . | 554 |
| Figure 74. | QUADSPI block diagram when dual-flash mode is disabled . . . . . | 563 |
| Figure 75. | QUADSPI block diagram when dual-flash mode is enabled. . . . . | 564 |
| Figure 76. | Example of read command in quad-SPI mode . . . . . | 565 |
| Figure 77. | Example of a DDR command in quad-SPI mode . . . . . | 568 |
| Figure 78. | NCS when CKMODE = 0 (T = CLK period) . . . . . | 576 |
| Figure 79. | NCS when CKMODE = 1 in SDR mode (T = CLK period) . . . . . | 576 |
| Figure 80. | NCS when CKMODE = 1 in DDR mode (T = CLK period) . . . . . | 577 |
| Figure 81. | NCS when CKMODE = 1 with an abort (T = CLK period). . . . . | 577 |
| Figure 82. | ADC block diagram . . . . . | 594 |
| Figure 83. | ADC clock scheme . . . . . | 597 |
| Figure 84. | ADC1 connectivity . . . . . | 598 |
| Figure 85. | ADC2 connectivity . . . . . | 599 |
| Figure 86. | ADC3 connectivity . . . . . | 600 |
| Figure 87. | ADC4 connectivity . . . . . | 601 |
| Figure 88. | ADC5 connectivity . . . . . | 602 |
| Figure 89. | ADC calibration. . . . . | 605 |
| Figure 90. | Updating the ADC calibration factor . . . . . | 606 |
| Figure 91. | Mixing single-ended and differential channels . . . . . | 607 |
| Figure 92. | Enabling / disabling the ADC . . . . . | 608 |
| Figure 93. | Bulb mode timing diagram . . . . . | 611 |
| Figure 94. | Analog-to-digital conversion time . . . . . | 614 |
| Figure 95. | Stopping ongoing regular conversions . . . . . | 615 |
| Figure 96. | Stopping ongoing regular and injected conversions . . . . . | 615 |
| Figure 97. | Triggers sharing between ADC master and ADC slave . . . . . | 617 |
| Figure 98. | Injected conversion latency . . . . . | 622 |
| Figure 99. | Example of ADC_JSQR queue of context (sequence change) . . . . . | 626 |
| Figure 100. | Example of ADC_JSQR queue of context (trigger change) . . . . . | 626 |
| Figure 101. | Example of ADC_JSQR queue of context with overflow before conversion. . . . . | 627 |
| Figure 102. | Example of ADC_JSQR queue of context with overflow during conversion . . . . . | 627 |
| Figure 103. | Example of ADC_JSQR queue of context with empty queue (case JQM = 0) . . . . . | 628 |
| Figure 104. | Example of ADC_JSQR queue of context with empty queue (case JQM = 1) . . . . . | 629 |
| Figure 105. | Flushing ADC_JSQR queue of context by setting JADSTP = 1 (JQM = 0) Case when JADSTP occurs during an ongoing conversion . . . . . | 629 |
| Figure 106. | Flushing ADC_JSQR queue of context by setting JADSTP = 1 (JQM = 0) Case when JADSTP occurs during an ongoing conversion and a new trigger occurs. . . . . | 630 |
| Figure 107. | Flushing ADC_JSQR queue of context by setting JADSTP = 1 (JQM = 0) Case when JADSTP occurs outside an ongoing conversion . . . . . | 630 |
| Figure 108. | Flushing ADC_JSQR queue of context by setting JADSTP = 1 (JQM = 1) . . . . . | 631 |
| Figure 109. | Flushing ADC_JSQR queue of context by setting ADDIS = 1 (JQM = 0) . . . . . | 631 |
| Figure 110. | Flushing ADC_JSQR queue of context by setting ADDIS = 1 (JQM = 1) . . . . . | 632 |
| Figure 111. | Single conversions of a sequence, software trigger . . . . . | 634 |
| Figure 112. | Continuous conversion of a sequence, software trigger . . . . . | 634 |
| Figure 113. | Single conversions of a sequence, hardware trigger . . . . . | 635 |
| Figure 114. | Continuous conversions of a sequence, hardware trigger . . . . . | 635 |
| Figure 115. | Right alignment (offset disabled, unsigned value) . . . . . | 637 |
| Figure 116. | Right alignment (offset enabled, signed value) . . . . . | 638 |
| Figure 117. | Left alignment (offset disabled, unsigned value) . . . . . | 638 |
| Figure 118. | Left alignment (offset enabled, signed value) . . . . . | 639 |
| Figure 119. | Example of overrun (OVR) . . . . . | 640 |
| Figure 120. | AUTODLY = 1, regular conversion in continuous mode, software trigger . . . . . | 643 |
| Figure 121. | AUTODLY = 1, regular HW conversions interrupted by injected conversions (DISCEN = 0; JDISCEN = 0) . . . . . | 644 |
| Figure 122. | AUTODLY = 1, regular HW conversions interrupted by injected conversions (DISCEN = 1, JDISCEN = 1) . . . . . | 645 |
| Figure 123. | AUTODLY = 1, regular continuous conversions interrupted by injected conversions . . . . . | 646 |
| Figure 124. | AUTODLY = 1 in auto- injected mode (JAUTO = 1) . . . . . | 646 |
| Figure 125. | Analog watchdog guarded area . . . . . | 647 |
| Figure 126. | ADC y _AWD x _OUT signal generation (on all regular channels) . . . . . | 649 |
| Figure 127. | ADC y _AWD x _OUT signal generation (AWD x flag not cleared by software) . . . . . | 650 |
| Figure 128. | ADC y _AWD x _OUT signal generation (on a single regular channel) . . . . . | 650 |
| Figure 129. | ADC y _AWD x _OUT signal generation (on all injected channels) . . . . . | 650 |
| Figure 130. | 20-bit to 16-bit result truncation . . . . . | 652 |
| Figure 131. | Numerical example with 5-bit shift and rounding . . . . . | 652 |
| Figure 132. | Triggered regular oversampling mode (TROVS bit = 1) . . . . . | 654 |
| Figure 133. | Regular oversampling modes (4x ratio) . . . . . | 655 |
| Figure 134. | Regular and injected oversampling modes used simultaneously . . . . . | 655 |
| Figure 135. | Triggered regular oversampling with injection . . . . . | 656 |
| Figure 136. | Oversampling in auto-injected mode . . . . . | 656 |
| Figure 137. | Dual ADC block diagram (1) . . . . . | 659 |
| Figure 138. | Injected simultaneous mode on 4 channels: dual ADC mode . . . . . | 660 |
| Figure 139. | Regular simultaneous mode on 16 channels: dual ADC mode . . . . . | 662 |
| Figure 140. | Interleaved mode on 1 channel in continuous conversion mode: dual ADC mode. . . . . | 663 |
| Figure 141. | Interleaved mode on 1 channel in single conversion mode: dual ADC mode. . . . . | 664 |
| Figure 142. | Interleaved conversion with injection . . . . . | 664 |
| Figure 143. | Alternate trigger: injected group of each ADC . . . . . | 665 |
| Figure 144. | Alternate trigger: 4 injected channels (each ADC) in discontinuous mode. . . . . | 666 |
| Figure 145. | Alternate + regular simultaneous . . . . . | 667 |
| Figure 146. | Case of trigger occurring during injected conversion . . . . . | 667 |
| Figure 147. Interleaved single channel CH0 with injected sequence CH11, CH12 . . . . . | 668 |
| Figure 148. Two Interleaved channels (CH1, CH2) with injected sequence CH11, CH12 - case 1: Master interrupted first . . . . . | 668 |
| Figure 149. Two Interleaved channels (CH1, CH2) with injected sequence CH11, CH12 - case 2: Slave interrupted first . . . . . | 668 |
| Figure 150. DMA Requests in regular simultaneous mode when MDMA = 00 . . . . . | 669 |
| Figure 151. DMA requests in regular simultaneous mode when MDMA = 10 . . . . . | 670 |
| Figure 152. DMA requests in interleaved mode when MDMA = 10 . . . . . | 670 |
| Figure 153. Temperature sensor channel block diagram . . . . . | 672 |
| Figure 154. VBAT channel block diagram . . . . . | 673 |
| Figure 155. VREFINT channel block diagram . . . . . | 674 |
| Figure 156. Dual-channel DAC block diagram . . . . . | 716 |
| Figure 157. Data registers in single DAC channel mode . . . . . | 723 |
| Figure 158. Data registers in dual DAC channel mode . . . . . | 724 |
| Figure 159. Timing diagram for conversion with trigger disabled TEN = 0 . . . . . | 726 |
| Figure 160. DAC LFSR register calculation algorithm . . . . . | 728 |
| Figure 161. DAC conversion (SW trigger enabled) with LFSR wave generation. . . . . | 728 |
| Figure 162. DAC triangle wave generation . . . . . | 729 |
| Figure 163. DAC conversion (SW trigger enabled) with triangle wave generation . . . . . | 729 |
| Figure 164. DAC sawtooth wave generation (STDIRx = 0) . . . . . | 730 |
| Figure 165. DAC sawtooth wave generation (STDIRx = 1) . . . . . | 730 |
| Figure 166. DAC sawtooth STINCTRIG and STRSTTRIG priority (STDIR = 0) . . . . . | 731 |
| Figure 167. DAC sample and hold mode phase diagram . . . . . | 733 |
| Figure 168. Comparator block diagram . . . . . | 768 |
| Figure 169. Comparator hysteresis . . . . . | 770 |
| Figure 170. Comparator output blanking . . . . . | 771 |
| Figure 171. Standalone mode: external gain setting mode . . . . . | 779 |
| Figure 172. Follower configuration. . . . . | 780 |
| Figure 173. PGA mode, internal gain setting (x2/x4/x8/x16/x32/x64), inverting input not used. . . . . | 781 |
| Figure 174. PGA mode, internal gain setting (x2/x4/x8/x16/x32/x64), inverting input used for filtering. . . . . | 782 |
| Figure 175. PGA mode, non-inverting gain setting (x2/x4/x8/x16/x32/x64) or inverting gain setting (x-1/x-3/x-7/x-15/x-31/x-63) . . . . . | 783 |
| Figure 176. PGA mode, non-inverting gain setting (x2/x4/x8/x16/x32/x64) or inverting gain setting (x-1/x-3/x-7/x-15/x-31/x-63) with filtering . . . . . | 784 |
| Figure 177. Example configuration . . . . . | 784 |
| Figure 178. Timer controlled Multiplexer mode . . . . . | 787 |
| Figure 179. RNG block diagram . . . . . | 821 |
| Figure 180. Entropy source model. . . . . | 822 |
| Figure 181. RNG initialization overview. . . . . | 824 |
| Figure 182. AES block diagram . . . . . | 833 |
| Figure 183. ECB encryption and decryption principle . . . . . | 835 |
| Figure 184. CBC encryption and decryption principle . . . . . | 836 |
| Figure 185. CTR encryption and decryption principle . . . . . | 837 |
| Figure 186. GCM encryption and authentication principle. . . . . | 838 |
| Figure 187. GMAC authentication principle . . . . . | 838 |
| Figure 188. CCM encryption and authentication principle . . . . . | 839 |
| Figure 189. Encryption key derivation for ECB/CBC decryption (Mode 2). . . . . | 842 |
| Figure 190. Example of suspend mode management . . . . . | 843 |
| Figure 191. ECB encryption. . . . . | 844 |
| Figure 192. ECB decryption. . . . . | 844 |
| Figure 193. CBC encryption. . . . . | 845 |
| Figure 194. CBC decryption. . . . . | 845 |
| Figure 195. ECB/CBC encryption (Mode 1). . . . . | 846 |
| Figure 196. ECB/CBC decryption (Mode 3). . . . . | 847 |
| Figure 197. Message construction in CTR mode. . . . . | 849 |
| Figure 198. CTR encryption. . . . . | 850 |
| Figure 199. CTR decryption. . . . . | 850 |
| Figure 200. Message construction in GCM . . . . . | 852 |
| Figure 201. GCM authenticated encryption . . . . . | 853 |
| Figure 202. Message construction in GMAC mode . . . . . | 857 |
| Figure 203. GMAC authentication mode . . . . . | 857 |
| Figure 204. Message construction in CCM mode . . . . . | 858 |
| Figure 205. CCM mode authenticated encryption . . . . . | 860 |
| Figure 206. 128-bit block construction with respect to data swap . . . . . | 864 |
| Figure 207. DMA transfer of a 128-bit data block during input phase . . . . . | 866 |
| Figure 208. DMA transfer of a 128-bit data block during output phase . . . . . | 867 |
| Figure 209. High-resolution timer overview . . . . . | 884 |
| Figure 210. Counter and capture register format vs clock prescaling factor . . . . . | 890 |
| Figure 211. Timer A..F overview . . . . . | 892 |
| Figure 212. Continuous timer operation. . . . . | 894 |
| Figure 213. Single-shot timer operation. . . . . | 894 |
| Figure 214. Timer reset resynchronization (prescaling ratio above 32). . . . . | 896 |
| Figure 215. Repetition rate versus HRTIM_REPxR content in continuous mode . . . . . | 897 |
| Figure 216. Repetition counter behavior in single-shot mode . . . . . | 897 |
| Figure 217. Compare events action on outputs: set on compare 1, reset on compare 2 . . . . . | 899 |
| Figure 218. Timer A timing unit capture circuitry . . . . . | 903 |
| Figure 219. Auto-delayed overview (compare 2 only) . . . . . | 904 |
| Figure 220. Auto-delayed compare . . . . . | 905 |
| Figure 221. Triggered-half mode example. . . . . | 907 |
| Figure 222. Push-pull mode block diagram . . . . . | 908 |
| Figure 223. Push-pull mode example . . . . . | 909 |
| Figure 224. Push-pull with deadtime . . . . . | 910 |
| Figure 225. Complementary outputs with deadtime insertion . . . . . | 911 |
| Figure 226. Deadtime insertion versus deadtime sign (1 indicates negative deadtime) . . . . . | 911 |
| Figure 227. Complementary outputs for low pulsewidth (SDTRx = SDTFx = 0) . . . . . | 912 |
| Figure 228. Complementary outputs for low pulsewidth (SDTRx = SDTFx = 1) . . . . . | 912 |
| Figure 229. Complementary outputs for low pulsewidth (SDTRx = 0, SDTFx = 1) . . . . . | 913 |
| Figure 230. Complementary outputs for low pulsewidth (SDTRx = 1, SDTFx=0) . . . . . | 913 |
| Figure 231. Master timer overview. . . . . | 914 |
| Figure 232. Basic symmetric waveform in up-down counting mode . . . . . | 915 |
| Figure 233. Complex symmetric waveform in up-down counting mode. . . . . | 916 |
| Figure 234. Asymmetric waveform in up-down counting mode . . . . . | 916 |
| Figure 235. External event management in up-down counting mode . . . . . | 917 |
| Figure 236. Interleaved up-down counter operation . . . . . | 917 |
| Figure 237. Interleaved up-down counter operation . . . . . | 918 |
| Figure 238. Push-pull up-down mode example . . . . . | 918 |
| Figure 239. Up-down mode with “greater than” comparison . . . . . | 919 |
| Figure 240. Up-down mode with output set on period event, for OUTROM[1:0]=10 . . . . . | 920 |
| Figure 241. Repetition counter behavior in up-down counting mode. . . . . | 921 |
| Figure 242. Short distance set/reset management for narrow pulse generation . . . . . | 923 |
| Figure 243. External event conditioning overview (1 channel represented) . . . . . | 926 |
| Figure 244. Latency to external events (counter reset and output set) . . . . . | 929 |
| Figure 245. Latency to external events (output reset on external event) . . . . . | 929 |
| Figure 246. Event blanking mode . . . . . | 930 |
| Figure 247. Event postpone mode . . . . . | 930 |
| Figure 248. External trigger blanking with edge-sensitive trigger . . . . . | 931 |
| Figure 249. External trigger blanking, level sensitive triggering . . . . . | 932 |
| Figure 250. Event windowing mode . . . . . | 932 |
| Figure 251. External trigger windowing with edge-sensitive trigger . . . . . | 933 |
| Figure 252. External trigger windowing, level sensitive triggering . . . . . | 934 |
| Figure 253. External event counter – channel A . . . . . | 934 |
| Figure 254. External event counter cumulative mode (EEVxRSTM = 1, EEVxCNT = 2). . . . . | 935 |
| Figure 255. Delayed Idle mode entry . . . . . | 937 |
| Figure 256. Burst mode and delayed protection priorities (DIDL = 0) . . . . . | 938 |
| Figure 257. Burst mode and delayed protection priorities (DIDL = 1) . . . . . | 939 |
| Figure 258. Balanced Idle protection example . . . . . | 940 |
| Figure 259. Resynchronized timer update (TAU=1 in HRTIM_TIMBCR) . . . . . | 945 |
| Figure 260. Early turn-ON and early turn-OFF behavior in “greater than” PWM mode . . . . . | 947 |
| Figure 261. Output management overview . . . . . | 952 |
| Figure 262. HRTIM output states and transitions . . . . . | 953 |
| Figure 263. Burst mode operation example . . . . . | 954 |
| Figure 264. Burst mode trigger on external event . . . . . | 957 |
| Figure 265. Delayed burst mode entry with deadtime enabled and IDLESx = 1 . . . . . | 958 |
| Figure 266. Delayed burst mode entry during deadtime . . . . . | 959 |
| Figure 267. Burst mode exit when the deadtime generator is enabled . . . . . | 960 |
| Figure 268. Burst mode emulation example . . . . . | 962 |
| Figure 269. Carrier frequency signal insertion . . . . . | 962 |
| Figure 270. HRTIM outputs with Chopper mode enabled . . . . . | 963 |
| Figure 271. Fault protection circuitry (FAULT1 fully represented, FAULT2..6 partially). . . . . | 964 |
| Figure 272. Fault signal filtering (FLTxF[3:0] = 0010: f SAMPLING = f HRTIM , N = 4) . . . . . | 965 |
| Figure 273. Fault counter cumulative mode (FLTxRSTM = 1, FLTxCNT[3:0] = 2) . . . . . | 966 |
| Figure 274. Auxiliary outputs . . . . . | 968 |
| Figure 275. Auxiliary and main outputs during burst mode (DIDLx = 0) . . . . . | 969 |
| Figure 276. Deadtime distortion on auxiliary output when exiting burst mode. . . . . | 969 |
| Figure 277. Counter behavior in synchronized start mode . . . . . | 973 |
| Figure 278. ADC trigger selection overview . . . . . | 974 |
| Figure 279. ADC triggers . . . . . | 975 |
| Figure 280. ADC trigger post-scaling in up-counting mode . . . . . | 976 |
| Figure 281. ADC trigger post-scaling in up/down counting mode . . . . . | 976 |
| Figure 282. Combining several updates on a single hrtim_dac_trgx output . . . . . | 977 |
| Figure 283. DAC triggers for slope compensation . . . . . | 980 |
| Figure 284. DAC triggers overview . . . . . | 981 |
| Figure 285. DMA burst overview . . . . . | 985 |
| Figure 286. Burst DMA operation flowchart . . . . . | 986 |
| Figure 287. Registers update following DMA burst transfer . . . . . | 987 |
| Figure 288. Buck converter topology . . . . . | 989 |
| Figure 289. Dual Buck converter management . . . . . | 990 |
| Figure 290. Synchronous rectification depending on output current . . . . . | 990 |
| Figure 291. Buck with synchronous rectification . . . . . | 991 |
| Figure 292. 3-phase interleaved buck converter . . . . . | 991 |
| Figure 293. 3-phase interleaved buck converter control . . . . . | 992 |
| Figure 294. Transition mode PFC . . . . . | 993 |
| Figure 295. Transition mode PFC waveforms . . . . . | 994 |
| Figure 296. Advanced-control timer block diagram . . . . . | 1145 |
| Figure 297. | Counter timing diagram with prescaler division change from 1 to 2 . . . . . | 1152 |
| Figure 298. | Counter timing diagram with prescaler division change from 1 to 4 . . . . . | 1152 |
| Figure 299. | Counter timing diagram, internal clock divided by 1 . . . . . | 1154 |
| Figure 300. | Counter timing diagram, internal clock divided by 2 . . . . . | 1154 |
| Figure 301. | Counter timing diagram, internal clock divided by 4 . . . . . | 1155 |
| Figure 302. | Counter timing diagram, internal clock divided by N . . . . . | 1155 |
| Figure 303. | Counter timing diagram, update event when ARPE = 0 (TIMx_ARR not preloaded). . . . . | 1156 |
| Figure 304. | Counter timing diagram, update event when ARPE = 1 (TIMx_ARR preloaded). . . . . | 1157 |
| Figure 305. | Counter timing diagram, internal clock divided by 1 . . . . . | 1158 |
| Figure 306. | Counter timing diagram, internal clock divided by 2 . . . . . | 1159 |
| Figure 307. | Counter timing diagram, internal clock divided by 4 . . . . . | 1159 |
| Figure 308. | Counter timing diagram, internal clock divided by N . . . . . | 1160 |
| Figure 309. | Counter timing diagram, update event when repetition counter is not used. . . . . | 1160 |
| Figure 310. | Counter timing diagram, internal clock divided by 1, TIMx_ARR = 0x6 . . . . . | 1162 |
| Figure 311. | Counter timing diagram, internal clock divided by 2 . . . . . | 1162 |
| Figure 312. | Counter timing diagram, internal clock divided by 4, TIMx_ARR = 0x36 . . . . . | 1163 |
| Figure 313. | Counter timing diagram, internal clock divided by N . . . . . | 1163 |
| Figure 314. | Counter timing diagram, update event with ARPE = 1 (counter underflow) . . . . . | 1164 |
| Figure 315. | Counter timing diagram, Update event with ARPE = 1 (counter overflow) . . . . . | 1165 |
| Figure 316. | Update rate examples depending on mode and TIMx_RCR register settings . . . . . | 1166 |
| Figure 318. | Control circuit in normal mode, internal clock divided by 1 . . . . . | 1168 |
| Figure 319. | tim_ti2 external clock connection example . . . . . | 1168 |
| Figure 320. | Control circuit in external clock mode 1 . . . . . | 1169 |
| Figure 321. | External trigger input block . . . . . | 1170 |
| Figure 322. | Control circuit in external clock mode 2 . . . . . | 1171 |
| Figure 323. | Capture/compare channel (example: channel 1 input stage) . . . . . | 1171 |
| Figure 324. | Capture/compare channel 1 main circuit . . . . . | 1172 |
| Figure 325. | Output stage of capture/compare channel (channel 1, idem ch. 2, 3 and 4) . . . . . | 1173 |
| Figure 326. | Output stage of capture/compare channel (channel 5, idem ch. 6) . . . . . | 1173 |
| Figure 327. | PWM input mode timing . . . . . | 1176 |
| Figure 328. | Output compare mode, toggle on tim_oc1 . . . . . | 1178 |
| Figure 329. | Edge-aligned PWM waveforms (ARR = 8) . . . . . | 1179 |
| Figure 330. | Center-aligned PWM waveforms (ARR = 8). . . . . | 1180 |
| Figure 331. | Dithering principle . . . . . | 1181 |
| Figure 332. | Data format and register coding in dithering mode . . . . . | 1182 |
| Figure 333. | PWM resolution vs frequency . . . . . | 1183 |
| Figure 334. | PWM dithering pattern . . . . . | 1184 |
| Figure 335. | Dithering effect on duty cycle in center-aligned PWM mode . . . . . | 1185 |
| Figure 336. | Generation of 2 phase-shifted PWM signals with 50% duty cycle . . . . . | 1187 |
| Figure 337. | Combined PWM mode on channel 1 and 3 . . . . . | 1188 |
| Figure 338. | 3-phase combined PWM signals with multiple trigger pulses per period . . . . . | 1189 |
| Figure 339. | Complementary output with symmetrical dead-time insertion . . . . . | 1190 |
| Figure 340. | Asymmetrical deadtime . . . . . | 1191 |
| Figure 341. | Dead-time waveforms with delay greater than the negative pulse . . . . . | 1191 |
| Figure 342. | Dead-time waveforms with delay greater than the positive pulse. . . . . | 1191 |
| Figure 343. | Break and Break2 circuitry overview . . . . . | 1194 |
| Figure 344. | Various output behavior in response to a break event on tim_brk (OSSI = 1) . . . . . | 1196 |
| Figure 345. | PWM output state following tim_brk and tim_brk2 assertion (OSSI = 1) . . . . . | 1197 |
| Figure 346. | PWM output state following tim_brk assertion (OSSI = 0) . . . . . | 1198 |
| Figure 347. | Output redirection (tim_brk2 request not represented). . . . . | 1199 |
| Figure 348. tim_ocref_clr input selection multiplexer . . . . . | 1200 |
| Figure 349. Clearing TIMx tim_ocxref . . . . . | 1201 |
| Figure 350. 6-step generation, COM example (OSSR = 1) . . . . . | 1202 |
| Figure 351. Example of one pulse mode. . . . . | 1203 |
| Figure 352. Retriggerable one-pulse mode . . . . . | 1204 |
| Figure 353. Pulse generator circuitry . . . . . | 1205 |
| Figure 354. Pulse generation on compare event, for edge-aligned and encoder modes . . . . . | 1206 |
| Figure 355. Extended pulselwidth in case of concurrent triggers . . . . . | 1207 |
| Figure 356. Example of counter operation in encoder interface mode. . . . . | 1209 |
| Figure 357. Example of encoder interface mode with tim_ti1fp1 polarity inverted. . . . . | 1209 |
| Figure 358. Quadrature encoder counting modes . . . . . | 1210 |
| Figure 359. Direction plus clock encoder mode. . . . . | 1211 |
| Figure 360. Directional clock encoder mode (CC1P = CC2P = 0). . . . . | 1211 |
| Figure 361. Directional clock encoder mode (CC1P = CC2P = 1). . . . . | 1212 |
| Figure 362. Index gating options . . . . . | 1213 |
| Figure 363. Jittered Index signals . . . . . | 1213 |
| Figure 364. Index generation for IPOS[1:0] = 11 . . . . . | 1214 |
| Figure 365. Counter reading with index gated on channel A (IPOS[1:0] = 11) . . . . . | 1214 |
| Figure 366. Counter reading with index ungated (IPOS[1:0] = 00) . . . . . | 1215 |
| Figure 367. Counter reading with index gated on channel A and B. . . . . | 1215 |
| Figure 368. Encoder mode behavior in case of narrow index pulse (IPOS[1:0] = 11). . . . . | 1216 |
| Figure 369. Counter reset Narrow index pulse (closer view, ARR = 0x07) . . . . . | 1217 |
| Figure 370. Index behavior in x1 and x2 mode (IPOS[1:0] = 01). . . . . | 1218 |
| Figure 371. Directional index sensitivity. . . . . | 1219 |
| Figure 372. Counter reset as function of FIDX bit setting . . . . . | 1219 |
| Figure 373. Index behavior in clock + direction mode, IPOS[0] = 1. . . . . | 1220 |
| Figure 374. Index behavior in directional clock mode, IPOS[0] = 1 . . . . . | 1220 |
| Figure 375. State diagram for quadrature encoded signals. . . . . | 1221 |
| Figure 376. Up-counting encoder error detection . . . . . | 1222 |
| Figure 377. Down-counting encode error detection. . . . . | 1223 |
| Figure 378. Encoder mode change with preload transferred on update (SMSPS = 0) . . . . . | 1224 |
| Figure 379. Measuring time interval between edges on three signals. . . . . | 1225 |
| Figure 380. Example of Hall sensor interface . . . . . | 1227 |
| Figure 381. Control circuit in reset mode . . . . . | 1228 |
| Figure 382. Control circuit in Gated mode . . . . . | 1229 |
| Figure 383. Control circuit in trigger mode. . . . . | 1230 |
| Figure 384. Control circuit in external clock mode 2 + trigger mode . . . . . | 1231 |
| Figure 385. General-purpose timer block diagram . . . . . | 1289 |
| Figure 386. Counter timing diagram with prescaler division change from 1 to 2 . . . . . | 1295 |
| Figure 387. Counter timing diagram with prescaler division change from 1 to 4 . . . . . | 1296 |
| Figure 388. Counter timing diagram, internal clock divided by 1 . . . . . | 1297 |
| Figure 389. Counter timing diagram, internal clock divided by 2 . . . . . | 1297 |
| Figure 390. Counter timing diagram, internal clock divided by 4 . . . . . | 1298 |
| Figure 391. Counter timing diagram, internal clock divided by N. . . . . | 1298 |
| Figure 392. Counter timing diagram, Update event when ARPE = 0 (TIMx_ARR not preloaded). . . . . | 1299 |
| Figure 393. Counter timing diagram, Update event when ARPE = 1 (TIMx_ARR preloaded). . . . . | 1300 |
| Figure 394. Counter timing diagram, internal clock divided by 1 . . . . . | 1301 |
| Figure 395. Counter timing diagram, internal clock divided by 2 . . . . . | 1302 |
| Figure 396. Counter timing diagram, internal clock divided by 4 . . . . . | 1302 |
| Figure 397. Counter timing diagram, internal clock divided by N. . . . . | 1303 |
| Figure 398. Counter timing diagram, Update event. . . . . | 1303 |
| Figure 399. Counter timing diagram, internal clock divided by 1, TIMx_ARR = 0x6 . . . . . | 1305 |
| Figure 400. Counter timing diagram, internal clock divided by 2 . . . . . | 1305 |
| Figure 401. Counter timing diagram, internal clock divided by 4, TIMx_ARR = 0x36 . . . . . | 1306 |
| Figure 402. Counter timing diagram, internal clock divided by N . . . . . | 1306 |
| Figure 403. Counter timing diagram, Update event with ARPE = 1 (counter underflow). . . . . | 1307 |
| Figure 404. Counter timing diagram, Update event with ARPE = 1 (counter overflow). . . . . | 1308 |
| Figure 405. Control circuit in normal mode, internal clock divided by 1 . . . . . | 1309 |
| Figure 406. tim_ti2 external clock connection example . . . . . | 1309 |
| Figure 407. Control circuit in external clock mode 1 . . . . . | 1310 |
| Figure 408. External trigger input block . . . . . | 1311 |
| Figure 409. Control circuit in external clock mode 2 . . . . . | 1312 |
| Figure 410. Capture/compare channel (example: channel 1 input stage). . . . . | 1312 |
| Figure 411. Capture/compare channel 1 main circuit . . . . . | 1313 |
| Figure 412. Output stage of capture/compare channel (channel 1, idem ch.2, 3 and 4). . . . . | 1313 |
| Figure 413. PWM input mode timing . . . . . | 1316 |
| Figure 414. Output compare mode, toggle on tim_oc1 . . . . . | 1318 |
| Figure 415. Edge-aligned PWM waveforms (ARR = 8). . . . . | 1319 |
| Figure 416. Center-aligned PWM waveforms (ARR = 8). . . . . | 1320 |
| Figure 417. Dithering principle . . . . . | 1321 |
| Figure 418. Data format and register coding in dithering mode. . . . . | 1322 |
| Figure 419. PWM resolution vs frequency (16-bit mode). . . . . | 1323 |
| Figure 420. PWM resolution vs frequency (32-bit mode). . . . . | 1323 |
| Figure 421. PWM dithering pattern . . . . . | 1324 |
| Figure 422. Dithering effect on duty cycle in center-aligned PWM mode . . . . . | 1325 |
| Figure 423. Generation of two phase-shifted PWM signals with 50% duty cycle . . . . . | 1327 |
| Figure 424. Combined PWM mode on channels 1 and 3 . . . . . | 1328 |
| Figure 425. OCREF_CLR input selection multiplexer . . . . . | 1329 |
| Figure 426. Clearing TIMx tim_ocxref . . . . . | 1329 |
| Figure 427. Example of One-pulse mode . . . . . | 1330 |
| Figure 428. Retriggerable one-pulse mode . . . . . | 1332 |
| Figure 429. Pulse generator circuitry . . . . . | 1333 |
| Figure 430. Pulse generation on compare event, for edge-aligned and encoder modes . . . . . | 1333 |
| Figure 431. Extended pulse width in case of concurrent triggers . . . . . | 1334 |
| Figure 432. Example of counter operation in encoder interface mode . . . . . | 1336 |
| Figure 433. Example of encoder interface mode with tim_ti1fp1 polarity inverted . . . . . | 1336 |
| Figure 434. Quadrature encoder counting modes . . . . . | 1337 |
| Figure 435. Direction plus clock encoder mode. . . . . | 1338 |
| Figure 436. Directional clock encoder mode (CC1P = CC2P = 0). . . . . | 1339 |
| Figure 437. Directional clock encoder mode (CC1P = CC2P = 1). . . . . | 1339 |
| Figure 438. Index gating options . . . . . | 1341 |
| Figure 439. Jittered Index signals . . . . . | 1341 |
| Figure 440. Index generation for IPOS[1:0] = 11 . . . . . | 1342 |
| Figure 441. Counter reading with index gated on channel A (IPOS[1:0] = 11) . . . . . | 1342 |
| Figure 442. Counter reading with index ungated (IPOS[1:0] = 00) . . . . . | 1343 |
| Figure 443. Counter reading with index gated on channel A and B. . . . . | 1343 |
| Figure 444. Encoder mode behavior in case of narrow index pulse (IPOS[1:0] = 11). . . . . | 1344 |
| Figure 445. Counter reset Narrow index pulse (closer view, ARR = 0x07) . . . . . | 1345 |
| Figure 446. Index behavior in x1 and x2 mode (IPOS[1:0] = 01). . . . . | 1346 |
| Figure 447. Directional index sensitivity. . . . . | 1347 |
| Figure 448. Counter reset as function of FIDX bit setting . . . . . | 1347 |
| Figure 449. Index behavior in clock + direction mode, IPOS[0] = 1. . . . . | 1348 |
| Figure 450. Index behavior in directional clock mode, IPOS[0] = 1 . . . . . | 1348 |
| Figure 451. State diagram for quadrature encoded signals. . . . . | 1349 |
| Figure 452. Up-counting encoder error detection . . . . . | 1350 |
| Figure 453. Down-counting encode error detection . . . . . | 1351 |
| Figure 454. Encoder mode change with preload transferred on update (SMSPS = 0) . . . . . | 1352 |
| Figure 455. Control circuit in reset mode . . . . . | 1354 |
| Figure 456. Control circuit in gated mode . . . . . | 1355 |
| Figure 457. Control circuit in trigger mode . . . . . | 1355 |
| Figure 458. Control circuit in external clock mode 2 + trigger mode . . . . . | 1357 |
| Figure 459. Master/Slave timer example . . . . . | 1357 |
| Figure 460. Master/slave connection example with 1 channel only timers . . . . . | 1358 |
| Figure 461. Gating TIM_slv with tim_oc1ref of TIM_mstr . . . . . | 1359 |
| Figure 462. Gating TIM_slv with Enable of TIM_mstr . . . . . | 1360 |
| Figure 463. Triggering TIM_slv with update of TIM_mstr. . . . . | 1361 |
| Figure 464. Triggering TIM_slv with Enable of TIM_mstr . . . . . | 1361 |
| Figure 465. Triggering TIM_mstr and TIM_slv with TIM_mstr tim_ti1 input. . . . . | 1362 |
| Figure 466. TIM15 block diagram . . . . . | 1406 |
| Figure 467. TIM16/TIM17 block diagram . . . . . | 1407 |
| Figure 468. Counter timing diagram with prescaler division change from 1 to 2 . . . . . | 1412 |
| Figure 469. Counter timing diagram with prescaler division change from 1 to 4 . . . . . | 1412 |
| Figure 470. Counter timing diagram, internal clock divided by 1 . . . . . | 1414 |
| Figure 471. Counter timing diagram, internal clock divided by 2 . . . . . | 1414 |
| Figure 472. Counter timing diagram, internal clock divided by 4 . . . . . | 1415 |
| Figure 473. Counter timing diagram, internal clock divided by N . . . . . | 1415 |
| Figure 474. Counter timing diagram, update event when ARPE = 0 (TIMx_ARR not preloaded). . . . . | 1416 |
| Figure 475. Counter timing diagram, update event when ARPE = 1 (TIMx_ARR preloaded). . . . . | 1417 |
| Figure 476. Update rate examples depending on mode and TIMx_RCR register settings . . . . . | 1418 |
| Figure 477. Control circuit in normal mode, internal clock divided by 1 . . . . . | 1419 |
| Figure 478. tim_ti2 external clock connection example . . . . . | 1419 |
| Figure 479. Control circuit in external clock mode 1 . . . . . | 1420 |
| Figure 480. Capture/compare channel (example: channel 1 input stage) . . . . . | 1421 |
| Figure 481. Capture/compare channel 1 main circuit . . . . . | 1421 |
| Figure 482. Output stage of capture/compare channel (channel 1). . . . . | 1422 |
| Figure 483. Output stage of capture/compare channel (channel 2 for TIM15) . . . . . | 1422 |
| Figure 484. PWM input mode timing . . . . . | 1425 |
| Figure 485. Output compare mode, toggle on tim_oc1 . . . . . | 1427 |
| Figure 486. Edge-aligned PWM waveforms (ARR = 8) . . . . . | 1428 |
| Figure 487. Dithering principle . . . . . | 1429 |
| Figure 488. Data format and register coding in dithering mode . . . . . | 1429 |
| Figure 489. PWM resolution vs frequency . . . . . | 1430 |
| Figure 490. PWM dithering pattern . . . . . | 1431 |
| Figure 491. Combined PWM mode on channel 1 and 2 . . . . . | 1433 |
| Figure 492. Complementary output with symmetrical dead-time insertion. . . . . | 1434 |
| Figure 493. Asymmetrical deadtime . . . . . | 1435 |
| Figure 494. Dead-time waveforms with delay greater than the negative pulse. . . . . | 1435 |
| Figure 495. Dead-time waveforms with delay greater than the positive pulse. . . . . | 1435 |
| Figure 496. Break circuitry overview . . . . . | 1437 |
| Figure 497. Output behavior in response to a break event on tim_brk . . . . . | 1439 |
| Figure 498. Output redirection . . . . . | 1441 |
| Figure 499. tim_ocref_clr input selection multiplexer. . . . . | 1442 |
| Figure 500. 6-step generation, COM example (OSSR = 1) . . . . . | 1443 |
| Figure 501. Example of one pulse mode. . . . . | 1444 |
| Figure 502. Retriggerable one pulse mode . . . . . | 1446 |
| Figure 503. Measuring time interval between edges on 2 signals . . . . . | 1446 |
| Figure 504. Control circuit in reset mode . . . . . | 1447 |
| Figure 505. Control circuit in gated mode . . . . . | 1448 |
| Figure 506. Control circuit in trigger mode . . . . . | 1449 |
| Figure 507. Basic timer block diagram . . . . . | 1511 |
| Figure 508. Control circuit in normal mode, internal clock divided by 1 . . . . . | 1512 |
| Figure 509. Counter timing diagram with prescaler division change from 1 to 2 . . . . . | 1513 |
| Figure 510. Counter timing diagram with prescaler division change from 1 to 4 . . . . . | 1514 |
| Figure 511. Counter timing diagram, internal clock divided by 1 . . . . . | 1515 |
| Figure 512. Counter timing diagram, internal clock divided by 2 . . . . . | 1515 |
| Figure 513. Counter timing diagram, internal clock divided by 4 . . . . . | 1516 |
| Figure 514. Counter timing diagram, internal clock divided by N . . . . . | 1516 |
| Figure 515. Counter timing diagram, update event when ARPE = 0 (TIMx_ARR not preloaded). . . . . | 1517 |
| Figure 516. Counter timing diagram, update event when ARPE = 1 (TIMx_ARR preloaded). . . . . | 1518 |
| Figure 517. Dithering principle . . . . . | 1519 |
| Figure 518. Data format and register coding in dithering mode . . . . . | 1520 |
| Figure 519. FCnt resolution vs frequency . . . . . | 1521 |
| Figure 520. PWM dithering pattern . . . . . | 1521 |
| Figure 521. Low-power timer block diagram . . . . . | 1531 |
| Figure 522. Glitch filter timing diagram . . . . . | 1534 |
| Figure 523. LPTIM output waveform, single counting mode configuration . . . . . | 1535 |
| Figure 524. LPTIM output waveform, Single counting mode configuration and Set-once mode activated (WAVE bit is set). . . . . | 1536 |
| Figure 525. LPTIM output waveform, Continuous counting mode configuration . . . . . | 1536 |
| Figure 526. Waveform generation . . . . . | 1538 |
| Figure 527. Encoder mode counting sequence . . . . . | 1542 |
| Figure 528. IRTIM internal hardware connections with TIM16 and TIM17 . . . . . | 1555 |
| Figure 529. Independent watchdog block diagram . . . . . | 1556 |
| Figure 530. Watchdog block diagram . . . . . | 1566 |
| Figure 531. Window watchdog timing diagram . . . . . | 1567 |
| Figure 532. RTC block diagram . . . . . | 1572 |
| Figure 533. TAMP block diagram . . . . . | 1611 |
| Figure 534. Block diagram . . . . . | 1627 |
| Figure 535. I 2 C-bus protocol . . . . . | 1629 |
| Figure 536. Setup and hold timings . . . . . | 1631 |
| Figure 537. I2C initialization flow . . . . . | 1633 |
| Figure 538. Data reception . . . . . | 1634 |
| Figure 539. Data transmission . . . . . | 1635 |
| Figure 540. Target initialization flow . . . . . | 1638 |
| Figure 541. Transfer sequence flow for I2C target transmitter, NOSTRETCH = 0 . . . . . | 1640 |
| Figure 542. Transfer sequence flow for I2C target transmitter, NOSTRETCH = 1 . . . . . | 1641 |
| Figure 543. Transfer bus diagrams for I2C target transmitter (mandatory events only) . . . . . | 1642 |
| Figure 544. Transfer sequence flow for I2C target receiver, NOSTRETCH = 0 . . . . . | 1643 |
| Figure 545. Transfer sequence flow for I2C target receiver, NOSTRETCH = 1 . . . . . | 1644 |
| Figure 546. Transfer bus diagrams for I2C target receiver (mandatory events only). . . . . | 1644 |
| Figure 547. Controller clock generation . . . . . | 1646 |
| Figure 548. Controller initialization flow . . . . . | 1648 |
| Figure 549. 10-bit address read access with HEAD10R = 0 . . . . . | 1648 |
| Figure 550. | 10-bit address read access with HEAD10R = 1 . . . . . | 1649 |
| Figure 551. | Transfer sequence flow for I2C controller transmitter, N ≤ 255 bytes. . . . . | 1650 |
| Figure 552. | Transfer sequence flow for I2C controller transmitter, N > 255 bytes. . . . . | 1651 |
| Figure 553. | Transfer bus diagrams for I2C controller transmitter (mandatory events only) . . . . . | 1652 |
| Figure 554. | Transfer sequence flow for I2C controller receiver, N ≤ 255 bytes . . . . . | 1654 |
| Figure 555. | Transfer sequence flow for I2C controller receiver, N > 255 bytes. . . . . | 1655 |
| Figure 556. | Transfer bus diagrams for I2C controller receiver (mandatory events only) . . . . . | 1656 |
| Figure 557. | Timeout intervals for t LOW:SEXT , t LOW:MEXT . . . . . | 1660 |
| Figure 558. | Transfer sequence flow for SMBus target transmitter N bytes + PEC . . . . . | 1664 |
| Figure 559. | Transfer bus diagram for SMBus target transmitter (SBC = 1). . . . . | 1664 |
| Figure 560. | Transfer sequence flow for SMBus target receiver N bytes + PEC . . . . . | 1666 |
| Figure 561. | Bus transfer diagrams for SMBus target receiver (SBC = 1) . . . . . | 1667 |
| Figure 562. | Bus transfer diagrams for SMBus controller transmitter . . . . . | 1668 |
| Figure 563. | Bus transfer diagrams for SMBus controller receiver . . . . . | 1670 |
| Figure 564. | USART block diagram . . . . . | 1692 |
| Figure 565. | Word length programming . . . . . | 1695 |
| Figure 566. | Configurable stop bits . . . . . | 1697 |
| Figure 567. | TC/TXE behavior when transmitting . . . . . | 1700 |
| Figure 568. | Start bit detection when oversampling by 16 or 8. . . . . | 1701 |
| Figure 569. | usart_ker_ck clock divider block diagram. . . . . | 1704 |
| Figure 570. | Data sampling when oversampling by 16. . . . . | 1705 |
| Figure 571. | Data sampling when oversampling by 8. . . . . | 1706 |
| Figure 572. | Mute mode using Idle line detection . . . . . | 1713 |
| Figure 573. | Mute mode using address mark detection . . . . . | 1714 |
| Figure 574. | Break detection in LIN mode (11-bit break length - LBDL bit is set). . . . . | 1717 |
| Figure 575. | Break detection in LIN mode vs. Framing error detection. . . . . | 1718 |
| Figure 576. | USART example of synchronous master transmission. . . . . | 1719 |
| Figure 577. | USART data clock timing diagram in synchronous master mode (M bits = 00) . . . . . | 1719 |
| Figure 578. | USART data clock timing diagram in synchronous master mode (M bits = 01) . . . . . | 1720 |
| Figure 579. | USART data clock timing diagram in synchronous slave mode (M bits = 00) . . . . . | 1721 |
| Figure 580. | ISO 7816-3 asynchronous protocol . . . . . | 1723 |
| Figure 581. | Parity error detection using the 1.5 stop bits . . . . . | 1725 |
| Figure 582. | IrDA SIR ENDEC block diagram. . . . . | 1729 |
| Figure 583. | IrDA data modulation (3/16) - normal mode . . . . . | 1729 |
| Figure 584. | Transmission using DMA . . . . . | 1731 |
| Figure 585. | Reception using DMA . . . . . | 1732 |
| Figure 586. | Hardware flow control between 2 USARTs . . . . . | 1732 |
| Figure 587. | RS232 RTS flow control . . . . . | 1733 |
| Figure 588. | RS232 CTS flow control . . . . . | 1734 |
| Figure 589. | Wake-up event verified (wake-up event = address match, FIFO disabled) . . . . . | 1737 |
| Figure 590. | Wake-up event not verified (wake-up event = address match, FIFO disabled) . . . . . | 1737 |
| Figure 591. | LPUART block diagram . . . . . | 1778 |
| Figure 592. | LPUART word length programming . . . . . | 1781 |
| Figure 593. | Configurable stop bits . . . . . | 1783 |
| Figure 594. | TC/TXE behavior when transmitting . . . . . | 1785 |
| Figure 595. | lpuart_ker_ck clock divider block diagram . . . . . | 1788 |
| Figure 596. Mute mode using Idle line detection . . . . . | 1792 |
| Figure 597. Mute mode using address mark detection . . . . . | 1793 |
| Figure 598. Transmission using DMA . . . . . | 1795 |
| Figure 599. Reception using DMA . . . . . | 1796 |
| Figure 600. Hardware flow control between 2 LPUARTs . . . . . | 1797 |
| Figure 601. RS232 RTS flow control . . . . . | 1797 |
| Figure 602. RS232 CTS flow control . . . . . | 1798 |
| Figure 603. Wake-up event verified (wake-up event = address match, FIFO disabled) . . . . . | 1801 |
| Figure 604. Wake-up event not verified (wake-up event = address match, FIFO disabled) . . . . . | 1801 |
| Figure 605. SPI block diagram. . . . . | 1830 |
| Figure 606. Full-duplex single master/ single slave application. . . . . | 1831 |
| Figure 607. Half-duplex single master/ single slave application . . . . . | 1832 |
| Figure 608. Simplex single master/single slave application (master in transmit-only/ slave in receive-only mode) . . . . . | 1833 |
| Figure 609. Master and three independent slaves. . . . . | 1834 |
| Figure 610. Multimaster application. . . . . | 1835 |
| Figure 611. Hardware/software slave select management . . . . . | 1836 |
| Figure 612. Data clock timing diagram . . . . . | 1837 |
| Figure 613. Data alignment when data length is not equal to 8-bit or 16-bit . . . . . | 1838 |
| Figure 614. Packing data in FIFO for transmission and reception. . . . . | 1842 |
| Figure 615. Master full-duplex communication . . . . . | 1845 |
| Figure 616. Slave full-duplex communication . . . . . | 1846 |
| Figure 617. Master full-duplex communication with CRC . . . . . | 1847 |
| Figure 618. Master full-duplex communication in packed mode . . . . . | 1848 |
| Figure 619. NSSP pulse generation in Motorola SPI master mode. . . . . | 1851 |
| Figure 620. TI mode transfer . . . . . | 1852 |
| Figure 621. I2S block diagram . . . . . | 1855 |
| Figure 622. I 2 S Philips protocol waveforms (16/32-bit full accuracy). . . . . | 1857 |
| Figure 623. I 2 S Philips standard waveforms (24-bit frame) . . . . . | 1857 |
| Figure 624. Transmitting 0x8EAA33 . . . . . | 1858 |
| Figure 625. Receiving 0x8EAA33 . . . . . | 1858 |
| Figure 626. I 2 S Philips standard (16-bit extended to 32-bit packet frame) . . . . . | 1858 |
| Figure 627. Example of 16-bit data frame extended to 32-bit channel frame . . . . . | 1858 |
| Figure 628. MSB Justified 16-bit or 32-bit full-accuracy length . . . . . | 1859 |
| Figure 629. MSB justified 24-bit frame length . . . . . | 1859 |
| Figure 630. MSB justified 16-bit extended to 32-bit packet frame . . . . . | 1860 |
| Figure 631. LSB justified 16-bit or 32-bit full-accuracy . . . . . | 1860 |
| Figure 632. LSB justified 24-bit frame length. . . . . | 1860 |
| Figure 633. Operations required to transmit 0x3478AE. . . . . | 1861 |
| Figure 634. Operations required to receive 0x3478AE . . . . . | 1861 |
| Figure 635. LSB justified 16-bit extended to 32-bit packet frame . . . . . | 1861 |
| Figure 636. Example of 16-bit data frame extended to 32-bit channel frame . . . . . | 1862 |
| Figure 637. PCM standard waveforms (16-bit) . . . . . | 1862 |
| Figure 638. PCM standard waveforms (16-bit extended to 32-bit packet frame). . . . . | 1863 |
| Figure 639. Start sequence in master mode . . . . . | 1864 |
| Figure 640. Audio sampling frequency definition . . . . . | 1865 |
| Figure 641. I 2 S clock generator architecture . . . . . | 1865 |
| Figure 642. SAI functional block diagram . . . . . | 1888 |
| Figure 643. Audio frame . . . . . | 1891 |
| Figure 644. FS role is start of frame + channel side identification (FSDEF = TRIS = 1) . . . . . | 1893 |
| Figure 645. FS role is start of frame (FSDEF = 0) . . . . . | 1894 |
| Figure 646. Slot size configuration with FBOFF = 0 in SAI_xSLOTR . . . . . | 1895 |
| Figure 647. First bit offset . . . . . | 1895 |
| Figure 648. Audio block clock generator overview . . . . . | 1897 |
| Figure 649. PDM typical connection and timing . . . . . | 1901 |
| Figure 650. Detailed PDM interface block diagram . . . . . | 1902 |
| Figure 651. Start-up sequence . . . . . | 1903 |
| Figure 652. SAI_ADR format in TDM mode, 32-bit slot width . . . . . | 1904 |
| Figure 653. SAI_ADR format in TDM mode, 16-bit slot width . . . . . | 1905 |
| Figure 654. SAI_ADR format in TDM mode, 8-bit slot width . . . . . | 1906 |
| Figure 655. AC'97 audio frame . . . . . | 1909 |
| Figure 656. SPDIF format . . . . . | 1910 |
| Figure 657. SAI_xDR register ordering . . . . . | 1911 |
| Figure 658. Data companding hardware in an audio block in the SAI . . . . . | 1914 |
| Figure 659. Tristate strategy on SD output line on an inactive slot . . . . . | 1916 |
| Figure 660. Tristate on output data line in a protocol like I2S . . . . . | 1917 |
| Figure 661. Overrun detection error . . . . . | 1918 |
| Figure 662. FIFO underrun event . . . . . | 1918 |
| Figure 663. CAN subsystem . . . . . | 1952 |
| Figure 664. FDCAN block diagram . . . . . | 1954 |
| Figure 665. Bit timing . . . . . | 1956 |
| Figure 666. Transceiver delay measurement . . . . . | 1961 |
| Figure 667. Pin control in bus monitoring mode . . . . . | 1962 |
| Figure 668. Pin control in loop-back mode . . . . . | 1965 |
| Figure 669. CAN error state diagram . . . . . | 1966 |
| Figure 670. Message RAM configuration . . . . . | 1967 |
| Figure 671. Standard message ID filter path . . . . . | 1970 |
| Figure 672. Extended message ID filter path . . . . . | 1971 |
| Figure 673. USB peripheral block diagram . . . . . | 2018 |
| Figure 674. Packet buffer areas with examples of buffer description table locations . . . . . | 2022 |
| Figure 675. UCPD block diagram . . . . . | 2052 |
| Figure 676. Clock division and timing elements . . . . . | 2053 |
| Figure 677. K-code transmission . . . . . | 2056 |
| Figure 678. Transmit order for various sizes of data . . . . . | 2057 |
| Figure 679. Packet format . . . . . | 2058 |
| Figure 680. Line format of Hard Reset . . . . . | 2058 |
| Figure 681. Line format of Cable Reset . . . . . | 2059 |
| Figure 682. BIST test data frame . . . . . | 2060 |
| Figure 683. BIST Carrier Mode 2 frame . . . . . | 2060 |
| Figure 684. UCPD BMC transmitter architecture . . . . . | 2061 |
| Figure 685. UCPD BMC receiver architecture . . . . . | 2062 |
| Figure 686. Block diagram of STM32 MCU and Cortex
®
-M4 with FPU-level debug support . . . . . | 2088 |
| Figure 687. SWJ debug port . . . . . | 2090 |
| Figure 688. JTAG TAP connections . . . . . | 2094 |
| Figure 689. TPIU block diagram . . . . . | 2113 |