RM0432-STM32L4+
This reference manual targets application developers. It provides complete information on how to use the STM32L4+ Series microcontrollers memory and peripherals.
The STM32L4+ Series is a family of microcontrollers with different memory sizes, packages and peripherals.
For ordering information, mechanical and electrical device characteristics, refer to the corresponding datasheets.
For information on the Arm ® Cortex ® -M4 core, refer to the Cortex ® -M4 Technical Reference Manual.
STM32L4+ Series microcontrollers include ST state-of-the-art patented technology.
Related documents
- • Cortex ® -M4 Technical Reference Manual, available from: http://infocenter.arm.com
- • STM32L4S5xx STM32L4S7xx STM32L4S9xx datasheet
- • STM32L4R5xx STM32L4R7xx STM32L4R9xx datasheet
- • STM32L4Q5xx datasheet
- • STM32L4P5xx datasheet
- • STM32F3, STM32F4, STM32L4 and STM32L4+ Series Cortex ® -M4 (PM0214)
- • STM32L4Rxxx/STM32L4Sxxx and STM32L4P5xx/STM32L4Q5xxx erratasheets
Contents
- 1 Documentation conventions . . . . . 86
- 1.1 General information . . . . . 86
- 1.2 List of abbreviations for registers . . . . . 86
- 1.3 Glossary . . . . . 87
- 1.4 Availability of peripherals . . . . . 87
- 2 System and memory overview . . . . . 88
- 2.1 System architecture . . . . . 88
- 2.1.1 I-bus . . . . . 90
- 2.1.2 D-bus . . . . . 90
- 2.1.3 S-bus . . . . . 90
- 2.1.4 DMA-bus . . . . . 91
- 2.1.5 DMA2D-bus . . . . . 91
- 2.1.6 LCD-TFT controller DMA bus . . . . . 91
- 2.1.7 SDMMC1 controller DMA bus . . . . . 91
- 2.1.8 SDMMC2 controller DMA bus (only for STM32L4P5xx and STM32L4Q5xx devices) . . . . . 91
- 2.1.9 GFXMMU-bus (only for STM32L4Rxxx and STM32L4Sxxx devices) . . . . . 91
- 2.1.10 BusMatrix . . . . . 91
- 2.2 Memory organization . . . . . 93
- 2.2.1 Introduction . . . . . 93
- 2.2.2 Memory map and register boundary addresses . . . . . 94
- 2.3 Bit banding . . . . . 106
- 2.4 Embedded SRAM . . . . . 107
- 2.4.1 SRAM2 parity check . . . . . 108
- 2.4.2 SRAM2 Write protection . . . . . 108
- 2.4.3 SRAM2 Read protection . . . . . 110
- 2.4.4 SRAM2 Erase . . . . . 110
- 2.5 Flash memory overview . . . . . 110
- 2.6 Boot configuration . . . . . 111
- 2.6.1 Boot configuration . . . . . 111
- 2.1 System architecture . . . . . 88
- 3 Embedded Flash memory (FLASH) . . . . . 114
| 3.1 | Introduction ..... | 114 |
| 3.2 | FLASH main features ..... | 114 |
| 3.3 | FLASH functional description ..... | 115 |
| 3.3.1 | Flash memory organization ..... | 115 |
| 3.3.2 | Error code correction (ECC) ..... | 120 |
| 3.3.3 | Read access latency ..... | 122 |
| 3.3.4 | Adaptive real-time memory accelerator (ART Accelerator) ..... | 123 |
| 3.3.5 | Flash program and erase operations ..... | 126 |
| 3.3.6 | Flash main memory erase sequences ..... | 127 |
| 3.3.7 | Flash main memory programming sequences ..... | 128 |
| 3.3.8 | Read-while-write (RWW) available only in Dual-bank mode ..... | 132 |
| 3.4 | FLASH option bytes ..... | 134 |
| 3.4.1 | Option bytes description ..... | 134 |
| 3.4.2 | Option bytes programming ..... | 141 |
| 3.5 | FLASH memory protection ..... | 144 |
| 3.5.1 | Read protection (RDP) ..... | 144 |
| 3.5.2 | Proprietary code readout protection (PCROP) ..... | 147 |
| 3.5.3 | Write protection (WRP) ..... | 149 |
| 3.6 | FLASH interrupts ..... | 150 |
| 3.7 | FLASH registers ..... | 151 |
| 3.7.1 | Flash access control register (FLASH_ACR) ..... | 151 |
| 3.7.2 | Flash Power-down key register (FLASH_PDKEYR) ..... | 152 |
| 3.7.3 | Flash key register (FLASH_KEYR) ..... | 153 |
| 3.7.4 | Flash option key register (FLASH_OPTKEYR) ..... | 153 |
| 3.7.5 | Flash status register (FLASH_SR) ..... | 154 |
| 3.7.6 | Flash control register (FLASH_CR) ..... | 156 |
| 3.7.7 | Flash ECC register (FLASH_ECCR) ..... | 158 |
| 3.7.8 | Flash option register (FLASH_OPTR) ..... | 160 |
| 3.7.9 | Flash PCROP1 Start address register (FLASH_PCROP1SR) ..... | 162 |
| 3.7.10 | Flash PCROP1 End address register (FLASH_PCROP1ER) ..... | 163 |
| 3.7.11 | Flash WRP1 area A address register (FLASH_WRP1AR) ..... | 163 |
| 3.7.12 | Flash WRP2 area A address register (FLASH_WRP2AR) ..... | 164 |
| 3.7.13 | Flash PCROP2 Start address register (FLASH_PCROP2SR) ..... | 165 |
| 3.7.14 | Flash PCROP2 End address register (FLASH_PCROP2ER) ..... | 165 |
| 3.7.15 | Flash WRP1 area B address register (FLASH_WRP1BR) ..... | 166 |
| 3.7.16 | Flash WRP2 area B address register (FLASH_WRP2BR) ..... | 166 |
3.7.17 Flash configuration register (FLASH_CFGR) . . . . . 167
3.7.18 FLASH register map . . . . . 168
4 Firewall (FW) . . . . . 170
4.1 Introduction . . . . . 170
4.2 Firewall main features . . . . . 170
4.3 Firewall functional description . . . . . 171
4.3.1 Firewall AMBA bus snoop . . . . . 171
4.3.2 Functional requirements . . . . . 171
4.3.3 Firewall segments . . . . . 172
4.3.4 Segment accesses and properties . . . . . 173
4.3.5 Firewall initialization . . . . . 174
4.3.6 Firewall states . . . . . 175
4.4 Firewall registers . . . . . 177
4.4.1 Code segment start address (FW_CSSA) . . . . . 177
4.4.2 Code segment length (FW_CSL) . . . . . 177
4.4.3 Non-volatile data segment start address (FW_NVDSSA) . . . . . 178
4.4.4 Non-volatile data segment length (FW_NVDLSL) . . . . . 178
4.4.5 Volatile data segment start address (FW_VDSSA) . . . . . 179
4.4.6 Volatile data segment length (FW_VDSL) . . . . . 179
4.4.7 Configuration register (FW_CR) . . . . . 180
4.4.8 Firewall register map . . . . . 182
5 Power control (PWR) . . . . . 183
5.1 Power supplies . . . . . 183
5.1.1 Independent analog peripherals supply . . . . . 185
5.1.2 Independent I/O supply rail . . . . . 186
5.1.3 Independent USB transceivers supply . . . . . 186
5.1.4 Independent DSI supply . . . . . 186
5.1.5 Battery backup domain . . . . . 187
5.1.6 Voltage regulator . . . . . 188
5.1.7 VDD12 domain . . . . . 189
5.1.8 Dynamic voltage scaling management . . . . . 190
5.2 Power supply supervisor . . . . . 193
5.2.1 Power-on reset (POR) / power-down reset (PDR) / brown-out reset (BOR) . . . . . 193
5.2.2 Programmable voltage detector (PVD) . . . . . 194
| 5.2.3 | Peripheral Voltage Monitoring (PVM) ..... | 195 |
| 5.3 | Low-power modes ..... | 196 |
| 5.3.1 | Run mode ..... | 204 |
| 5.3.2 | Low-power run mode (LP run) ..... | 204 |
| 5.3.3 | Low-power modes ..... | 205 |
| 5.3.4 | Sleep mode ..... | 206 |
| 5.3.5 | Low-power sleep mode (LP sleep) ..... | 207 |
| 5.3.6 | Stop 0 mode ..... | 208 |
| 5.3.7 | Stop 1 mode ..... | 210 |
| 5.3.8 | Stop 2 mode ..... | 211 |
| 5.3.9 | Standby mode ..... | 213 |
| 5.3.10 | Shutdown mode ..... | 216 |
| 5.3.11 | Auto-wakeup from low-power mode ..... | 217 |
| 5.4 | PWR registers ..... | 218 |
| 5.4.1 | Power control register 1 (PWR_CR1) ..... | 218 |
| 5.4.2 | Power control register 2 (PWR_CR2) ..... | 219 |
| 5.4.3 | Power control register 3 (PWR_CR3) ..... | 220 |
| 5.4.4 | Power control register 4 (PWR_CR4) ..... | 222 |
| 5.4.5 | Power status register 1 (PWR_SR1) ..... | 223 |
| 5.4.6 | Power status register 2 (PWR_SR2) ..... | 224 |
| 5.4.7 | Power status clear register (PWR_SCR) ..... | 225 |
| 5.4.8 | Power Port A pull-up control register (PWR_PUCRA) ..... | 226 |
| 5.4.9 | Power Port A pull-down control register (PWR_PDCRA) ..... | 227 |
| 5.4.10 | Power Port B pull-up control register (PWR_PUCRB) ..... | 227 |
| 5.4.11 | Power Port B pull-down control register (PWR_PDCRB) ..... | 228 |
| 5.4.12 | Power Port C pull-up control register (PWR_PUCRC) ..... | 228 |
| 5.4.13 | Power Port C pull-down control register (PWR_PDCRC) ..... | 229 |
| 5.4.14 | Power Port D pull-up control register (PWR_PUCRD) ..... | 229 |
| 5.4.15 | Power Port D pull-down control register (PWR_PDCRD) ..... | 230 |
| 5.4.16 | Power Port E pull-up control register (PWR_PUCRE) ..... | 230 |
| 5.4.17 | Power Port E pull-down control register (PWR_PDCRE) ..... | 231 |
| 5.4.18 | Power Port F pull-up control register (PWR_PUCRF) ..... | 231 |
| 5.4.19 | Power Port F pull-down control register (PWR_PDCRF) ..... | 232 |
| 5.4.20 | Power Port G pull-up control register (PWR_PUCRG) ..... | 232 |
| 5.4.21 | Power Port G pull-down control register (PWR_PDCRG) ..... | 233 |
| 5.4.22 | Power Port H pull-up control register (PWR_PUCRH) ..... | 233 |
| 5.4.23 | Power Port H pull-down control register (PWR_PDCRH) ..... | 234 |
- 5.4.24 Power Port I pull-up control register (PWR_PUCRI) . . . . . 234
- 5.4.25 Power Port I pull-down control register (PWR_PDCRI) . . . . . 235
- 5.4.26 PWR control register (PWR_CR5) . . . . . 235
- 5.4.27 PWR register map and reset value table . . . . . 237
- 6 Reset and clock control (RCC) . . . . . 239
- 6.1 Reset . . . . . 239
- 6.1.1 Power reset . . . . . 239
- 6.1.2 System reset . . . . . 239
- 6.1.3 Backup domain reset . . . . . 240
- 6.2 Clocks . . . . . 241
- 6.2.1 HSE clock . . . . . 247
- 6.2.2 HSI16 clock . . . . . 248
- 6.2.3 MSI clock . . . . . 249
- 6.2.4 HSI48 clock . . . . . 249
- 6.2.5 PLL . . . . . 250
- 6.2.6 LSE clock . . . . . 251
- 6.2.7 LSI clock . . . . . 251
- 6.2.8 System clock (SYSCLK) selection . . . . . 252
- 6.2.9 Clock source frequency versus voltage scaling . . . . . 252
- 6.2.10 Clock security system (CSS) . . . . . 253
- 6.2.11 Clock security system on LSE . . . . . 253
- 6.2.12 ADC clock . . . . . 254
- 6.2.13 RTC clock . . . . . 254
- 6.2.14 Timer clock . . . . . 254
- 6.2.15 Watchdog clock . . . . . 254
- 6.2.16 Clock-out capability . . . . . 255
- 6.2.17 Internal/external clock measurement with TIM15/TIM16/TIM17 . . . . . 255
- 6.2.18 Peripheral clock enable register
(RCC_AHBxENR, RCC_APBxENRy) . . . . . 258
- 6.3 Low-power modes . . . . . 258
- 6.4 RCC registers . . . . . 259
- 6.4.1 Clock control register (RCC_CR) . . . . . 259
- 6.4.2 Internal clock sources calibration register (RCC_ICSCR) . . . . . 262
- 6.4.3 Clock configuration register (RCC_CFGR) . . . . . 262
- 6.4.4 PLL configuration register (RCC_PLLCFGR) . . . . . 265
- 6.4.5 PLLSAI1 configuration register (RCC_PLLSAI1CFGR) . . . . . 267
- 6.1 Reset . . . . . 239
| 6.4.6 | PLLSAI2 configuration register (RCC_PLLSAI2CFGR) . . . . . | 271 |
| 6.4.7 | Clock interrupt enable register (RCC_CIER) . . . . . | 273 |
| 6.4.8 | Clock interrupt flag register (RCC_CIFR) . . . . . | 275 |
| 6.4.9 | Clock interrupt clear register (RCC_CICR) . . . . . | 276 |
| 6.4.10 | AHB1 peripheral reset register (RCC_AHB1RSTR) . . . . . | 278 |
| 6.4.11 | AHB2 peripheral reset register (RCC_AHB2RSTR) . . . . . | 279 |
| 6.4.12 | AHB3 peripheral reset register (RCC_AHB3RSTR) . . . . . | 281 |
| 6.4.13 | APB1 peripheral reset register 1 (RCC_APB1RSTR1) . . . . . | 282 |
| 6.4.14 | APB1 peripheral reset register 2 (RCC_APB1RSTR2) . . . . . | 284 |
| 6.4.15 | APB2 peripheral reset register (RCC_APB2RSTR) . . . . . | 285 |
| 6.4.16 | AHB1 peripheral clock enable register (RCC_AHB1ENR) . . . . . | 287 |
| 6.4.17 | AHB2 peripheral clock enable register (RCC_AHB2ENR) . . . . . | 288 |
| 6.4.18 | AHB3 peripheral clock enable register(RCC_AHB3ENR) . . . . . | 290 |
| 6.4.19 | APB1 peripheral clock enable register 1 (RCC_APB1ENR1) . . . . . | 291 |
| 6.4.20 | APB1 peripheral clock enable register 2 (RCC_APB1ENR2) . . . . . | 293 |
| 6.4.21 | APB2 peripheral clock enable register (RCC_APB2ENR) . . . . . | 295 |
| 6.4.22 | AHB1 peripheral clocks enable in Sleep and Stop modes register (RCC_AHB1SMENR) . . . . . | 296 |
| 6.4.23 | AHB2 peripheral clocks enable in Sleep and Stop modes register (RCC_AHB2SMENR) . . . . . | 298 |
| 6.4.24 | AHB3 peripheral clocks enable in Sleep and Stop modes register (RCC_AHB3SMENR) . . . . . | 300 |
| 6.4.25 | APB1 peripheral clocks enable in Sleep and Stop modes register 1 (RCC_APB1SMENR1) . . . . . | 301 |
| 6.4.26 | APB1 peripheral clocks enable in Sleep and Stop modes register 2 (RCC_APB1SMENR2) . . . . . | 304 |
| 6.4.27 | APB2 peripheral clocks enable in Sleep and Stop modes register (RCC_APB2SMENR) . . . . . | 305 |
| 6.4.28 | Peripherals independent clock configuration register (RCC_CCIPR) . | 306 |
| 6.4.29 | Backup domain control register (RCC_BDCR) . . . . . | 309 |
| 6.4.30 | Control/status register (RCC_CSR) . . . . . | 311 |
| 6.4.31 | Clock recovery RC register (RCC_CRRRCR) . . . . . | 313 |
| 6.4.32 | Peripherals independent clock configuration register (RCC_CCIPR2) | 314 |
| 6.4.33 | OCTOSPI delay configuration register (RCC_DLYCFGR) . . . . . | 316 |
| 6.4.34 | RCC register map . . . . . | 317 |
| 7 | Clock recovery system (CRS) . . . . . | 322 |
| 7.1 | Introduction . . . . . | 322 |
| 7.2 | CRS main features . . . . . | 322 |
| 7.3 | CRS implementation . . . . . | 322 |
| 7.4 | CRS functional description . . . . . | 323 |
| 7.4.1 | CRS block diagram . . . . . | 323 |
| 7.4.2 | Synchronization input . . . . . | 323 |
| 7.4.3 | Frequency error measurement . . . . . | 324 |
| 7.4.4 | Frequency error evaluation and automatic trimming . . . . . | 325 |
| 7.4.5 | CRS initialization and configuration . . . . . | 325 |
| 7.5 | CRS low-power modes . . . . . | 326 |
| 7.6 | CRS interrupts . . . . . | 326 |
| 7.7 | CRS registers . . . . . | 327 |
| 7.7.1 | CRS control register (CRS_CR) . . . . . | 327 |
| 7.7.2 | CRS configuration register (CRS_CFGR) . . . . . | 328 |
| 7.7.3 | CRS interrupt and status register (CRS_ISR) . . . . . | 329 |
| 7.7.4 | CRS interrupt flag clear register (CRS_ICR) . . . . . | 331 |
| 7.7.5 | CRS register map . . . . . | 332 |
| 8 | General-purpose I/Os (GPIO) . . . . . | 333 |
| 8.1 | Introduction . . . . . | 333 |
| 8.2 | GPIO main features . . . . . | 333 |
| 8.3 | GPIO functional description . . . . . | 333 |
| 8.3.1 | General-purpose I/O (GPIO) . . . . . | 336 |
| 8.3.2 | I/O pin alternate function multiplexer and mapping . . . . . | 336 |
| 8.3.3 | I/O port control registers . . . . . | 337 |
| 8.3.4 | I/O port data registers . . . . . | 337 |
| 8.3.5 | I/O data bitwise handling . . . . . | 337 |
| 8.3.6 | GPIO locking mechanism . . . . . | 338 |
| 8.3.7 | I/O alternate function input/output . . . . . | 338 |
| 8.3.8 | External interrupt/wakeup lines . . . . . | 338 |
| 8.3.9 | Input configuration . . . . . | 339 |
| 8.3.10 | Output configuration . . . . . | 339 |
| 8.3.11 | Alternate function configuration . . . . . | 340 |
| 8.3.12 | Analog configuration . . . . . | 341 |
| 8.3.13 | Using the HSE or LSE oscillator pins as GPIOs . . . . . | 341 |
| 8.3.14 | Using the GPIO pins in the RTC supply domain . . . . . | 341 |
| 8.3.15 | Using PH3 as GPIO . . . . . | 342 |
| 8.4 | GPIO registers . . . . . | 342 |
| 8.4.1 | GPIO port mode register (GPIOx_MODER) (x = A to I) ..... | 342 |
| 8.4.2 | GPIO port output type register (GPIOx_OTYPER) (x = A to I) ..... | 343 |
| 8.4.3 | GPIO port output speed register (GPIOx_OSPEEDR) (x = A to I) ..... | 343 |
| 8.4.4 | GPIO port pull-up/pull-down register (GPIOx_PUPDR) (x = A to I) ..... | 344 |
| 8.4.5 | GPIO port input data register (GPIOx_IDR) (x = A to I) ..... | 344 |
| 8.4.6 | GPIO port output data register (GPIOx_ODR) (x = A to I) ..... | 345 |
| 8.4.7 | GPIO port bit set/reset register (GPIOx_BSRR) (x = A to I) ..... | 345 |
| 8.4.8 | GPIO port configuration lock register (GPIOx_LCKR) (x = A to I) ..... | 345 |
| 8.4.9 | GPIO alternate function low register (GPIOx_AFRL) (x = A to I) ..... | 347 |
| 8.4.10 | GPIO alternate function high register (GPIOx_AFRH) (x = A to I) ..... | 347 |
| 8.4.11 | GPIO port bit reset register (GPIOx_BRR) (x = A to I) ..... | 348 |
| 8.4.12 | GPIO register map ..... | 349 |
| 9 | System configuration controller (SYSCFG) ..... | 351 |
| 9.1 | SYSCFG main features ..... | 351 |
| 9.2 | SYSCFG registers ..... | 351 |
| 9.2.1 | SYSCFG memory remap register (SYSCFG_MEMRMP) ..... | 351 |
| 9.2.2 | SYSCFG configuration register 1 (SYSCFG_CFGR1) ..... | 352 |
| 9.2.3 | SYSCFG external interrupt configuration register 1 (SYSCFG_EXTICR1) ..... | 354 |
| 9.2.4 | SYSCFG external interrupt configuration register 2 (SYSCFG_EXTICR2) ..... | 356 |
| 9.2.5 | SYSCFG external interrupt configuration register 3 (SYSCFG_EXTICR3) ..... | 357 |
| 9.2.6 | SYSCFG external interrupt configuration register 4 (SYSCFG_EXTICR4) ..... | 359 |
| 9.2.7 | SYSCFG SRAM2 control and status register (SYSCFG_SCSR) ..... | 360 |
| 9.2.8 | SYSCFG configuration register 2 (SYSCFG_CFGR2) ..... | 361 |
| 9.2.9 | SYSCFG SRAM2 write protection register (SYSCFG_SWPR) ..... | 362 |
| 9.2.10 | SYSCFG SRAM2 key register (SYSCFG_SKR) ..... | 362 |
| 9.2.11 | SYSCFG SRAM2 write protection register 2 (SYSCFG_SWPR2) ..... | 363 |
9.2.12 SYSCFG register map . . . . . 364
10 Peripherals interconnect matrix . . . . . 366
10.1 Introduction . . . . . 366
10.2 Connection summary . . . . . 366
10.3 Interconnection details . . . . . 367
10.3.1 From timer (TIM1/TIM2/TIM3/TIM4/TIM5/TIM8/TIM15/TIM16/TIM17) to timer (TIM1/TIM2/TIM3/TIM4/TIM5/TIM8/TIM15) . . . . . 367
10.3.2 From timer (TIM1/TIM2/TIM3/TIM4/TIM6/TIM8/TIM15) and EXTI to ADC (ADC1) . . . . . 368
10.3.3 From ADC to timer (TIM1/TIM8) . . . . . 369
10.3.4 From timer (TIM2/TIM4/TIM5/TIM6/TIM7/TIM8/LPTIM1/LPTIM2) and EXTI to DAC (internal channel 1 and channel 2) . . . . . 369
10.3.5 From timer (TIM1/TIM3/TIM4/TIM6/TIM7/TIM8/TIM16/LPTIM1/LPTIM2) and EXTI to DFSDM1 . . . . . 369
10.3.6 From DFSDM1 to timer (TIM1/TIM8/TIM15/TIM16/TIM17) . . . . . 370
10.3.7 From HSE, LSE, LSI, MSI, MCO, RTC to timer (TIM2/TIM15/TIM16/TIM17) . . . . . 370
10.3.8 From RTC, COMP1, COMP2 to low-power timer (LPTIM1/LPTIM2) . . . . . 371
10.3.9 From timer (TIM1/TIM2/TIM3/TIM8/TIM15) to comparators (COMP1/COMP2) . . . . . 371
10.3.10 From ADC (ADC1) to ADC (ADC2) . . . . . 371
10.3.11 From USB to timer (TIM2) . . . . . 372
10.3.12 From internal analog source to ADC and OPAMP (OPAMP1/OPAMP2) . . . . . 372
10.3.13 From comparators (COMP1/COMP2) to timers (TIM1/TIM2/TIM3/TIM8/TIM15/TIM16/TIM17) . . . . . 373
10.3.14 From system errors to timers (TIM1/TIM8/TIM15/TIM16/TIM17) . . . . . 373
10.3.15 From timers (TIM16/TIM17) to IRTIM . . . . . 374
10.3.16 From ADC (ADC1/ADC2) to DFSDM . . . . . 374
11 Direct memory access controller (DMA) . . . . . 375
11.1 Introduction . . . . . 375
11.2 DMA main features . . . . . 375
11.3 DMA implementation . . . . . 376
11.3.1 DMA1 and DMA2 . . . . . 376
11.3.2 DMA request mapping . . . . . 376
11.4 DMA functional description . . . . . 376
11.4.1 DMA block diagram . . . . . 376
| 11.4.2 | DMA pins and internal signals . . . . . | 378 |
| 11.4.3 | DMA transfers . . . . . | 378 |
| 11.4.4 | DMA arbitration . . . . . | 379 |
| 11.4.5 | DMA channels . . . . . | 379 |
| 11.4.6 | DMA data width, alignment and endianness . . . . . | 383 |
| 11.4.7 | DMA error management . . . . . | 384 |
| 11.5 | DMA interrupts . . . . . | 385 |
| 11.6 | DMA registers . . . . . | 385 |
| 11.6.1 | DMA interrupt status register (DMA_ISR) . . . . . | 385 |
| 11.6.2 | DMA interrupt flag clear register (DMA_IFCR) . . . . . | 388 |
| 11.6.3 | DMA channel x configuration register (DMA_CCRx) . . . . . | 389 |
| 11.6.4 | DMA channel x number of data to transfer register (DMA_CNDTRx) . . . . . | 392 |
| 11.6.5 | DMA channel x peripheral address register (DMA_CPARx) . . . . . | 392 |
| 11.6.6 | DMA channel x memory address register (DMA_CMARx) . . . . . | 393 |
| 11.6.7 | DMA register map . . . . . | 393 |
| 12 | DMA request multiplexer (DMAMUX) . . . . . | 396 |
| 12.1 | Introduction . . . . . | 396 |
| 12.2 | DMAMUX main features . . . . . | 397 |
| 12.3 | DMAMUX implementation . . . . . | 397 |
| 12.3.1 | DMAMUX instantiation . . . . . | 397 |
| 12.3.2 | DMAMUX mapping . . . . . | 397 |
| 12.4 | DMAMUX functional description . . . . . | 403 |
| 12.4.1 | DMAMUX block diagram . . . . . | 403 |
| 12.4.2 | DMAMUX signals . . . . . | 404 |
| 12.4.3 | DMAMUX channels . . . . . | 404 |
| 12.4.4 | DMAMUX request line multiplexer . . . . . | 404 |
| 12.4.5 | DMAMUX request generator . . . . . | 407 |
| 12.5 | DMAMUX interrupts . . . . . | 408 |
| 12.6 | DMAMUX registers . . . . . | 409 |
| 12.6.1 | DMAMUX request line multiplexer channel x configuration register (DMAMUX_CxCR) . . . . . | 409 |
| 12.6.2 | DMAMUX request line multiplexer interrupt channel status register (DMAMUX_CSR) . . . . . | 410 |
| 12.6.3 | DMAMUX request line multiplexer interrupt clear flag register (DMAMUX_CFR) . . . . . | 410 |
- 12.6.4 DMAMUX request generator channel x configuration register (DMAMUX_RGxCR) . . . . . 411
- 12.6.5 DMAMUX request generator interrupt status register (DMAMUX_RGSR) . . . . . 412
- 12.6.6 DMAMUX request generator interrupt clear flag register (DMAMUX_RGCFR) . . . . . 412
- 12.6.7 DMAMUX register map . . . . . 413
- 13 Chrom-ART Accelerator controller (DMA2D) . . . . . 415
- 13.1 DMA2D introduction . . . . . 415
- 13.2 DMA2D main features . . . . . 415
- 13.3 DMA2D functional description . . . . . 416
- 13.3.1 DMA2D block diagram . . . . . 416
- 13.3.2 DMA2D control . . . . . 417
- 13.3.3 DMA2D foreground and background FIFOs . . . . . 417
- 13.3.4 DMA2D foreground and background pixel format converter (PFC) . . . . . 418
- 13.3.5 DMA2D foreground and background CLUT interface . . . . . 420
- 13.3.6 DMA2D blender . . . . . 421
- 13.3.7 DMA2D output PFC . . . . . 422
- 13.3.8 DMA2D output FIFO . . . . . 422
- 13.3.9 DMA2D output FIFO byte reordering . . . . . 423
- 13.3.10 DMA2D AHB master port timer . . . . . 424
- 13.3.11 DMA2D transactions . . . . . 425
- 13.3.12 DMA2D configuration . . . . . 425
- 13.3.13 DMA2D transfer control (start, suspend, abort and completion) . . . . . 429
- 13.3.14 Watermark . . . . . 429
- 13.3.15 Error management . . . . . 429
- 13.3.16 AHB dead time . . . . . 429
- 13.4 DMA2D interrupts . . . . . 430
- 13.5 DMA2D registers . . . . . 431
- 13.5.1 DMA2D control register (DMA2D_CR) . . . . . 431
- 13.5.2 DMA2D interrupt status register (DMA2D_ISR) . . . . . 433
- 13.5.3 DMA2D interrupt flag clear register (DMA2D_IFCR) . . . . . 434
- 13.5.4 DMA2D foreground memory address register (DMA2D_FGMAR) . . . . . 434
- 13.5.5 DMA2D foreground offset register (DMA2D_FGOR) . . . . . 435
- 13.5.6 DMA2D background memory address register (DMA2D_BGMAR) . . . . . 435
- 13.5.7 DMA2D background offset register (DMA2D_BGOR) . . . . . 436
| 13.5.8 | DMA2D foreground PFC control register (DMA2D_FGPFCCR) . . . . . | 437 |
| 13.5.9 | DMA2D foreground color register (DMA2D_FGCOLR) . . . . . | 439 |
| 13.5.10 | DMA2D background PFC control register (DMA2D_BGPFCCR) . . . . . | 440 |
| 13.5.11 | DMA2D background color register (DMA2D_BGCOLR) . . . . . | 442 |
| 13.5.12 | DMA2D foreground CLUT memory address register (DMA2D_FGCMAR) . . . . . | 442 |
| 13.5.13 | DMA2D background CLUT memory address register (DMA2D_BGCMAR) . . . . . | 443 |
| 13.5.14 | DMA2D output PFC control register (DMA2D_OPFCCR) . . . . . | 443 |
| 13.5.15 | DMA2D output color register (DMA2D_OCOLR) . . . . . | 444 |
| 13.5.16 | DMA2D output memory address register (DMA2D_OMAR) . . . . . | 446 |
| 13.5.17 | DMA2D output offset register (DMA2D_OOR) . . . . . | 446 |
| 13.5.18 | DMA2D number of line register (DMA2D_NLR) . . . . . | 447 |
| 13.5.19 | DMA2D line watermark register (DMA2D_LWR) . . . . . | 447 |
| 13.5.20 | DMA2D AHB master timer configuration register (DMA2D_AMTCR) . . . . . | 448 |
| 13.5.21 | DMA2D foreground CLUT (DMA2D_FGCLUT[y]) . . . . . | 448 |
| 13.5.22 | DMA2D background CLUT (DMA2D_BGCLUT[y]) . . . . . | 449 |
| 13.5.23 | DMA2D register map . . . . . | 450 |
| 14 | Chrom-GRC (GFXMMU) . . . . . | 452 |
| 14.1 | Introduction . . . . . | 452 |
| 14.2 | GFXMMU main features . . . . . | 452 |
| 14.3 | GFXMMU functional and architectural description . . . . . | 453 |
| 14.3.1 | Virtual memory . . . . . | 453 |
| 14.3.2 | MMU architecture . . . . . | 455 |
| 14.4 | GFXMMU interrupts . . . . . | 459 |
| 14.5 | GFXMMU registers . . . . . | 460 |
| 14.5.1 | GFXMMU configuration register (GFXMMU_CR) . . . . . | 460 |
| 14.5.2 | GFXMMU status register (GFXMMU_SR) . . . . . | 461 |
| 14.5.3 | GFXMMU flag clear register (GFXMMU_FCR) . . . . . | 461 |
| 14.5.4 | GFXMMU default value register (GFXMMU_DVR) . . . . . | 462 |
| 14.5.5 | GFXMMU buffer 0 configuration register (GFXMMU_B0CR) . . . . . | 462 |
| 14.5.6 | GFXMMU buffer 1 configuration register (GFXMMU_B1CR) . . . . . | 463 |
| 14.5.7 | GFXMMU buffer 2 configuration register (GFXMMU_B2CR) . . . . . | 463 |
| 14.5.8 | GFXMMU buffer 3 configuration register (GFXMMU_B3CR) . . . . . | 464 |
| 14.5.9 | GFXMMU LUT entry x low (GFXMMU_LUTxL) . . . . . | 464 |
| 14.5.10 | GFXMMU LUT entry x high (GFXMMU_LUTxH) . . . . . | 464 |
| 14.5.11 | GFXMMU register map ..... | 466 |
| 15 | Nested vectored interrupt controller (NVIC) ..... | 467 |
| 15.1 | NVIC main features ..... | 467 |
| 15.2 | SysTick calibration value register ..... | 467 |
| 15.3 | Interrupt and exception vectors ..... | 468 |
| 16 | Extended interrupts and events controller (EXTI) ..... | 476 |
| 16.1 | Introduction ..... | 476 |
| 16.2 | EXTI main features ..... | 476 |
| 16.3 | EXTI functional description ..... | 476 |
| 16.3.1 | EXTI block diagram ..... | 477 |
| 16.3.2 | Wakeup event management ..... | 477 |
| 16.3.3 | Peripherals asynchronous Interrupts ..... | 478 |
| 16.3.4 | Hardware interrupt selection ..... | 478 |
| 16.3.5 | Hardware event selection ..... | 478 |
| 16.3.6 | Software interrupt/event selection ..... | 478 |
| 16.4 | EXTI interrupt/event line mapping ..... | 478 |
| 16.5 | EXTI registers ..... | 481 |
| 16.5.1 | Interrupt mask register 1 (EXTI_IMR1) ..... | 481 |
| 16.5.2 | Event mask register 1 (EXTI_EM1) ..... | 481 |
| 16.5.3 | Rising trigger selection register 1 (EXTI_RTSR1) ..... | 481 |
| 16.5.4 | Falling trigger selection register 1 (EXTI_FTSR1) ..... | 482 |
| 16.5.5 | Software interrupt event register 1 (EXTI_SWIER1) ..... | 483 |
| 16.5.6 | Pending register 1 (EXTI_PR1) ..... | 484 |
| 16.5.7 | Interrupt mask register 2 (EXTI_IMR2) ..... | 484 |
| 16.5.8 | Event mask register 2 (EXTI_EM2) ..... | 485 |
| 16.5.9 | Rising trigger selection register 2 (EXTI_RTSR2) ..... | 485 |
| 16.5.10 | Falling trigger selection register 2 (EXTI_FTSR2) ..... | 486 |
| 16.5.11 | Software interrupt event register 2 (EXTI_SWIER2) ..... | 486 |
| 16.5.12 | Pending register 2 (EXTI_PR2) ..... | 487 |
| 16.5.13 | EXTI register map ..... | 488 |
| 17 | Cyclic redundancy check calculation unit (CRC) ..... | 489 |
| 17.1 | Introduction ..... | 489 |
| 17.2 | CRC main features ..... | 489 |
| 17.3 | CRC functional description . . . . . | 490 |
| 17.3.1 | CRC block diagram . . . . . | 490 |
| 17.3.2 | CRC internal signals . . . . . | 490 |
| 17.3.3 | CRC operation . . . . . | 490 |
| 17.4 | CRC registers . . . . . | 492 |
| 17.4.1 | CRC data register (CRC_DR) . . . . . | 492 |
| 17.4.2 | CRC independent data register (CRC_IDR) . . . . . | 492 |
| 17.4.3 | CRC control register (CRC_CR) . . . . . | 493 |
| 17.4.4 | CRC initial value (CRC_INIT) . . . . . | 494 |
| 17.4.5 | CRC polynomial (CRC_POL) . . . . . | 494 |
| 17.4.6 | CRC register map . . . . . | 495 |
| 18 | Flexible static memory controller (FSMC) . . . . . | 496 |
| 18.1 | Introduction . . . . . | 496 |
| 18.2 | FMC main features . . . . . | 496 |
| 18.3 | FMC implementation . . . . . | 497 |
| 18.4 | FMC block diagram . . . . . | 497 |
| 18.5 | AHB interface . . . . . | 498 |
| 18.5.1 | Supported memories and transactions . . . . . | 498 |
| 18.6 | External device address mapping . . . . . | 499 |
| 18.6.1 | NOR/PSRAM address mapping . . . . . | 500 |
| 18.6.2 | NAND Flash memory address mapping . . . . . | 501 |
| 18.7 | NOR Flash/PSRAM controller . . . . . | 502 |
| 18.7.1 | External memory interface signals . . . . . | 503 |
| 18.7.2 | Supported memories and transactions . . . . . | 505 |
| 18.7.3 | General timing rules . . . . . | 506 |
| 18.7.4 | NOR Flash/PSRAM controller asynchronous transactions . . . . . | 507 |
| 18.7.5 | Synchronous transactions . . . . . | 525 |
| 18.7.6 | NOR/PSRAM controller registers . . . . . | 532 |
| 18.8 | NAND Flash controller . . . . . | 540 |
| 18.8.1 | External memory interface signals . . . . . | 541 |
| 18.8.2 | NAND Flash supported memories and transactions . . . . . | 543 |
| 18.8.3 | Timing diagrams for NAND Flash memory . . . . . | 543 |
| 18.8.4 | NAND Flash operations . . . . . | 544 |
| 18.8.5 | NAND Flash prewait functionality . . . . . | 545 |
- 18.8.6 Computation of the error correction code (ECC) in NAND Flash memory . . . . . 546
- 18.8.7 NAND Flash controller registers . . . . . 547
- 18.8.8 FMC register map . . . . . 553
- 19 Octo-SPI interface (OCTOSPI) . . . . . 555
- 19.1 Introduction . . . . . 555
- 19.2 OCTOSPI main features . . . . . 555
- 19.3 OCTOSPI implementation . . . . . 556
- 19.4 OCTOSPI functional description . . . . . 557
- 19.4.1 OCTOSPI block diagram . . . . . 557
- 19.4.2 OCTOSPI interface to memory modes . . . . . 558
- 19.4.3 OCTOSPI Regular-command protocol . . . . . 558
- 19.4.4 OCTOSPI Regular-command protocol signal interface . . . . . 562
- 19.4.5 HyperBus protocol . . . . . 565
- 19.4.6 Specific features . . . . . 569
- 19.4.7 OCTOSPI operating modes introduction . . . . . 570
- 19.4.8 OCTOSPI Indirect mode . . . . . 571
- 19.4.9 OCTOSPI Automatic status-polling mode . . . . . 572
- 19.4.10 OCTOSPI Memory-mapped mode . . . . . 573
- 19.4.11 OCTOSPI configuration introduction . . . . . 574
- 19.4.12 OCTOSPI system configuration . . . . . 574
- 19.4.13 OCTOSPI device configuration . . . . . 574
- 19.4.14 OCTOSPI Regular-command mode configuration . . . . . 575
- 19.4.15 OCTOSPI HyperBus protocol configuration . . . . . 578
- 19.4.16 OCTOSPI error management . . . . . 579
- 19.4.17 OCTOSPI BUSY and ABORT . . . . . 579
- 19.4.18 OCTOSPI reconfiguration or deactivation . . . . . 580
- 19.4.19 NCS behavior . . . . . 580
- 19.5 Address alignment and data number . . . . . 582
- 19.6 OCTOSPI interrupts . . . . . 583
- 19.7 OCTOSPI registers . . . . . 583
- 19.7.1 OCTOSPI control register (OCTOSPI_CR) . . . . . 583
- 19.7.2 OCTOSPI device configuration register 1 (OCTOSPI_DCR1) . . . . . 586
- 19.7.3 OCTOSPI device configuration register 2 (OCTOSPI_DCR2) . . . . . 587
- 19.7.4 OCTOSPI device configuration register 3 (OCTOSPI_DCR3) . . . . . 588
- 19.7.5 OCTOSPI device configuration register 4 (OCTOSPI_DCR4) . . . . . 589
| 19.7.6 | OCTOSPI status register (OCTOSPI_SR) . . . . . | 590 |
| 19.7.7 | OCTOSPI flag clear register (OCTOSPI_FCR) . . . . . | 591 |
| 19.7.8 | OCTOSPI data length register (OCTOSPI_DLR) . . . . . | 591 |
| 19.7.9 | OCTOSPI address register (OCTOSPI_AR) . . . . . | 592 |
| 19.7.10 | OCTOSPI data register (OCTOSPI_DR) . . . . . | 593 |
| 19.7.11 | OCTOSPI polling status mask register (OCTOSPI_PSMKR) . . . . . | 593 |
| 19.7.12 | OCTOSPI polling status match register (OCTOSPI_PSMAR) . . . . . | 594 |
| 19.7.13 | OCTOSPI polling interval register (OCTOSPI_PIR) . . . . . | 594 |
| 19.7.14 | OCTOSPI communication configuration register (OCTOSPI_CCR) . . . . . | 595 |
| 19.7.15 | OCTOSPI timing configuration register (OCTOSPI_TCR) . . . . . | 597 |
| 19.7.16 | OCTOSPI instruction register (OCTOSPI_IR) . . . . . | 598 |
| 19.7.17 | OCTOSPI alternate bytes register (OCTOSPI_ABR) . . . . . | 598 |
| 19.7.18 | OCTOSPI low-power timeout register (OCTOSPI_LPTR) . . . . . | 599 |
| 19.7.19 | OCTOSPI wrap communication configuration register (OCTOSPI_WPCCR) . . . . . | 599 |
| 19.7.20 | OCTOSPI wrap timing configuration register (OCTOSPI_WPTCR) . . . . . | 601 |
| 19.7.21 | OCTOSPI wrap instruction register (OCTOSPI_WPIR) . . . . . | 602 |
| 19.7.22 | OCTOSPI wrap alternate bytes register (OCTOSPI_WPABR) . . . . . | 602 |
| 19.7.23 | OCTOSPI write communication configuration register (OCTOSPI_WCCR) . . . . . | 603 |
| 19.7.24 | OCTOSPI write timing configuration register (OCTOSPI_WTCR) . . . . . | 605 |
| 19.7.25 | OCTOSPI write instruction register (OCTOSPI_WIR) . . . . . | 605 |
| 19.7.26 | OCTOSPI write alternate bytes register (OCTOSPI_WABR) . . . . . | 606 |
| 19.7.27 | OCTOSPI HyperBus latency configuration register (OCTOSPI_HLCR) . . . . . | 606 |
| 19.7.28 | OCTOSPI register map . . . . . | 607 |
| 20 | OCTOSPI I/O manager (OCTOSPIM) . . . . . | 610 |
| 20.1 | Introduction . . . . . | 610 |
| 20.2 | OCTOSPIM main features . . . . . | 610 |
| 20.3 | OCTOSPIM implementation . . . . . | 610 |
| 20.4 | OCTOSPIM functional description . . . . . | 610 |
| 20.4.1 | OCTOSPIM block diagram . . . . . | 610 |
| 20.4.2 | OCTOSPIM matrix . . . . . | 612 |
| 20.4.3 | OCTOSPIM multiplexed mode . . . . . | 612 |
| 20.5 | OCTOSPIM registers . . . . . | 614 |
| 20.5.1 | OCTOSPIM control register (OCTOSPIM_CR) . . . . . | 614 |
| 20.5.2 | OCTOSPIM Port n configuration register (OCTOSPIM_PnCR) . . . . . | 614 |
| 20.5.3 | OCTOSPIM register map . . . . . | 616 |
| 21 | Analog-to-digital converters (ADC) . . . . . | 617 |
| 21.1 | Introduction . . . . . | 617 |
| 21.2 | ADC main features . . . . . | 618 |
| 21.3 | ADC implementation . . . . . | 619 |
| 21.4 | ADC functional description . . . . . | 620 |
| 21.4.1 | ADC block diagram . . . . . | 620 |
| 21.4.2 | ADC pins and internal signals . . . . . | 621 |
| 21.4.3 | ADC clocks . . . . . | 622 |
| 21.4.4 | ADC1/2 connectivity . . . . . | 624 |
| 21.4.5 | Slave AHB interface . . . . . | 626 |
| 21.4.6 | ADC Deep-power-down mode (DEEPPWD) and ADC voltage regulator (ADVREGEN) . . . . . | 626 |
| 21.4.7 | Single-ended and differential input channels . . . . . | 626 |
| 21.4.8 | Calibration (ADCAL, ADCALDIF, ADC_CALFACT) . . . . . | 627 |
| 21.4.9 | ADC on-off control (ADEN, ADDIS, ADRDY) . . . . . | 630 |
| 21.4.10 | Constraints when writing the ADC control bits . . . . . | 631 |
| 21.4.11 | Channel selection (SQRx, JSQRx) . . . . . | 632 |
| 21.4.12 | Channel-wise programmable sampling time (SMPR1, SMPR2) . . . . . | 633 |
| 21.4.13 | Single conversion mode (CONT=0) . . . . . | 634 |
| 21.4.14 | Continuous conversion mode (CONT=1) . . . . . | 634 |
| 21.4.15 | Starting conversions (ADSTART, JADSTART) . . . . . | 635 |
| 21.4.16 | ADC timing . . . . . | 636 |
| 21.4.17 | Stopping an ongoing conversion (ADSTP, JADSTP) . . . . . | 636 |
| 21.4.18 | Conversion on external trigger and trigger polarity (EXTSEL, EXTEN, JEXTSEL, JEXTEN) . . . . . | 638 |
| 21.4.19 | Injected channel management . . . . . | 640 |
| 21.4.20 | Discontinuous mode (DISCEN, DISCNUM, JDISCEN) . . . . . | 642 |
| 21.4.21 | Queue of context for injected conversions . . . . . | 643 |
| 21.4.22 | Programmable resolution (RES) - Fast conversion mode . . . . . | 651 |
| 21.4.23 | End of conversion, end of sampling phase (EOC, JEOC, EOSMP) . . . . . | 652 |
| 21.4.24 | End of conversion sequence (EOS, JEOS) . . . . . | 652 |
| 21.4.25 | Timing diagrams example (single/continuous modes, hardware/software triggers) . . . . . | 653 |
| 21.4.26 | Data management . . . . . | 655 |
| 21.4.27 | Managing conversions using the DFSDM . . . . . | 660 |
| 21.4.28 | Dynamic low-power features . . . . . | 661 |
| 21.4.29 | Analog window watchdog (AWD1EN, JAWD1EN, AWD1SGL, AWD1CH, AWD2CH, AWD3CH, AWD_HTx, AWD_LTx, AWDx) . . . . . | 666 |
| 21.4.30 | Oversampler . . . . . | 670 |
| 21.4.31 | Dual ADC modes . . . . . | 676 |
| 21.4.32 | Temperature sensor . . . . . | 689 |
| 21.4.33 | VBAT supply monitoring . . . . . | 691 |
| 21.4.34 | Monitoring the internal voltage reference . . . . . | 692 |
| 21.5 | ADC interrupts . . . . . | 693 |
| 21.6 | ADC registers (for each ADC) . . . . . | 695 |
| 21.6.1 | ADC interrupt and status register (ADC_ISR) . . . . . | 695 |
| 21.6.2 | ADC interrupt enable register (ADC_IER) . . . . . | 697 |
| 21.6.3 | ADC control register (ADC_CR) . . . . . | 699 |
| 21.6.4 | ADC configuration register (ADC_CFGR) . . . . . | 702 |
| 21.6.5 | ADC configuration register 2 (ADC_CFGR2) . . . . . | 706 |
| 21.6.6 | ADC sample time register 1 (ADC_SMPR1) . . . . . | 708 |
| 21.6.7 | ADC sample time register 2 (ADC_SMPR2) . . . . . | 709 |
| 21.6.8 | ADC watchdog threshold register 1 (ADC_TR1) . . . . . | 710 |
| 21.6.9 | ADC watchdog threshold register 2 (ADC_TR2) . . . . . | 711 |
| 21.6.10 | ADC watchdog threshold register 3 (ADC_TR3) . . . . . | 711 |
| 21.6.11 | ADC regular sequence register 1 (ADC_SQR1) . . . . . | 712 |
| 21.6.12 | ADC regular sequence register 2 (ADC_SQR2) . . . . . | 713 |
| 21.6.13 | ADC regular sequence register 3 (ADC_SQR3) . . . . . | 714 |
| 21.6.14 | ADC regular sequence register 4 (ADC_SQR4) . . . . . | 715 |
| 21.6.15 | ADC regular data register (ADC_DR) . . . . . | 716 |
| 21.6.16 | ADC injected sequence register (ADC_JSQR) . . . . . | 716 |
| 21.6.17 | ADC offset y register (ADC_OFRy) . . . . . | 718 |
| 21.6.18 | ADC injected channel y data register (ADC_JDRy) . . . . . | 719 |
| 21.6.19 | ADC analog watchdog 2 configuration register (ADC_AWD2CR) . . . . . | 719 |
| 21.6.20 | ADC analog watchdog 3 configuration register (ADC_AWD3CR) . . . . . | 720 |
| 21.6.21 | ADC differential mode selection register (ADC_DIFSEL) . . . . . | 720 |
| 21.6.22 | ADC calibration factors (ADC_CALFACT) . . . . . | 721 |
| 21.7 | ADC common registers . . . . . | 721 |
| 21.7.1 | ADC common status register (ADC_CSR) . . . . . | 721 |
| 21.7.2 | ADC common control register (ADC_CCR) . . . . . | 723 |
| 21.7.3 | ADC common regular data register for dual mode (ADC_CDR) . . . . . | 726 |
- 21.8 ADC register map . . . . . 726
- 22 Digital-to-analog converter (DAC) . . . . . 730
- 22.1 Introduction . . . . . 730
- 22.2 DAC main features . . . . . 730
- 22.3 DAC implementation . . . . . 731
- 22.4 DAC functional description . . . . . 732
- 22.4.1 DAC block diagram . . . . . 732
- 22.4.2 DAC channel enable . . . . . 733
- 22.4.3 DAC data format . . . . . 733
- 22.4.4 DAC conversion . . . . . 735
- 22.4.5 DAC output voltage . . . . . 735
- 22.4.6 DAC trigger selection . . . . . 736
- 22.4.7 DMA requests . . . . . 737
- 22.4.8 Noise generation . . . . . 737
- 22.4.9 Triangle-wave generation . . . . . 739
- 22.4.10 DAC channel modes . . . . . 740
- 22.4.11 DAC channel buffer calibration . . . . . 743
- 22.4.12 Dual DAC channel conversion modes (if dual channels are available) . . . . . 744
- 22.5 DAC in low-power modes . . . . . 748
- 22.6 DAC interrupts . . . . . 749
- 22.7 DAC registers . . . . . 750
- 22.7.1 DAC control register (DAC_CR) . . . . . 750
- 22.7.2 DAC software trigger register (DAC_SWTRGR) . . . . . 753
- 22.7.3 DAC channel1 12-bit right-aligned data holding register (DAC_DHR12R1) . . . . . 754
- 22.7.4 DAC channel1 12-bit left aligned data holding register (DAC_DHR12L1) . . . . . 754
- 22.7.5 DAC channel1 8-bit right aligned data holding register (DAC_DHR8R1) . . . . . 755
- 22.7.6 DAC channel2 12-bit right aligned data holding register (DAC_DHR12R2) . . . . . 755
- 22.7.7 DAC channel2 12-bit left aligned data holding register (DAC_DHR12L2) . . . . . 756
- 22.7.8 DAC channel2 8-bit right-aligned data holding register (DAC_DHR8R2) . . . . . 756
- 22.7.9 Dual DAC 12-bit right-aligned data holding register (DAC_DHR12RD) . . . . . 757
| 22.7.10 | Dual DAC 12-bit left aligned data holding register (DAC_DHR12LD) . . . . . | 757 |
| 22.7.11 | Dual DAC 8-bit right aligned data holding register (DAC_DHR8RD) . . . . . | 758 |
| 22.7.12 | DAC channel1 data output register (DAC_DOR1) . . . . . | 758 |
| 22.7.13 | DAC channel2 data output register (DAC_DOR2) . . . . . | 759 |
| 22.7.14 | DAC status register (DAC_SR) . . . . . | 759 |
| 22.7.15 | DAC calibration control register (DAC_CCR) . . . . . | 761 |
| 22.7.16 | DAC mode control register (DAC_MCR) . . . . . | 761 |
| 22.7.17 | DAC channel1 sample and hold sample time register (DAC_SHSR1) . . . . . | 763 |
| 22.7.18 | DAC channel2 sample and hold sample time register (DAC_SHSR2) . . . . . | 763 |
| 22.7.19 | DAC sample and hold time register (DAC_SHHR) . . . . . | 764 |
| 22.7.20 | DAC sample and hold refresh time register (DAC_SHRR) . . . . . | 764 |
| 22.7.21 | DAC register map . . . . . | 766 |
| 23 | Voltage reference buffer (VREFBUF) . . . . . | 768 |
| 23.1 | Introduction . . . . . | 768 |
| 23.2 | VREFBUF functional description . . . . . | 768 |
| 23.3 | VREFBUF registers . . . . . | 769 |
| 23.3.1 | VREFBUF control and status register (VREFBUF_CSR) . . . . . | 769 |
| 23.3.2 | VREFBUF calibration control register (VREFBUF_CCR) . . . . . | 770 |
| 23.3.3 | VREFBUF register map . . . . . | 770 |
| 24 | Digital camera interface (DCMI) . . . . . | 771 |
| 24.1 | Introduction . . . . . | 771 |
| 24.2 | DCMI main features . . . . . | 771 |
| 24.3 | DCMI functional description . . . . . | 771 |
| 24.3.1 | DCMI block diagram . . . . . | 772 |
| 24.3.2 | DCMI pins . . . . . | 772 |
| 24.3.3 | DCMI clocks . . . . . | 772 |
| 24.3.4 | DCMI DMA interface . . . . . | 773 |
| 24.3.5 | DCMI physical interface . . . . . | 773 |
| 24.3.6 | DCMI synchronization . . . . . | 775 |
| 24.3.7 | DCMI capture modes . . . . . | 777 |
| 24.3.8 | DCMI crop feature . . . . . | 778 |
| 24.3.9 | DCMI JPEG format . . . . . | 779 |
| 24.3.10 | DCMI FIFO ..... | 779 |
| 24.3.11 | DCMI data format description ..... | 780 |
| 24.4 | DCMI interrupts ..... | 782 |
| 24.5 | DCMI registers ..... | 783 |
| 24.5.1 | DCMI control register (DCMI_CR) ..... | 783 |
| 24.5.2 | DCMI status register (DCMI_SR) ..... | 785 |
| 24.5.3 | DCMI raw interrupt status register (DCMI_RIS) ..... | 786 |
| 24.5.4 | DCMI interrupt enable register (DCMI_IER) ..... | 787 |
| 24.5.5 | DCMI masked interrupt status register (DCMI_MIS) ..... | 788 |
| 24.5.6 | DCMI interrupt clear register (DCMI_ICR) ..... | 789 |
| 24.5.7 | DCMI embedded synchronization code register (DCMI_ESCR) ..... | 789 |
| 24.5.8 | DCMI embedded synchronization unmask register (DCMI_ESUR) .. | 791 |
| 24.5.9 | DCMI crop window start (DCMI_CWSTRT) ..... | 791 |
| 24.5.10 | DCMI crop window size (DCMI_CWSIZE) ..... | 792 |
| 24.5.11 | DCMI data register (DCMI_DR) ..... | 792 |
| 24.5.12 | DCMI register map ..... | 794 |
| 25 | Parallel synchronous slave interface (PSSI) applied to STM32L4P5xx and STM32LQ5xx only ..... | 795 |
| 25.1 | Introduction ..... | 795 |
| 25.2 | PSSI main features ..... | 795 |
| 25.3 | PSSI functional description ..... | 795 |
| 25.3.1 | PSSI block diagram ..... | 796 |
| 25.3.2 | PSSI pins and internal signals ..... | 796 |
| 25.3.3 | PSSI clock ..... | 797 |
| 25.3.4 | PSSI data management ..... | 797 |
| 25.3.5 | PSSI optional control signals ..... | 799 |
| 25.4 | PSSI interrupts ..... | 802 |
| 25.5 | PSSI registers ..... | 803 |
| 25.5.1 | PSSI control register (PSSI_CR) ..... | 803 |
| 25.5.2 | PSSI status register (PSSI_SR) ..... | 805 |
| 25.5.3 | PSSI raw interrupt status register (PSSI_RIS) ..... | 805 |
| 25.5.4 | PSSI interrupt enable register (PSSI_IER) ..... | 806 |
| 25.5.5 | PSSI masked interrupt status register (PSSI_MIS) ..... | 806 |
| 25.5.6 | PSSI interrupt clear register (PSSI_ICR) ..... | 807 |
| 25.5.7 | PSSI data register (PSSI_DR) ..... | 808 |
| 25.5.8 | PSSI register map ..... | 808 |
| 26 | Comparator (COMP) ..... | 810 |
| 26.1 | Introduction ..... | 810 |
| 26.2 | COMP main features ..... | 810 |
| 26.3 | COMP functional description ..... | 811 |
| 26.3.1 | COMP block diagram ..... | 811 |
| 26.3.2 | COMP pins and internal signals ..... | 811 |
| 26.3.3 | COMP reset and clocks ..... | 812 |
| 26.3.4 | Comparator LOCK mechanism ..... | 812 |
| 26.3.5 | Window comparator ..... | 813 |
| 26.3.6 | Hysteresis ..... | 813 |
| 26.3.7 | Comparator output blanking function ..... | 814 |
| 26.3.8 | COMP power and speed modes ..... | 815 |
| 26.4 | COMP low-power modes ..... | 815 |
| 26.5 | COMP interrupts ..... | 815 |
| 26.6 | COMP registers ..... | 816 |
| 26.6.1 | Comparator 1 control and status register (COMP1_CSR) ..... | 816 |
| 26.6.2 | Comparator 2 control and status register (COMP2_CSR) ..... | 818 |
| 26.6.3 | COMP register map ..... | 821 |
| 27 | Operational amplifiers (OPAMP) ..... | 822 |
| 27.1 | Introduction ..... | 822 |
| 27.2 | OPAMP main features ..... | 822 |
| 27.3 | OPAMP functional description ..... | 822 |
| 27.3.1 | OPAMP reset and clocks ..... | 822 |
| 27.3.2 | Initial configuration ..... | 823 |
| 27.3.3 | Signal routing ..... | 823 |
| 27.3.4 | OPAMP modes ..... | 824 |
| 27.3.5 | Calibration ..... | 827 |
| 27.4 | OPAMP low-power modes ..... | 829 |
| 27.5 | OPAMP registers ..... | 830 |
| 27.5.1 | OPAMP1 control/status register (OPAMP1_CSR) ..... | 830 |
| 27.5.2 | OPAMP1 offset trimming register in normal mode (OPAMP1_OTR) .. | 831 |
| 27.5.3 | OPAMP1 offset trimming register in low-power mode (OPAMP1_LPOTR) ..... | 831 |
- 27.5.4 OPAMP2 control/status register (OPAMP2_CRS) . . . . . 832
- 27.5.5 OPAMP2 offset trimming register in normal mode (OPAMP2_OTR) . . 833
- 27.5.6 OPAMP2 offset trimming register in low-power mode
(OPAMP2_LPOTR) . . . . . 833 - 27.5.7 OPAMP register map . . . . . 834
- 28 Digital filter for sigma delta modulators (DFSDM) . . . . . 835
- 28.1 Introduction . . . . . 835
- 28.2 DFSDM main features . . . . . 836
- 28.3 DFSDM implementation . . . . . 837
- 28.4 DFSDM functional description . . . . . 838
- 28.4.1 DFSDM block diagram . . . . . 838
- 28.4.2 DFSDM pins and internal signals . . . . . 839
- 28.4.3 DFSDM reset and clocks . . . . . 840
- 28.4.4 Serial channel transceivers . . . . . 841
- 28.4.5 Configuring the input serial interface . . . . . 851
- 28.4.6 Parallel data inputs . . . . . 851
- 28.4.7 Channel selection . . . . . 853
- 28.4.8 Digital filter configuration . . . . . 854
- 28.4.9 Integrator unit . . . . . 855
- 28.4.10 Analog watchdog . . . . . 856
- 28.4.11 Short-circuit detector . . . . . 858
- 28.4.12 Extreme detector . . . . . 859
- 28.4.13 Data unit block . . . . . 859
- 28.4.14 Signed data format . . . . . 860
- 28.4.15 Launching conversions . . . . . 861
- 28.4.16 Continuous and fast continuous modes . . . . . 861
- 28.4.17 Request precedence . . . . . 862
- 28.4.18 Power optimization in run mode . . . . . 863
- 28.5 DFSDM interrupts . . . . . 863
- 28.6 DFSDM DMA transfer . . . . . 865
- 28.7 DFSDM channel y registers (y=0..7) . . . . . 865
- 28.7.1 DFSDM channel y configuration register (DFSDM_CHyCFGR1) . . . 865
- 28.7.2 DFSDM channel y configuration register (DFSDM_CHyCFGR2) . . . 867
- 28.7.3 DFSDM channel y analog watchdog and short-circuit detector register
(DFSDM_CHyAWSCDR) . . . . . 868
| 28.7.4 | DFSDM channel y watchdog filter data register (DFSDM_CHyWDATR) ..... | 869 |
| 28.7.5 | DFSDM channel y data input register (DFSDM_CHyDATINR) ..... | 869 |
| 28.7.6 | DFSDM channel y delay register (DFSDM_CHyDLYR) ..... | 870 |
| 28.8 | DFSDM filter x module registers (x=0..3) ..... | 871 |
| 28.8.1 | DFSDM filter x control register 1 (DFSDM_FLTxCR1) ..... | 871 |
| 28.8.2 | DFSDM filter x control register 2 (DFSDM_FLTxCR2) ..... | 874 |
| 28.8.3 | DFSDM filter x interrupt and status register (DFSDM_FLTxISR) ..... | 875 |
| 28.8.4 | DFSDM filter x interrupt flag clear register (DFSDM_FLTxICR) ..... | 877 |
| 28.8.5 | DFSDM filter x injected channel group selection register (DFSDM_FLTxJCHGR) ..... | 878 |
| 28.8.6 | DFSDM filter x control register (DFSDM_FLTxFCR) ..... | 878 |
| 28.8.7 | DFSDM filter x data register for injected group (DFSDM_FLTxJDATAR) ..... | 879 |
| 28.8.8 | DFSDM filter x data register for the regular channel (DFSDM_FLTxRDATAR) ..... | 880 |
| 28.8.9 | DFSDM filter x analog watchdog high threshold register (DFSDM_FLTxAWHTR) ..... | 881 |
| 28.8.10 | DFSDM filter x analog watchdog low threshold register (DFSDM_FLTxAWLTR) ..... | 881 |
| 28.8.11 | DFSDM filter x analog watchdog status register (DFSDM_FLTxAWSR) ..... | 882 |
| 28.8.12 | DFSDM filter x analog watchdog clear flag register (DFSDM_FLTxAWCFR) ..... | 883 |
| 28.8.13 | DFSDM filter x extremes detector maximum register (DFSDM_FLTxEXMAX) ..... | 883 |
| 28.8.14 | DFSDM filter x extremes detector minimum register (DFSDM_FLTxEXMIN) ..... | 884 |
| 28.8.15 | DFSDM filter x conversion timer register (DFSDM_FLTxCNVTIMR) .. | 884 |
| 28.8.16 | DFSDM register map ..... | 885 |
| 29 | LCD-TFT display controller (LTDC) ..... | 895 |
| 29.1 | Introduction ..... | 895 |
| 29.2 | LTDC main features ..... | 895 |
| 29.3 | LTDC implementation ..... | 895 |
| 29.4 | LTDC functional description ..... | 896 |
| 29.4.1 | LTDC block diagram ..... | 896 |
| 29.4.2 | LTDC pins and external signal interface ..... | 896 |
| 29.4.3 | LTDC reset and clocks ..... | 897 |
| 29.5 | LTDC programmable parameters . . . . . | 898 |
| 29.5.1 | LTDC global configuration parameters . . . . . | 898 |
| 29.5.2 | Layer programmable parameters . . . . . | 901 |
| 29.6 | LTDC interrupts . . . . . | 906 |
| 29.7 | LTDC programming procedure . . . . . | 907 |
| 29.8 | LTDC registers . . . . . | 908 |
| 29.8.1 | LTDC synchronization size configuration register (LTDC_SSCR) . . . . . | 908 |
| 29.8.2 | LTDC back porch configuration register (LTDC_BPCR) . . . . . | 909 |
| 29.8.3 | LTDC active width configuration register (LTDC_AWCR) . . . . . | 910 |
| 29.8.4 | LTDC total width configuration register (LTDC_TWCR) . . . . . | 911 |
| 29.8.5 | LTDC global control register (LTDC_GCR) . . . . . | 911 |
| 29.8.6 | LTDC shadow reload configuration register (LTDC_SRCR) . . . . . | 913 |
| 29.8.7 | LTDC background color configuration register (LTDC_BCCR) . . . . . | 913 |
| 29.8.8 | LTDC interrupt enable register (LTDC_IER) . . . . . | 914 |
| 29.8.9 | LTDC interrupt status register (LTDC_ISR) . . . . . | 915 |
| 29.8.10 | LTDC Interrupt clear register (LTDC_ICR) . . . . . | 915 |
| 29.8.11 | LTDC line interrupt position configuration register (LTDC_LIPCR) . . . . . | 916 |
| 29.8.12 | LTDC current position status register (LTDC_CPSR) . . . . . | 916 |
| 29.8.13 | LTDC current display status register (LTDC_CDSR) . . . . . | 917 |
| 29.8.14 | LTDC layer x control register (LTDC_LxCR) . . . . . | 917 |
| 29.8.15 | LTDC layer x window horizontal position configuration register (LTDC_LxWHPCR) . . . . . | 918 |
| 29.8.16 | LTDC layer x window vertical position configuration register (LTDC_LxWVPCR) . . . . . | 919 |
| 29.8.17 | LTDC layer x color keying configuration register (LTDC_LxCKCR) . . . . . | 920 |
| 29.8.18 | LTDC layer x pixel format configuration register (LTDC_LxPFCR) . . . . . | 920 |
| 29.8.19 | LTDC layer x constant alpha configuration register (LTDC_LxCACR) . . . . . | 921 |
| 29.8.20 | LTDC layer x default color configuration register (LTDC_LxDCCR) . . . . . | 922 |
| 29.8.21 | LTDC layer x blending factors configuration register (LTDC_LxBFCR) . . . . . | 923 |
| 29.8.22 | LTDC layer x color frame buffer address register (LTDC_LxCFBAR) . . . . . | 924 |
| 29.8.23 | LTDC layer x color frame buffer length register (LTDC_LxCFBLR) . . . . . | 924 |
| 29.8.24 | LTDC layer x color frame buffer line number register (LTDC_LxCFBLNR) . . . . . | 925 |
| 29.8.25 | LTDC layer x CLUT write register (LTDC_LxCLUTWR) | 926 |
| 29.8.26 | LTDC register map | 926 |
| 30 | DSI Host (DSI) applied to STM32L4R9xx and STM32L4S9xx only | 930 |
| 30.1 | Introduction | 930 |
| 30.2 | Standard and references | 930 |
| 30.3 | DSI Host main features | 931 |
| 30.4 | DSI Host functional description | 932 |
| 30.4.1 | General description | 932 |
| 30.4.2 | DSI Host pins and internal signals | 932 |
| 30.4.3 | Supported resolutions and frame rates | 933 |
| 30.4.4 | System level architecture | 933 |
| 30.5 | Functional description: video mode on LTDC interface | 936 |
| 30.5.1 | Video transmission mode | 937 |
| 30.5.2 | Updating the LTDC interface configuration in video mode | 939 |
| 30.6 | Functional description: adapted command mode on LTDC interface | 941 |
| 30.7 | Functional description: APB slave generic interface | 945 |
| 30.7.1 | Packet transmission using the generic interface | 945 |
| 30.8 | Functional description: timeout counters | 949 |
| 30.8.1 | Contention error detection timeout counters | 949 |
| 30.8.2 | Peripheral response timeout counters | 950 |
| 30.9 | Functional description: transmission of commands | 955 |
| 30.9.1 | Transmission of commands in video mode | 955 |
| 30.9.2 | Transmission of commands in low-power mode | 957 |
| 30.9.3 | Transmission of commands in high-speed | 961 |
| 30.9.4 | Read command transmission | 961 |
| 30.9.5 | Clock lane in low-power mode | 962 |
| 30.10 | Functional description: virtual channels | 964 |
| 30.11 | Functional description: video mode pattern generator | 965 |
| 30.11.1 | Color bar pattern | 965 |
| 30.11.2 | Color coding | 967 |
| 30.11.3 | BER testing pattern | 967 |
| 30.11.4 | Video mode pattern generator resolution | 968 |
| 30.12 | Functional description: D-PHY management | 969 |
| 30.12.1 | D-PHY configuration | 969 |
| 30.12.2 | Special D-PHY operations . . . . . | 971 |
| 30.12.3 | Special low-power D-PHY functions . . . . . | 971 |
| 30.12.4 | DSI PLL control . . . . . | 971 |
| 30.12.5 | Regulator control . . . . . | 973 |
| 30.13 | Functional description: interrupts and errors . . . . . | 973 |
| 30.13.1 | DSI Wrapper interrupts . . . . . | 973 |
| 30.13.2 | DSI Host interrupts and errors . . . . . | 973 |
| 30.14 | Programing procedure . . . . . | 981 |
| 30.14.1 | Programing procedure overview . . . . . | 981 |
| 30.14.2 | Configuring the D-PHY parameters . . . . . | 981 |
| 30.14.3 | Configuring the DSI Host timing . . . . . | 982 |
| 30.14.4 | Configuring flow control and DBI interface . . . . . | 983 |
| 30.14.5 | Configuring the DSI Host LTDC interface . . . . . | 983 |
| 30.14.6 | Configuring the video mode . . . . . | 984 |
| 30.14.7 | Configuring the adapted command mode . . . . . | 988 |
| 30.14.8 | Configuring the video mode pattern generator . . . . . | 988 |
| 30.14.9 | Managing ULPM . . . . . | 989 |
| 30.15 | DSI Host registers . . . . . | 992 |
| 30.15.1 | DSI Host version register (DSI_VR) . . . . . | 992 |
| 30.15.2 | DSI Host control register (DSI_CR) . . . . . | 992 |
| 30.15.3 | DSI Host clock control register (DSI_CCR) . . . . . | 992 |
| 30.15.4 | DSI Host LTDC VCID register (DSI_LVCIDR) . . . . . | 993 |
| 30.15.5 | DSI Host LTDC color coding register (DSI_LCOLCR) . . . . . | 993 |
| 30.15.6 | DSI Host LTDC polarity configuration register (DSI_LPCR) . . . . . | 994 |
| 30.15.7 | DSI Host low-power mode configuration register (DSI_LPMCR) . . . . . | 994 |
| 30.15.8 | DSI Host protocol configuration register (DSI_PCR) . . . . . | 995 |
| 30.15.9 | DSI Host generic VCID register (DSI_GVCIDR) . . . . . | 996 |
| 30.15.10 | DSI Host mode configuration register (DSI_MCR) . . . . . | 996 |
| 30.15.11 | DSI Host video mode configuration register (DSI_VMCR) . . . . . | 996 |
| 30.15.12 | DSI Host video packet configuration register (DSI_VPCR) . . . . . | 998 |
| 30.15.13 | DSI Host video chunks configuration register (DSI_VCCR) . . . . . | 998 |
| 30.15.14 | DSI Host video null packet configuration register (DSI_VNPCR) . . . . . | 999 |
| 30.15.15 | DSI Host video HSA configuration register (DSI_VHSACR) . . . . . | 999 |
| 30.15.16 | DSI Host video HBP configuration register (DSI_VHBPCR) . . . . . | 1000 |
| 30.15.17 | DSI Host video line configuration register (DSI_VLCR) . . . . . | 1000 |
| 30.15.18 | DSI Host video VSA configuration register (DSI_VVSACR) . . . . . | 1000 |
| 30.15.19 | DSI Host video VBP configuration register (DSI_VVBPCR) . . . . . | 1001 |
| 30.15.20 DSI Host video VFP configuration register (DSI_VVFPCCR) . . . . . | 1001 |
| 30.15.21 DSI Host video VA configuration register (DSI_VVACR) . . . . . | 1001 |
| 30.15.22 DSI Host LTDC command configuration register (DSI_LCCR) . . . . . | 1002 |
| 30.15.23 DSI Host command mode configuration register (DSI_CMCCR) . . . . . | 1002 |
| 30.15.24 DSI Host generic header configuration register (DSI_GHCCR) . . . . . | 1004 |
| 30.15.25 DSI Host generic payload data register (DSI_GPDR) . . . . . | 1005 |
| 30.15.26 DSI Host generic packet status register (DSI_GPSR) . . . . . | 1005 |
| 30.15.27 DSI Host timeout counter configuration register 0 (DSI_TCCR0) . . . . . | 1006 |
| 30.15.28 DSI Host timeout counter configuration register 1 (DSI_TCCR1) . . . . . | 1007 |
| 30.15.29 DSI Host timeout counter configuration register 2 (DSI_TCCR2) . . . . . | 1007 |
| 30.15.30 DSI Host timeout counter configuration register 3 (DSI_TCCR3) . . . . . | 1007 |
| 30.15.31 DSI Host timeout counter configuration register 4 (DSI_TCCR4) . . . . . | 1008 |
| 30.15.32 DSI Host timeout counter configuration register 5 (DSI_TCCR5) . . . . . | 1008 |
| 30.15.33 DSI Host clock lane configuration register (DSI_CLCR) . . . . . | 1009 |
| 30.15.34 DSI Host clock lane timer configuration register (DSI_CLTCR) . . . . . | 1009 |
| 30.15.35 DSI Host data lane timer configuration register (DSI_DLTCR) . . . . . | 1010 |
| 30.15.36 DSI Host PHY control register (DSI_PCTLR) . . . . . | 1010 |
| 30.15.37 DSI Host PHY configuration register (DSI_PCONFR) . . . . . | 1011 |
| 30.15.38 DSI Host PHY ULPS control register (DSI_PUCR) . . . . . | 1011 |
| 30.15.39 DSI Host PHY TX triggers configuration register (DSI_PTTCCR) . . . . . | 1012 |
| 30.15.40 DSI Host PHY status register (DSI_PSR) . . . . . | 1012 |
| 30.15.41 DSI Host interrupt and status register 0 (DSI_ISR0) . . . . . | 1013 |
| 30.15.42 DSI Host interrupt and status register 1 (DSI_ISR1) . . . . . | 1015 |
| 30.15.43 DSI Host interrupt enable register 0 (DSI_IER0) . . . . . | 1016 |
| 30.15.44 DSI Host interrupt enable register 1 (DSI_IER1) . . . . . | 1018 |
| 30.15.45 DSI Host force interrupt register 0 (DSI_FIR0) . . . . . | 1020 |
| 30.15.46 DSI Host force interrupt register 1 (DSI_FIR1) . . . . . | 1021 |
| 30.15.47 DSI Host video shadow control register (DSI_VSCR) . . . . . | 1022 |
| 30.15.48 DSI Host LTDC current VCID register (DSI_LCVCIDR) . . . . . | 1023 |
| 30.15.49 DSI Host LTDC current color coding register (DSI_LCCCR) . . . . . | 1023 |
| 30.15.50 DSI Host low-power mode current configuration register (DSI_LPMCCR) . . . . . | 1024 |
| 30.15.51 DSI Host video mode current configuration register (DSI_VMCCR) . . . . . | 1024 |
| 30.15.52 DSI Host video packet current configuration register (DSI_VPCCR) . . . . . | 1025 |
| 30.15.53 DSI Host video chunks current configuration register (DSI_VCCCR) . . . . . | 1026 |
30.15.54 DSI Host video null packet current configuration register (DSI_VNPCCR) . . . . . 1026
30.15.55 DSI Host video HSA current configuration register (DSI_VHSACCR) . . . . . 1027
30.15.56 DSI Host video HBP current configuration register (DSI_VHBPCCR) . . . . . 1027
30.15.57 DSI Host video line current configuration register (DSI_VLCCR) . . . . . 1027
30.15.58 DSI Host video VSA current configuration register (DSI_VVSACCR) . . . . . 1028
30.15.59 DSI Host video VBP current configuration register (DSI_VVBPCCR) . . . . . 1028
30.15.60 DSI Host video VFP current configuration register (DSI_VVFPCCR) . . . . . 1029
30.15.61 DSI Host video VA current configuration register (DSI_VVACCR) . . . . . 1029
30.16 DSI Wrapper registers . . . . . 1030
30.16.1 DSI Wrapper configuration register (DSI_WCFGR) . . . . . 1030
30.16.2 DSI Wrapper control register (DSI_WCR) . . . . . 1031
30.16.3 DSI Wrapper interrupt enable register (DSI_WIER) . . . . . 1031
30.16.4 DSI Wrapper interrupt and status register (DSI_WISR) . . . . . 1032
30.16.5 DSI Wrapper interrupt flag clear register (DSI_WIFCR) . . . . . 1033
30.16.6 DSI Wrapper PHY configuration register 0 (DSI_WPCR0) . . . . . 1034
30.16.7 DSI Wrapper PHY configuration register 1 (DSI_WPCR1) . . . . . 1036
30.16.8 DSI Wrapper PHY configuration register 2 (DSI_WPCR2) . . . . . 1038
30.16.9 DSI Wrapper PHY configuration register 3 (DSI_WPCR3) . . . . . 1039
30.16.10 DSI Wrapper PHY configuration register 4 (DSI_WPCR4) . . . . . 1039
30.16.11 DSI Wrapper regulator and PLL control register (DSI_WRPCR) . . . . . 1040
30.16.12 DSI register map . . . . . 1041
31 Touch sensing controller (TSC) . . . . . 1047
31.1 Introduction . . . . . 1047
31.2 TSC main features . . . . . 1047
31.3 TSC functional description . . . . . 1048
31.3.1 TSC block diagram . . . . . 1048
31.3.2 Surface charge transfer acquisition overview . . . . . 1048
31.3.3 Reset and clocks . . . . . 1050
31.3.4 Charge transfer acquisition sequence . . . . . 1051
31.3.5 Spread spectrum feature . . . . . 1052
31.3.6 Max count error . . . . . 1052
| 31.3.7 | Sampling capacitor I/O and channel I/O mode selection . . . . . | 1053 |
| 31.3.8 | Acquisition mode . . . . . | 1054 |
| 31.3.9 | I/O hysteresis and analog switch control . . . . . | 1054 |
| 31.4 | TSC low-power modes . . . . . | 1055 |
| 31.5 | TSC interrupts . . . . . | 1055 |
| 31.6 | TSC registers . . . . . | 1056 |
| 31.6.1 | TSC control register (TSC_CR) . . . . . | 1056 |
| 31.6.2 | TSC interrupt enable register (TSC_IER) . . . . . | 1058 |
| 31.6.3 | TSC interrupt clear register (TSC_ICR) . . . . . | 1059 |
| 31.6.4 | TSC interrupt status register (TSC_ISR) . . . . . | 1060 |
| 31.6.5 | TSC I/O hysteresis control register (TSC_IOHCR) . . . . . | 1060 |
| 31.6.6 | TSC I/O analog switch control register (TSC_IOASCR) . . . . . | 1061 |
| 31.6.7 | TSC I/O sampling control register (TSC_IOSCR) . . . . . | 1061 |
| 31.6.8 | TSC I/O channel control register (TSC_IOCCR) . . . . . | 1062 |
| 31.6.9 | TSC I/O group control status register (TSC_IOGCSR) . . . . . | 1062 |
| 31.6.10 | TSC I/O group x counter register (TSC_IOGxCR) . . . . . | 1063 |
| 31.6.11 | TSC register map . . . . . | 1064 |
| 32 | True random number generator (RNG) applied to STM32L4Rxxx and STM32L4Sxxx only . . . . . | 1066 |
| 32.1 | Introduction . . . . . | 1066 |
| 32.2 | RNG main features . . . . . | 1066 |
| 32.3 | RNG functional description . . . . . | 1067 |
| 32.3.1 | RNG block diagram . . . . . | 1067 |
| 32.3.2 | RNG internal signals . . . . . | 1067 |
| 32.3.3 | Random number generation . . . . . | 1068 |
| 32.3.4 | RNG initialization . . . . . | 1070 |
| 32.3.5 | RNG operation . . . . . | 1071 |
| 32.3.6 | RNG clocking . . . . . | 1072 |
| 32.3.7 | Error management . . . . . | 1072 |
| 32.3.8 | RNG low-power usage . . . . . | 1073 |
| 32.4 | RNG interrupts . . . . . | 1074 |
| 32.5 | RNG processing time . . . . . | 1074 |
| 32.6 | RNG entropy source validation . . . . . | 1074 |
| 32.6.1 | Introduction . . . . . | 1074 |
| 32.6.2 | Validation conditions . . . . . | 1074 |
- 32.6.3 Data collection . . . . . 1075
- 32.7 RNG registers . . . . . 1075
- 32.7.1 RNG control register (RNG_CR) . . . . . 1075
- 32.7.2 RNG status register (RNG_SR) . . . . . 1076
- 32.7.3 RNG data register (RNG_DR) . . . . . 1077
- 32.7.4 RNG register map . . . . . 1078
- 33 True random number generator (RNG) applied to STM32L4P5xx and STM32L4Q5xx only . . . . . 1079
- 33.1 Introduction . . . . . 1079
- 33.2 RNG main features . . . . . 1079
- 33.3 RNG functional description . . . . . 1080
- 33.3.1 RNG block diagram . . . . . 1080
- 33.3.2 RNG internal signals . . . . . 1080
- 33.3.3 Random number generation . . . . . 1081
- 33.3.4 RNG initialization . . . . . 1084
- 33.3.5 RNG operation . . . . . 1085
- 33.3.6 RNG clocking . . . . . 1086
- 33.3.7 Error management . . . . . 1086
- 33.3.8 RNG low-power usage . . . . . 1087
- 33.4 RNG interrupts . . . . . 1087
- 33.5 RNG processing time . . . . . 1088
- 33.6 RNG entropy source validation . . . . . 1088
- 33.6.1 Introduction . . . . . 1088
- 33.6.2 Validation conditions . . . . . 1088
- 33.6.3 Data collection . . . . . 1089
- 33.7 RNG registers . . . . . 1089
- 33.7.1 RNG control register (RNG_CR) . . . . . 1089
- 33.7.2 RNG status register (RNG_SR) . . . . . 1091
- 33.7.3 RNG data register (RNG_DR) . . . . . 1092
- 33.7.4 RNG health test control register (RNG_HTCR) . . . . . 1092
- 33.7.5 RNG register map . . . . . 1093
- 34 AES hardware accelerator (AES) . . . . . 1094
- 34.1 Introduction . . . . . 1094
- 34.2 AES main features . . . . . 1094
| 34.3 | AES implementation . . . . . | 1095 |
| 34.4 | AES functional description . . . . . | 1095 |
| 34.4.1 | AES block diagram . . . . . | 1095 |
| 34.4.2 | AES internal signals . . . . . | 1095 |
| 34.4.3 | AES cryptographic core . . . . . | 1096 |
| 34.4.4 | AES procedure to perform a cipher operation . . . . . | 1101 |
| 34.4.5 | AES decryption round key preparation . . . . . | 1104 |
| 34.4.6 | AES ciphertext stealing and data padding . . . . . | 1105 |
| 34.4.7 | AES task suspend and resume . . . . . | 1105 |
| 34.4.8 | AES basic chaining modes (ECB, CBC) . . . . . | 1106 |
| 34.4.9 | AES counter (CTR) mode . . . . . | 1111 |
| 34.4.10 | AES Galois/counter mode (GCM) . . . . . | 1113 |
| 34.4.11 | AES Galois message authentication code (GMAC) . . . . . | 1118 |
| 34.4.12 | AES counter with CBC-MAC (CCM) . . . . . | 1120 |
| 34.4.13 | AES data registers and data swapping . . . . . | 1125 |
| 34.4.14 | AES key registers . . . . . | 1127 |
| 34.4.15 | AES initialization vector registers . . . . . | 1127 |
| 34.4.16 | AES DMA interface . . . . . | 1128 |
| 34.4.17 | AES error management . . . . . | 1129 |
| 34.5 | AES interrupts . . . . . | 1130 |
| 34.6 | AES processing latency . . . . . | 1131 |
| 34.7 | AES registers . . . . . | 1131 |
| 34.7.1 | AES control register (AES_CR) . . . . . | 1131 |
| 34.7.2 | AES status register (AES_SR) . . . . . | 1134 |
| 34.7.3 | AES data input register (AES_DINR) . . . . . | 1135 |
| 34.7.4 | AES data output register (AES_DOUTR) . . . . . | 1135 |
| 34.7.5 | AES key register 0 (AES_KEYR0) . . . . . | 1136 |
| 34.7.6 | AES key register 1 (AES_KEYR1) . . . . . | 1137 |
| 34.7.7 | AES key register 2 (AES_KEYR2) . . . . . | 1137 |
| 34.7.8 | AES key register 3 (AES_KEYR3) . . . . . | 1137 |
| 34.7.9 | AES initialization vector register 0 (AES_IVR0) . . . . . | 1138 |
| 34.7.10 | AES initialization vector register 1 (AES_IVR1) . . . . . | 1138 |
| 34.7.11 | AES initialization vector register 2 (AES_IVR2) . . . . . | 1138 |
| 34.7.12 | AES initialization vector register 3 (AES_IVR3) . . . . . | 1139 |
| 34.7.13 | AES key register 4 (AES_KEYR4) . . . . . | 1139 |
| 34.7.14 | AES key register 5 (AES_KEYR5) . . . . . | 1139 |
34.7.15 AES key register 6 (AES_KEYR6) . . . . . 1140
34.7.16 AES key register 7 (AES_KEYR7) . . . . . 1140
34.7.17 AES suspend registers (AES_SUSPxR) . . . . . 1140
34.7.18 AES register map . . . . . 1141
35 Hash processor (HASH) . . . . . 1143
35.1 Introduction . . . . . 1143
35.2 HASH main features . . . . . 1143
35.3 HASH implementation . . . . . 1144
35.4 HASH functional description . . . . . 1144
35.4.1 HASH block diagram . . . . . 1144
35.4.2 HASH internal signals . . . . . 1145
35.4.3 About secure hash algorithms . . . . . 1145
35.4.4 Message data feeding . . . . . 1145
35.4.5 Message digest computing . . . . . 1147
35.4.6 Message padding . . . . . 1148
35.4.7 HMAC operation . . . . . 1150
35.4.8 HASH suspend/resume operations . . . . . 1152
35.4.9 HASH DMA interface . . . . . 1154
35.4.10 HASH error management . . . . . 1154
35.5 HASH interrupts . . . . . 1154
35.6 HASH processing time . . . . . 1155
35.7 HASH registers . . . . . 1156
35.7.1 HASH control register (HASH_CR) . . . . . 1156
35.7.2 HASH data input register (HASH_DIN) . . . . . 1158
35.7.3 HASH start register (HASH_STR) . . . . . 1159
35.7.4 HASH digest registers . . . . . 1160
35.7.5 HASH interrupt enable register (HASH_IMR) . . . . . 1161
35.7.6 HASH status register (HASH_SR) . . . . . 1162
35.7.7 HASH context swap registers . . . . . 1162
35.7.8 HASH register map . . . . . 1164
36 Public key accelerator (PKA) applied to
STM32L4P5xx and STM32L4Q5xx only . . . . . 1166
36.1 Introduction . . . . . 1166
36.2 PKA main features . . . . . 1166
| 36.3 | PKA functional description . . . . . | 1166 |
| 36.3.1 | PKA block diagram . . . . . | 1166 |
| 36.3.2 | PKA internal signals . . . . . | 1167 |
| 36.3.3 | PKA reset and clocks . . . . . | 1167 |
| 36.3.4 | PKA public key acceleration . . . . . | 1167 |
| 36.3.5 | Typical applications for PKA . . . . . | 1169 |
| 36.3.6 | PKA procedure to perform an operation . . . . . | 1171 |
| 36.3.7 | PKA error management . . . . . | 1172 |
| 36.4 | PKA operating modes . . . . . | 1172 |
| 36.4.1 | Introduction . . . . . | 1172 |
| 36.4.2 | Montgomery parameter computation . . . . . | 1173 |
| 36.4.3 | Modular addition . . . . . | 1174 |
| 36.4.4 | Modular subtraction . . . . . | 1174 |
| 36.4.5 | Modular and Montgomery multiplication . . . . . | 1174 |
| 36.4.6 | Modular exponentiation . . . . . | 1175 |
| 36.4.7 | Modular inversion . . . . . | 1176 |
| 36.4.8 | Modular reduction . . . . . | 1177 |
| 36.4.9 | Arithmetic addition . . . . . | 1177 |
| 36.4.10 | Arithmetic subtraction . . . . . | 1177 |
| 36.4.11 | Arithmetic multiplication . . . . . | 1178 |
| 36.4.12 | Arithmetic comparison . . . . . | 1178 |
| 36.4.13 | RSA CRT exponentiation . . . . . | 1178 |
| 36.4.14 | Point on elliptic curve Fp check . . . . . | 1179 |
| 36.4.15 | ECC Fp scalar multiplication . . . . . | 1180 |
| 36.4.16 | ECDSA sign . . . . . | 1181 |
| 36.4.17 | ECDSA verification . . . . . | 1183 |
| 36.5 | Example of configurations and processing times . . . . . | 1184 |
| 36.5.1 | Supported elliptic curves . . . . . | 1184 |
| 36.5.2 | Computation times . . . . . | 1186 |
| 36.6 | PKA interrupts . . . . . | 1187 |
| 36.7 | PKA registers . . . . . | 1188 |
| 36.7.1 | PKA control register (PKA_CR) . . . . . | 1188 |
| 36.7.2 | PKA status register (PKA_SR) . . . . . | 1189 |
| 36.7.3 | PKA clear flag register (PKA_CLRFR) . . . . . | 1190 |
| 36.7.4 | PKA RAM . . . . . | 1190 |
| 36.7.5 | PKA register map . . . . . | 1191 |
| 37 | Advanced-control timers (TIM1/TIM8) . . . . . | 1192 |
| 37.1 | TIM1/TIM8 introduction . . . . . | 1192 |
| 37.2 | TIM1/TIM8 main features . . . . . | 1192 |
| 37.3 | TIM1/TIM8 functional description . . . . . | 1194 |
| 37.3.1 | Time-base unit . . . . . | 1194 |
| 37.3.2 | Counter modes . . . . . | 1196 |
| 37.3.3 | Repetition counter . . . . . | 1207 |
| 37.3.4 | External trigger input . . . . . | 1209 |
| 37.3.5 | Clock selection . . . . . | 1210 |
| 37.3.6 | Capture/compare channels . . . . . | 1214 |
| 37.3.7 | Input capture mode . . . . . | 1216 |
| 37.3.8 | PWM input mode . . . . . | 1217 |
| 37.3.9 | Forced output mode . . . . . | 1218 |
| 37.3.10 | Output compare mode . . . . . | 1219 |
| 37.3.11 | PWM mode . . . . . | 1220 |
| 37.3.12 | Asymmetric PWM mode . . . . . | 1223 |
| 37.3.13 | Combined PWM mode . . . . . | 1224 |
| 37.3.14 | Combined 3-phase PWM mode . . . . . | 1225 |
| 37.3.15 | Complementary outputs and dead-time insertion . . . . . | 1226 |
| 37.3.16 | Using the break function . . . . . | 1228 |
| 37.3.17 | Bidirectional break inputs . . . . . | 1234 |
| 37.3.18 | Clearing the OCxREF signal on an external event . . . . . | 1235 |
| 37.3.19 | 6-step PWM generation . . . . . | 1237 |
| 37.3.20 | One-pulse mode . . . . . | 1238 |
| 37.3.21 | Retriggerable one pulse mode . . . . . | 1239 |
| 37.3.22 | Encoder interface mode . . . . . | 1240 |
| 37.3.23 | UIF bit remapping . . . . . | 1242 |
| 37.3.24 | Timer input XOR function . . . . . | 1243 |
| 37.3.25 | Interfacing with Hall sensors . . . . . | 1243 |
| 37.3.26 | Timer synchronization . . . . . | 1246 |
| 37.3.27 | ADC synchronization . . . . . | 1250 |
| 37.3.28 | DMA burst mode . . . . . | 1250 |
| 37.3.29 | Debug mode . . . . . | 1251 |
| 37.4 | TIM1/TIM8 registers . . . . . | 1252 |
| 37.4.1 | TIMx control register 1 (TIMx_CR1)(x = 1, 8) . . . . . | 1252 |
| 37.4.2 | TIMx control register 2 (TIMx_CR2)(x = 1, 8) . . . . . | 1253 |
| 37.4.3 | TIMx slave mode control register (TIMx_SMCR)(x = 1, 8) . . . . . | 1256 |
| 37.4.4 | TIMx DMA/interrupt enable register (TIMx_DIER)(x = 1, 8) . . . . . | 1258 |
| 37.4.5 | TIMx status register (TIMx_SR)(x = 1, 8) . . . . . | 1260 |
| 37.4.6 | TIMx event generation register (TIMx_EGR)(x = 1, 8) . . . . . | 1262 |
| 37.4.7 | TIMx capture/compare mode register 1 [alternate] (TIMx_CCMR1)(x = 1, 8) . . . . . | 1263 |
| 37.4.8 | TIMx capture/compare mode register 1 [alternate] (TIMx_CCMR1)(x = 1, 8) . . . . . | 1264 |
| 37.4.9 | TIMx capture/compare mode register 2 [alternate] (TIMx_CCMR2)(x = 1, 8) . . . . . | 1267 |
| 37.4.10 | TIMx capture/compare mode register 2 [alternate] (TIMx_CCMR2)(x = 1, 8) . . . . . | 1268 |
| 37.4.11 | TIMx capture/compare enable register (TIMx_CCER)(x = 1, 8) . . . . . | 1270 |
| 37.4.12 | TIMx counter (TIMx_CNT)(x = 1, 8) . . . . . | 1273 |
| 37.4.13 | TIMx prescaler (TIMx_PSC)(x = 1, 8) . . . . . | 1273 |
| 37.4.14 | TIMx auto-reload register (TIMx_ARR)(x = 1, 8) . . . . . | 1273 |
| 37.4.15 | TIMx repetition counter register (TIMx_RCR)(x = 1, 8) . . . . . | 1274 |
| 37.4.16 | TIMx capture/compare register 1 (TIMx_CCR1)(x = 1, 8) . . . . . | 1274 |
| 37.4.17 | TIMx capture/compare register 2 (TIMx_CCR2)(x = 1, 8) . . . . . | 1275 |
| 37.4.18 | TIMx capture/compare register 3 (TIMx_CCR3)(x = 1, 8) . . . . . | 1275 |
| 37.4.19 | TIMx capture/compare register 4 (TIMx_CCR4)(x = 1, 8) . . . . . | 1276 |
| 37.4.20 | TIMx break and dead-time register (TIMx_BDTR)(x = 1, 8) . . . . . | 1276 |
| 37.4.21 | TIMx DMA control register (TIMx_DCR)(x = 1, 8) . . . . . | 1280 |
| 37.4.22 | TIMx DMA address for full transfer (TIMx_DMAR)(x = 1, 8) . . . . . | 1281 |
| 37.4.23 | TIM1 option register 1 (TIM1_OR1) . . . . . | 1282 |
| 37.4.24 | TIM8 option register 1 (TIM8_OR1) . . . . . | 1282 |
| 37.4.25 | TIMx capture/compare mode register 3 (TIMx_CCMR3)(x = 1, 8) . . . . . | 1283 |
| 37.4.26 | TIMx capture/compare register 5 (TIMx_CCR5)(x = 1, 8) . . . . . | 1284 |
| 37.4.27 | TIMx capture/compare register 6 (TIMx_CCR6)(x = 1, 8) . . . . . | 1285 |
| 37.4.28 | TIM1 option register 2 (TIM1_OR2) . . . . . | 1285 |
| 37.4.29 | TIM1 option register 3 (TIM1_OR3) . . . . . | 1287 |
| 37.4.30 | TIM8 option register 2 (TIM8_OR2) . . . . . | 1289 |
| 37.4.31 | TIM8 option register 3 (TIM8_OR3) . . . . . | 1290 |
| 37.4.32 | TIM1 register map . . . . . | 1293 |
| 37.4.33 | TIM8 register map . . . . . | 1295 |
| 38 | General-purpose timers (TIM2/TIM3/TIM4/TIM5) . . . . . | 1298 |
| 38.1 | TIM2/TIM3/TIM4/TIM5 introduction . . . . . | 1298 |
| 38.2 | TIM2/TIM3/TIM4/TIM5 main features . . . . . | 1298 |
| 38.3 | TIM2/TIM3/TIM4/TIM5 functional description . . . . . | 1300 |
| 38.3.1 | Time-base unit . . . . . | 1300 |
| 38.3.2 | Counter modes . . . . . | 1302 |
| 38.3.3 | Clock selection . . . . . | 1312 |
| 38.3.4 | Capture/Compare channels . . . . . | 1316 |
| 38.3.5 | Input capture mode . . . . . | 1318 |
| 38.3.6 | PWM input mode . . . . . | 1319 |
| 38.3.7 | Forced output mode . . . . . | 1320 |
| 38.3.8 | Output compare mode . . . . . | 1321 |
| 38.3.9 | PWM mode . . . . . | 1322 |
| 38.3.10 | Asymmetric PWM mode . . . . . | 1325 |
| 38.3.11 | Combined PWM mode . . . . . | 1326 |
| 38.3.12 | Clearing the OCxREF signal on an external event . . . . . | 1327 |
| 38.3.13 | One-pulse mode . . . . . | 1329 |
| 38.3.14 | Retriggerable one pulse mode . . . . . | 1330 |
| 38.3.15 | Encoder interface mode . . . . . | 1331 |
| 38.3.16 | UIF bit remapping . . . . . | 1333 |
| 38.3.17 | Timer input XOR function . . . . . | 1333 |
| 38.3.18 | Timers and external trigger synchronization . . . . . | 1334 |
| 38.3.19 | Timer synchronization . . . . . | 1337 |
| 38.3.20 | DMA burst mode . . . . . | 1342 |
| 38.3.21 | Debug mode . . . . . | 1343 |
| 38.4 | TIM2/TIM3/TIM4/TIM5 registers . . . . . | 1344 |
| 38.4.1 | TIMx control register 1 (TIMx_CR1)(x = 2 to 5) . . . . . | 1344 |
| 38.4.2 | TIMx control register 2 (TIMx_CR2)(x = 2 to 5) . . . . . | 1345 |
| 38.4.3 | TIMx slave mode control register (TIMx_SMCR)(x = 2 to 5) . . . . . | 1347 |
| 38.4.4 | TIMx DMA/Interrupt enable register (TIMx_DIER)(x = 2 to 5) . . . . . | 1350 |
| 38.4.5 | TIMx status register (TIMx_SR)(x = 2 to 5) . . . . . | 1351 |
| 38.4.6 | TIMx event generation register (TIMx_EGR)(x = 2 to 5) . . . . . | 1352 |
| 38.4.7 | TIMx capture/compare mode register 1 [alternate] (TIMx_CCMR1) (x = 2 to 5) . . . . . | 1353 |
| 38.4.8 | TIMx capture/compare mode register 1 [alternate] (TIMx_CCMR1) (x = 2 to 5) . . . . . | 1355 |
| 38.4.9 | TIMx capture/compare mode register 2 [alternate] (TIMx_CCMR2) (x = 2 to 5) ..... | 1357 |
| 38.4.10 | TIMx capture/compare mode register 2 [alternate] (TIMx_CCMR2) (x = 2 to 5) ..... | 1358 |
| 38.4.11 | TIMx capture/compare enable register (TIMx_CCER)(x = 2 to 5) ..... | 1359 |
| 38.4.12 | TIMx counter [alternate] (TIMx_CNT)(x = 2 to 5) ..... | 1360 |
| 38.4.13 | TIMx counter [alternate] (TIMx_CNT)(x = 2 to 5) ..... | 1361 |
| 38.4.14 | TIMx prescaler (TIMx_PSC)(x = 2 to 5) ..... | 1361 |
| 38.4.15 | TIMx auto-reload register (TIMx_ARR)(x = 2 to 5) ..... | 1362 |
| 38.4.16 | TIMx capture/compare register 1 (TIMx_CCR1)(x = 2 to 5) ..... | 1362 |
| 38.4.17 | TIMx capture/compare register 2 (TIMx_CCR2)(x = 2 to 5) ..... | 1363 |
| 38.4.18 | TIMx capture/compare register 3 (TIMx_CCR3)(x = 2 to 5) ..... | 1363 |
| 38.4.19 | TIMx capture/compare register 4 (TIMx_CCR4)(x = 2 to 5) ..... | 1364 |
| 38.4.20 | TIMx DMA control register (TIMx_DCR)(x = 2 to 5) ..... | 1365 |
| 38.4.21 | TIMx DMA address for full transfer (TIMx_DMAR)(x = 2 to 5) ..... | 1365 |
| 38.4.22 | TIM2 option register 1 (TIM2_OR1) ..... | 1365 |
| 38.4.23 | TIM3 option register 1 (TIM3_OR1) ..... | 1366 |
| 38.4.24 | TIM2 option register 2 (TIM2_OR2) ..... | 1366 |
| 38.4.25 | TIM3 option register 2 (TIM3_OR2) ..... | 1367 |
| 38.4.26 | TIMx register map ..... | 1368 |
| 39 | General-purpose timers (TIM15/TIM16/TIM17) ..... | 1371 |
| 39.1 | TIM15/TIM16/TIM17 introduction ..... | 1371 |
| 39.2 | TIM15 main features ..... | 1371 |
| 39.3 | TIM16/TIM17 main features ..... | 1372 |
| 39.4 | TIM15/TIM16/TIM17 functional description ..... | 1375 |
| 39.4.1 | Time-base unit ..... | 1375 |
| 39.4.2 | Counter modes ..... | 1377 |
| 39.4.3 | Repetition counter ..... | 1381 |
| 39.4.4 | Clock selection ..... | 1382 |
| 39.4.5 | Capture/compare channels ..... | 1384 |
| 39.4.6 | Input capture mode ..... | 1386 |
| 39.4.7 | PWM input mode (only for TIM15) ..... | 1387 |
| 39.4.8 | Forced output mode ..... | 1388 |
| 39.4.9 | Output compare mode ..... | 1389 |
| 39.4.10 | PWM mode ..... | 1390 |
| 39.4.11 | Combined PWM mode (TIM15 only) ..... | 1391 |
| 39.4.12 | Complementary outputs and dead-time insertion . . . . . | 1392 |
| 39.4.13 | Using the break function . . . . . | 1394 |
| 39.4.14 | Bidirectional break inputs . . . . . | 1399 |
| 39.4.15 | One-pulse mode . . . . . | 1401 |
| 39.4.16 | Retriggerable one pulse mode (TIM15 only) . . . . . | 1403 |
| 39.4.17 | UIF bit remapping . . . . . | 1403 |
| 39.4.18 | Timer input XOR function (TIM15 only) . . . . . | 1405 |
| 39.4.19 | External trigger synchronization (TIM15 only) . . . . . | 1406 |
| 39.4.20 | Slave mode – combined reset + trigger mode . . . . . | 1408 |
| 39.4.21 | DMA burst mode . . . . . | 1408 |
| 39.4.22 | Timer synchronization (TIM15) . . . . . | 1410 |
| 39.4.23 | Using timer output as trigger for other timers (TIM16/TIM17) . . . . . | 1410 |
| 39.4.24 | Debug mode . . . . . | 1410 |
| 39.5 | TIM15 registers . . . . . | 1411 |
| 39.5.1 | TIM15 control register 1 (TIM15_CR1) . . . . . | 1411 |
| 39.5.2 | TIM15 control register 2 (TIM15_CR2) . . . . . | 1412 |
| 39.5.3 | TIM15 slave mode control register (TIM15_SMCR) . . . . . | 1414 |
| 39.5.4 | TIM15 DMA/interrupt enable register (TIM15_DIER) . . . . . | 1415 |
| 39.5.5 | TIM15 status register (TIM15_SR) . . . . . | 1416 |
| 39.5.6 | TIM15 event generation register (TIM15_EGR) . . . . . | 1418 |
| 39.5.7 | TIM15 capture/compare mode register 1 [alternate] (TIM15_CCMR1) . . . . . | 1419 |
| 39.5.8 | TIM15 capture/compare mode register 1 [alternate] (TIM15_CCMR1) . . . . . | 1420 |
| 39.5.9 | TIM15 capture/compare enable register (TIM15_CCER) . . . . . | 1423 |
| 39.5.10 | TIM15 counter (TIM15_CNT) . . . . . | 1426 |
| 39.5.11 | TIM15 prescaler (TIM15_PSC) . . . . . | 1426 |
| 39.5.12 | TIM15 auto-reload register (TIM15_ARR) . . . . . | 1426 |
| 39.5.13 | TIM15 repetition counter register (TIM15_RCR) . . . . . | 1427 |
| 39.5.14 | TIM15 capture/compare register 1 (TIM15_CCR1) . . . . . | 1427 |
| 39.5.15 | TIM15 capture/compare register 2 (TIM15_CCR2) . . . . . | 1428 |
| 39.5.16 | TIM15 break and dead-time register (TIM15_BDTR) . . . . . | 1428 |
| 39.5.17 | TIM15 DMA control register (TIM15_DCR) . . . . . | 1431 |
| 39.5.18 | TIM15 DMA address for full transfer (TIM15_DMAR) . . . . . | 1431 |
| 39.5.19 | TIM15 option register 1 (TIM15_OR1) . . . . . | 1432 |
| 39.5.20 | TIM15 option register 2 (TIM15_OR2) . . . . . | 1432 |
| 39.5.21 | TIM15 register map . . . . . | 1434 |
| 39.6 | TIM16/TIM17 registers . . . . . | 1437 |
| 39.6.1 | TIMx control register 1 (TIMx_CR1)(x = 16 to 17) . . . . . | 1437 |
| 39.6.2 | TIMx control register 2 (TIMx_CR2)(x = 16 to 17) . . . . . | 1438 |
| 39.6.3 | TIMx DMA/interrupt enable register (TIMx_DIER)(x = 16 to 17) . . . . . | 1439 |
| 39.6.4 | TIMx status register (TIMx_SR)(x = 16 to 17) . . . . . | 1440 |
| 39.6.5 | TIMx event generation register (TIMx_EGR)(x = 16 to 17) . . . . . | 1441 |
| 39.6.6 | TIMx capture/compare mode register 1 [alternate] (TIMx_CCMR1) (x = 16 to 17) . . . . . | 1442 |
| 39.6.7 | TIMx capture/compare mode register 1 [alternate] (TIMx_CCMR1) (x = 16 to 17) . . . . . | 1443 |
| 39.6.8 | TIMx capture/compare enable register (TIMx_CCER)(x = 16 to 17) . . . . . | 1445 |
| 39.6.9 | TIMx counter (TIMx_CNT)(x = 16 to 17) . . . . . | 1447 |
| 39.6.10 | TIMx prescaler (TIMx_PSC)(x = 16 to 17) . . . . . | 1448 |
| 39.6.11 | TIMx auto-reload register (TIMx_ARR)(x = 16 to 17) . . . . . | 1448 |
| 39.6.12 | TIMx repetition counter register (TIMx_RCR)(x = 16 to 17) . . . . . | 1449 |
| 39.6.13 | TIMx capture/compare register 1 (TIMx_CCR1)(x = 16 to 17) . . . . . | 1449 |
| 39.6.14 | TIMx break and dead-time register (TIMx_BDTR)(x = 16 to 17) . . . . . | 1450 |
| 39.6.15 | TIMx DMA control register (TIMx_DCR)(x = 16 to 17) . . . . . | 1452 |
| 39.6.16 | TIMx DMA address for full transfer (TIMx_DMAR)(x = 16 to 17) . . . . . | 1453 |
| 39.6.17 | TIM16 option register 1 (TIM16_OR1) . . . . . | 1453 |
| 39.6.18 | TIM16 option register 2 (TIM16_OR2) . . . . . | 1454 |
| 39.6.19 | TIM17 option register 1 (TIM17_OR1) . . . . . | 1455 |
| 39.6.20 | TIM17 option register 2 (TIM17_OR2) . . . . . | 1456 |
| 39.6.21 | TIM16/TIM17 register map . . . . . | 1458 |
| 40 | Basic timers (TIM6/TIM7) . . . . . | 1460 |
| 40.1 | TIM6/TIM7 introduction . . . . . | 1460 |
| 40.2 | TIM6/TIM7 main features . . . . . | 1460 |
| 40.3 | TIM6/TIM7 functional description . . . . . | 1461 |
| 40.3.1 | Time-base unit . . . . . | 1461 |
| 40.3.2 | Counting mode . . . . . | 1463 |
| 40.3.3 | UIF bit remapping . . . . . | 1466 |
| 40.3.4 | Clock source . . . . . | 1466 |
| 40.3.5 | Debug mode . . . . . | 1467 |
| 40.4 | TIM6/TIM7 registers . . . . . | 1467 |
| 40.4.1 | TIMx control register 1 (TIMx_CR1)(x = 6 to 7) . . . . . | 1467 |
| 40.4.2 | TIMx control register 2 (TIMx_CR2)(x = 6 to 7) . . . . . | 1469 |
| 40.4.3 | TIMx DMA/Interrupt enable register (TIMx_DIER)(x = 6 to 7) . . . . . | 1469 |
| 40.4.4 | TIMx status register (TIMx_SR)(x = 6 to 7) . . . . . | 1470 |
| 40.4.5 | TIMx event generation register (TIMx_EGR)(x = 6 to 7) . . . . . | 1470 |
| 40.4.6 | TIMx counter (TIMx_CNT)(x = 6 to 7) . . . . . | 1470 |
| 40.4.7 | TIMx prescaler (TIMx_PSC)(x = 6 to 7) . . . . . | 1471 |
| 40.4.8 | TIMx auto-reload register (TIMx_ARR)(x = 6 to 7) . . . . . | 1471 |
| 40.4.9 | TIMx register map . . . . . | 1472 |
| 41 | Low-power timer (LPTIM) applied to STM32L4Rxxx and STM32L4Sxxx only . . . . . | 1473 |
| 41.1 | Introduction . . . . . | 1473 |
| 41.2 | LPTIM main features . . . . . | 1473 |
| 41.3 | LPTIM implementation . . . . . | 1474 |
| 41.4 | LPTIM functional description . . . . . | 1474 |
| 41.4.1 | LPTIM block diagram . . . . . | 1474 |
| 41.4.2 | LPTIM pins and internal signals . . . . . | 1475 |
| 41.4.3 | LPTIM trigger mapping . . . . . | 1475 |
| 41.4.4 | LPTIM reset and clocks . . . . . | 1476 |
| 41.4.5 | Glitch filter . . . . . | 1476 |
| 41.4.6 | Prescaler . . . . . | 1477 |
| 41.4.7 | Trigger multiplexer . . . . . | 1478 |
| 41.4.8 | Operating mode . . . . . | 1478 |
| 41.4.9 | Timeout function . . . . . | 1480 |
| 41.4.10 | Waveform generation . . . . . | 1480 |
| 41.4.11 | Register update . . . . . | 1481 |
| 41.4.12 | Counter mode . . . . . | 1482 |
| 41.4.13 | Timer enable . . . . . | 1482 |
| 41.4.14 | Timer counter reset . . . . . | 1483 |
| 41.4.15 | Encoder mode . . . . . | 1483 |
| 41.4.16 | Debug mode . . . . . | 1485 |
| 41.5 | LPTIM low-power modes . . . . . | 1485 |
| 41.6 | LPTIM interrupts . . . . . | 1486 |
| 41.7 | LPTIM registers . . . . . | 1486 |
| 41.7.1 | LPTIM interrupt and status register (LPTIM_ISR) . . . . . | 1487 |
| 41.7.2 | LPTIM interrupt clear register (LPTIM_ICR) . . . . . | 1488 |
| 41.7.3 | LPTIM interrupt enable register (LPTIM_IER) . . . . . | 1488 |
| 41.7.4 | LPTIM configuration register (LPTIM_CFGR) ..... | 1489 |
| 41.7.5 | LPTIM control register (LPTIM_CR) ..... | 1492 |
| 41.7.6 | LPTIM compare register (LPTIM_CMP) ..... | 1494 |
| 41.7.7 | LPTIM autoreload register (LPTIM_ARR) ..... | 1494 |
| 41.7.8 | LPTIM counter register (LPTIM_CNT) ..... | 1495 |
| 41.7.9 | LPTIM1 option register (LPTIM1_OR) ..... | 1495 |
| 41.7.10 | LPTIM2 option register (LPTIM2_OR) ..... | 1496 |
| 41.7.11 | LPTIM register map ..... | 1497 |
| 42 | Low-power timer (LPTIM) applied to STM32L4P5xx and STM32L4Q5xx only ..... | 1499 |
| 42.1 | Introduction ..... | 1499 |
| 42.2 | LPTIM main features ..... | 1499 |
| 42.3 | LPTIM implementation ..... | 1500 |
| 42.4 | LPTIM functional description ..... | 1500 |
| 42.4.1 | LPTIM block diagram ..... | 1500 |
| 42.4.2 | LPTIM pins and internal signals ..... | 1501 |
| 42.4.3 | LPTIM trigger mapping ..... | 1501 |
| 42.4.4 | LPTIM reset and clocks ..... | 1502 |
| 42.4.5 | Glitch filter ..... | 1502 |
| 42.4.6 | Prescaler ..... | 1503 |
| 42.4.7 | Trigger multiplexer ..... | 1504 |
| 42.4.8 | Operating mode ..... | 1504 |
| 42.4.9 | Timeout function ..... | 1506 |
| 42.4.10 | Waveform generation ..... | 1506 |
| 42.4.11 | Register update ..... | 1507 |
| 42.4.12 | Counter mode ..... | 1508 |
| 42.4.13 | Timer enable ..... | 1509 |
| 42.4.14 | Timer counter reset ..... | 1509 |
| 42.4.15 | Encoder mode ..... | 1510 |
| 42.4.16 | Repetition Counter ..... | 1511 |
| 42.4.17 | Debug mode ..... | 1512 |
| 42.5 | LPTIM low-power modes ..... | 1513 |
| 42.6 | LPTIM interrupts ..... | 1513 |
| 42.7 | LPTIM registers ..... | 1514 |
| 42.7.1 | LPTIM interrupt and status register (LPTIM_ISR) ..... | 1514 |
| 42.7.2 | LPTIM interrupt clear register (LPTIM_ICR) ..... | 1515 |
| 42.7.3 | LPTIM interrupt enable register (LPTIM_IER) ..... | 1516 |
| 42.7.4 | LPTIM configuration register (LPTIM_CFGR) ..... | 1517 |
| 42.7.5 | LPTIM control register (LPTIM_CR) ..... | 1520 |
| 42.7.6 | LPTIM compare register (LPTIM_CMP) ..... | 1521 |
| 42.7.7 | LPTIM autoreload register (LPTIM_ARR) ..... | 1521 |
| 42.7.8 | LPTIM counter register (LPTIM_CNT) ..... | 1522 |
| 42.7.9 | LPTIM1 option register (LPTIM1_OR) ..... | 1522 |
| 42.7.10 | LPTIM2 option register (LPTIM2_OR) ..... | 1523 |
| 42.7.11 | LPTIM repetition register (LPTIM_RCR) ..... | 1523 |
| 42.7.12 | LPTIM register map ..... | 1524 |
| 43 | Infrared interface (IRTIM) ..... | 1526 |
| 44 | Independent watchdog (IWDG) ..... | 1527 |
| 44.1 | Introduction ..... | 1527 |
| 44.2 | IWDG main features ..... | 1527 |
| 44.3 | IWDG functional description ..... | 1527 |
| 44.3.1 | IWDG block diagram ..... | 1527 |
| 44.3.2 | Window option ..... | 1528 |
| 44.3.3 | Hardware watchdog ..... | 1529 |
| 44.3.4 | Low-power freeze ..... | 1529 |
| 44.3.5 | Register access protection ..... | 1529 |
| 44.3.6 | Debug mode ..... | 1529 |
| 44.4 | IWDG registers ..... | 1530 |
| 44.4.1 | IWDG key register (IWDG_KR) ..... | 1530 |
| 44.4.2 | IWDG prescaler register (IWDG_PR) ..... | 1531 |
| 44.4.3 | IWDG reload register (IWDG_RLR) ..... | 1532 |
| 44.4.4 | IWDG status register (IWDG_SR) ..... | 1533 |
| 44.4.5 | IWDG window register (IWDG_WINR) ..... | 1534 |
| 44.4.6 | IWDG register map ..... | 1535 |
| 45 | System window watchdog (WWDG) ..... | 1536 |
| 45.1 | Introduction ..... | 1536 |
| 45.2 | WWDG main features ..... | 1536 |
| 45.3 | WWDG functional description ..... | 1536 |
| 45.3.1 | WWDG block diagram ..... | 1537 |
| 45.3.2 | Enabling the watchdog ..... | 1537 |
| 45.3.3 | Controlling the down-counter ..... | 1537 |
| 45.3.4 | How to program the watchdog timeout ..... | 1537 |
| 45.3.5 | Debug mode ..... | 1539 |
| 45.4 | WWDG interrupts ..... | 1539 |
| 45.5 | WWDG registers ..... | 1539 |
| 45.5.1 | WWDG control register (WWDG_CR) ..... | 1539 |
| 45.5.2 | WWDG configuration register (WWDG_CFR) ..... | 1540 |
| 45.5.3 | WWDG status register (WWDG_SR) ..... | 1540 |
| 45.5.4 | WWDG register map ..... | 1541 |
| 46 | Real-time clock (RTC) applied to STM32L4Rxxx and STM32L4Sxxx only ..... | 1542 |
| 46.1 | Introduction ..... | 1542 |
| 46.2 | RTC main features ..... | 1543 |
| 46.3 | RTC functional description ..... | 1544 |
| 46.3.1 | RTC block diagram ..... | 1544 |
| 46.3.2 | GPIOs controlled by the RTC ..... | 1545 |
| 46.3.3 | Clock and prescalers ..... | 1547 |
| 46.3.4 | Real-time clock and calendar ..... | 1548 |
| 46.3.5 | Programmable alarms ..... | 1548 |
| 46.3.6 | Periodic auto-wakeup ..... | 1548 |
| 46.3.7 | RTC initialization and configuration ..... | 1549 |
| 46.3.8 | Reading the calendar ..... | 1551 |
| 46.3.9 | Resetting the RTC ..... | 1552 |
| 46.3.10 | RTC synchronization ..... | 1552 |
| 46.3.11 | RTC reference clock detection ..... | 1553 |
| 46.3.12 | RTC smooth digital calibration ..... | 1553 |
| 46.3.13 | Time-stamp function ..... | 1555 |
| 46.3.14 | Tamper detection ..... | 1556 |
| 46.3.15 | Calibration clock output ..... | 1558 |
| 46.3.16 | Alarm output ..... | 1559 |
| 46.4 | RTC low-power modes ..... | 1559 |
| 46.5 | RTC interrupts ..... | 1560 |
| 46.6 | RTC registers ..... | 1561 |
| 46.6.1 | RTC time register (RTC_TR) ..... | 1561 |
- 46.6.2 RTC date register (RTC_DR) . . . . . 1562
- 46.6.3 RTC control register (RTC_CR) . . . . . 1563
- 46.6.4 RTC initialization and status register (RTC_ISR) . . . . . 1566
- 46.6.5 RTC prescaler register (RTC_PRER) . . . . . 1569
- 46.6.6 RTC wakeup timer register (RTC_WUTR) . . . . . 1570
- 46.6.7 RTC alarm A register (RTC_ALRMAR) . . . . . 1571
- 46.6.8 RTC alarm B register (RTC_ALRMBR) . . . . . 1572
- 46.6.9 RTC write protection register (RTC_WPR) . . . . . 1573
- 46.6.10 RTC sub second register (RTC_SSR) . . . . . 1573
- 46.6.11 RTC shift control register (RTC_SHIFTR) . . . . . 1574
- 46.6.12 RTC timestamp time register (RTC_TSTR) . . . . . 1575
- 46.6.13 RTC timestamp date register (RTC_TSDR) . . . . . 1576
- 46.6.14 RTC time-stamp sub second register (RTC_TSSSR) . . . . . 1577
- 46.6.15 RTC calibration register (RTC_CALR) . . . . . 1578
- 46.6.16 RTC tamper configuration register (RTC_TAMPCR) . . . . . 1579
- 46.6.17 RTC alarm A sub second register (RTC_ALRMASSR) . . . . . 1582
- 46.6.18 RTC alarm B sub second register (RTC_ALRMBSSR) . . . . . 1583
- 46.6.19 RTC option register (RTC_OR) . . . . . 1584
- 46.6.20 RTC backup registers (RTC_BKPxR) . . . . . 1584
- 46.6.21 RTC register map . . . . . 1585
47 Real-time clock (RTC) applied to STM32L4P5xx and STM32L4Q5xx only . . . . . 1587
- 47.1 Introduction . . . . . 1587
- 47.2 RTC main features . . . . . 1587
- 47.3 RTC functional description . . . . . 1588
- 47.3.1 RTC block diagram . . . . . 1588
- 47.3.2 RTC pins and internal signals . . . . . 1589
- 47.3.3 GPIOs controlled by the RTC and TAMP . . . . . 1590
- 47.3.4 Clock and prescalers . . . . . 1592
- 47.3.5 Real-time clock and calendar . . . . . 1593
- 47.3.6 Calendar ultra-low power mode . . . . . 1594
- 47.3.7 Programmable alarms . . . . . 1594
- 47.3.8 Periodic auto-wakeup . . . . . 1594
- 47.3.9 RTC initialization and configuration . . . . . 1595
- 47.3.10 Reading the calendar . . . . . 1598
- 47.3.11 Resetting the RTC . . . . . 1599
| 47.3.12 | RTC synchronization . . . . . | 1599 |
| 47.3.13 | RTC reference clock detection . . . . . | 1599 |
| 47.3.14 | RTC smooth digital calibration . . . . . | 1600 |
| 47.3.15 | Timestamp function . . . . . | 1602 |
| 47.3.16 | Calibration clock output . . . . . | 1603 |
| 47.3.17 | Tamper and alarm output . . . . . | 1604 |
| 47.4 | RTC low-power modes . . . . . | 1604 |
| 47.5 | RTC interrupts . . . . . | 1605 |
| 47.6 | RTC registers . . . . . | 1606 |
| 47.6.1 | RTC time register (RTC_TR) . . . . . | 1606 |
| 47.6.2 | RTC date register (RTC_DR) . . . . . | 1607 |
| 47.6.3 | RTC sub second register (RTC_SSR) . . . . . | 1608 |
| 47.6.4 | RTC initialization control and status register (RTC_ICSR) . . . . . | 1608 |
| 47.6.5 | RTC prescaler register (RTC_PRER) . . . . . | 1610 |
| 47.6.6 | RTC wakeup timer register (RTC_WUTR) . . . . . | 1611 |
| 47.6.7 | RTC control register (RTC_CR) . . . . . | 1611 |
| 47.6.8 | RTC write protection register (RTC_WPR) . . . . . | 1615 |
| 47.6.9 | RTC calibration register (RTC_CALR) . . . . . | 1615 |
| 47.6.10 | RTC shift control register (RTC_SHIFTR) . . . . . | 1616 |
| 47.6.11 | RTC timestamp time register (RTC_TSTR) . . . . . | 1617 |
| 47.6.12 | RTC timestamp date register (RTC_TSDR) . . . . . | 1618 |
| 47.6.13 | RTC timestamp sub second register (RTC_TSSSR) . . . . . | 1618 |
| 47.6.14 | RTC alarm A register (RTC_ALRMAR) . . . . . | 1619 |
| 47.6.15 | RTC alarm A sub second register (RTC_ALRMASSR) . . . . . | 1620 |
| 47.6.16 | RTC alarm B register (RTC_ALRMBR) . . . . . | 1621 |
| 47.6.17 | RTC alarm B sub second register (RTC_ALRMBSSR) . . . . . | 1622 |
| 47.6.18 | RTC status register (RTC_SR) . . . . . | 1623 |
| 47.6.19 | RTC masked interrupt status register (RTC_MISR) . . . . . | 1624 |
| 47.6.20 | RTC status clear register (RTC_SCR) . . . . . | 1625 |
| 47.6.21 | RTC alarm A binary mode register (RTC_ALRABINR) . . . . . | 1626 |
| 47.6.22 | RTC alarm B binary mode register (RTC_ALRBBINR) . . . . . | 1626 |
| 47.6.23 | RTC register map . . . . . | 1627 |
| 48 | Tamper and backup registers (TAMP) applied to STM32L4P5xx and STM32L4Q5xx only . . . . . | 1629 |
| 48.1 | Introduction . . . . . | 1629 |
| 48.2 | TAMP main features . . . . . | 1629 |
| 48.3 | TAMP functional description . . . . . | 1630 |
| 48.3.1 | TAMP block diagram . . . . . | 1630 |
| 48.3.2 | TAMP pins and internal signals . . . . . | 1630 |
| 48.3.3 | TAMP register write protection . . . . . | 1631 |
| 48.3.4 | Tamper detection . . . . . | 1631 |
| 48.4 | TAMP low-power modes . . . . . | 1634 |
| 48.5 | TAMP interrupts . . . . . | 1634 |
| 48.6 | TAMP registers . . . . . | 1634 |
| 48.6.1 | TAMP control register 1 (TAMP_CR1) . . . . . | 1635 |
| 48.6.2 | TAMP control register 2 (TAMP_CR2) . . . . . | 1636 |
| 48.6.3 | TAMP filter control register (TAMP_FLTCR) . . . . . | 1637 |
| 48.6.4 | TAMP interrupt enable register (TAMP_IER) . . . . . | 1638 |
| 48.6.5 | TAMP status register (TAMP_SR) . . . . . | 1639 |
| 48.6.6 | TAMP masked interrupt status register (TAMP_MISR) . . . . . | 1640 |
| 48.6.7 | TAMP status clear register (TAMP_SCR) . . . . . | 1641 |
| 48.6.8 | TAMP backup x register (TAMP_BKPxR) . . . . . | 1641 |
| 48.6.9 | TAMP register map . . . . . | 1643 |
| 49 | Inter-integrated circuit (I2C) interface . . . . . | 1644 |
| 49.1 | Introduction . . . . . | 1644 |
| 49.2 | I2C main features . . . . . | 1644 |
| 49.3 | I2C implementation . . . . . | 1645 |
| 49.4 | I2C functional description . . . . . | 1645 |
| 49.4.1 | I2C block diagram . . . . . | 1646 |
| 49.4.2 | I2C pins and internal signals . . . . . | 1647 |
| 49.4.3 | I2C clock requirements . . . . . | 1647 |
| 49.4.4 | Mode selection . . . . . | 1648 |
| 49.4.5 | I2C initialization . . . . . | 1648 |
| 49.4.6 | Software reset . . . . . | 1653 |
| 49.4.7 | Data transfer . . . . . | 1654 |
| 49.4.8 | I2C slave mode . . . . . | 1656 |
| 49.4.9 | I2C master mode . . . . . | 1665 |
| 49.4.10 | I2C_TIMINGR register configuration examples . . . . . | 1677 |
| 49.4.11 | SMBus specific features . . . . . | 1678 |
| 49.4.12 | SMBus initialization . . . . . | 1681 |
| 49.4.13 | SMBus: I2C_TIMEOUTR register configuration examples . . . . . | 1683 |
| 49.4.14 | SMBus slave mode . . . . . | 1684 |
| 49.4.15 | Wakeup from Stop mode on address match . . . . . | 1691 |
| 49.4.16 | Error conditions . . . . . | 1691 |
| 49.4.17 | DMA requests . . . . . | 1693 |
| 49.4.18 | Debug mode . . . . . | 1694 |
| 49.5 | I2C low-power modes . . . . . | 1694 |
| 49.6 | I2C interrupts . . . . . | 1695 |
| 49.7 | I2C registers . . . . . | 1696 |
| 49.7.1 | I2C control register 1 (I2C_CR1) . . . . . | 1696 |
| 49.7.2 | I2C control register 2 (I2C_CR2) . . . . . | 1699 |
| 49.7.3 | I2C own address 1 register (I2C_OAR1) . . . . . | 1701 |
| 49.7.4 | I2C own address 2 register (I2C_OAR2) . . . . . | 1702 |
| 49.7.5 | I2C timing register (I2C_TIMINGR) . . . . . | 1703 |
| 49.7.6 | I2C timeout register (I2C_TIMEOUTR) . . . . . | 1704 |
| 49.7.7 | I2C interrupt and status register (I2C_ISR) . . . . . | 1705 |
| 49.7.8 | I2C interrupt clear register (I2C_ICR) . . . . . | 1707 |
| 49.7.9 | I2C PEC register (I2C_PECR) . . . . . | 1708 |
| 49.7.10 | I2C receive data register (I2C_RXDR) . . . . . | 1709 |
| 49.7.11 | I2C transmit data register (I2C_TXDR) . . . . . | 1709 |
| 49.7.12 | I2C register map . . . . . | 1710 |
| 50 | Universal synchronous/asynchronous receiver transmitter (USART/UART) . . . . . | 1712 |
| 50.1 | USART introduction . . . . . | 1712 |
| 50.2 | USART main features . . . . . | 1713 |
| 50.3 | USART extended features . . . . . | 1714 |
| 50.4 | USART implementation . . . . . | 1714 |
| 50.5 | USART functional description . . . . . | 1715 |
| 50.5.1 | USART block diagram . . . . . | 1715 |
| 50.5.2 | USART signals . . . . . | 1716 |
| 50.5.3 | USART character description . . . . . | 1717 |
| 50.5.4 | USART FIFOs and thresholds . . . . . | 1719 |
| 50.5.5 | USART transmitter . . . . . | 1719 |
| 50.5.6 | USART receiver . . . . . | 1723 |
| 50.5.7 | USART baud rate generation . . . . . | 1730 |
| 50.5.8 | Tolerance of the USART receiver to clock deviation . . . . . | 1731 |
- 50.5.9 USART Auto baud rate detection . . . . . 1733
- 50.5.10 USART multiprocessor communication . . . . . 1735
- 50.5.11 USART Modbus communication . . . . . 1737
- 50.5.12 USART parity control . . . . . 1738
- 50.5.13 USART LIN (local interconnection network) mode . . . . . 1739
- 50.5.14 USART synchronous mode . . . . . 1741
- 50.5.15 USART single-wire Half-duplex communication . . . . . 1745
- 50.5.16 USART receiver timeout . . . . . 1745
- 50.5.17 USART Smartcard mode . . . . . 1746
- 50.5.18 USART IrDA SIR ENDEC block . . . . . 1750
- 50.5.19 Continuous communication using USART and DMA . . . . . 1753
- 50.5.20 RS232 Hardware flow control and RS485 Driver Enable . . . . . 1755
- 50.5.21 USART low-power management . . . . . 1758
- 50.6 USART in low-power modes . . . . . 1761
- 50.7 USART interrupts . . . . . 1762
- 50.8 USART registers . . . . . 1763
- 50.8.1 USART control register 1 [alternate] (USART_CR1) . . . . . 1763
- 50.8.2 USART control register 1 [alternate] (USART_CR1) . . . . . 1767
- 50.8.3 USART control register 2 (USART_CR2) . . . . . 1770
- 50.8.4 USART control register 3 (USART_CR3) . . . . . 1774
- 50.8.5 USART baud rate register (USART_BRR) . . . . . 1779
- 50.8.6 USART guard time and prescaler register (USART_GTPR) . . . . . 1779
- 50.8.7 USART receiver timeout register (USART_RTOR) . . . . . 1780
- 50.8.8 USART request register (USART_RQR) . . . . . 1781
- 50.8.9 USART interrupt and status register [alternate] (USART_ISR) . . . . . 1782
- 50.8.10 USART interrupt and status register [alternate] (USART_ISR) . . . . . 1788
- 50.8.11 USART interrupt flag clear register (USART_ICR) . . . . . 1793
- 50.8.12 USART receive data register (USART_RDR) . . . . . 1795
- 50.8.13 USART transmit data register (USART_TDR) . . . . . 1795
- 50.8.14 USART prescaler register (USART_PRESC) . . . . . 1796
- 50.8.15 USART register map . . . . . 1797
- 51 Low-power universal asynchronous receiver transmitter (LPUART) . . . . . 1799
- 51.1 LPUART introduction . . . . . 1799
- 51.2 LPUART main features . . . . . 1800
- 51.3 LPUART implementation . . . . . 1801
| 51.4 | LPUART functional description . . . . . | 1802 |
| 51.4.1 | LPUART block diagram . . . . . | 1802 |
| 51.4.2 | LPUART signals . . . . . | 1803 |
| 51.4.3 | LPUART character description . . . . . | 1803 |
| 51.4.4 | LPUART FIFOs and thresholds . . . . . | 1804 |
| 51.4.5 | LPUART transmitter . . . . . | 1805 |
| 51.4.6 | LPUART receiver . . . . . | 1808 |
| 51.4.7 | LPUART baud rate generation . . . . . | 1812 |
| 51.4.8 | Tolerance of the LPUART receiver to clock deviation . . . . . | 1813 |
| 51.4.9 | LPUART multiprocessor communication . . . . . | 1814 |
| 51.4.10 | LPUART parity control . . . . . | 1816 |
| 51.4.11 | LPUART single-wire Half-duplex communication . . . . . | 1817 |
| 51.4.12 | Continuous communication using DMA and LPUART . . . . . | 1817 |
| 51.4.13 | RS232 Hardware flow control and RS485 Driver Enable . . . . . | 1820 |
| 51.4.14 | LPUART low-power management . . . . . | 1822 |
| 51.5 | LPUART in low-power modes . . . . . | 1825 |
| 51.6 | LPUART interrupts . . . . . | 1826 |
| 51.7 | LPUART registers . . . . . | 1827 |
| 51.7.1 | LPUART control register 1 [alternate] (LPUART_CR1) . . . . . | 1827 |
| 51.7.2 | LPUART control register 1 [alternate] (LPUART_CR1) . . . . . | 1830 |
| 51.7.3 | LPUART control register 2 (LPUART_CR2) . . . . . | 1833 |
| 51.7.4 | LPUART control register 3 (LPUART_CR3) . . . . . | 1835 |
| 51.7.5 | LPUART baud rate register (LPUART_BRR) . . . . . | 1838 |
| 51.7.6 | LPUART request register (LPUART_RQR) . . . . . | 1839 |
| 51.7.7 | LPUART interrupt and status register [alternate] (LPUART_ISR) . . . . . | 1839 |
| 51.7.8 | LPUART interrupt and status register [alternate] (LPUART_ISR) . . . . . | 1844 |
| 51.7.9 | LPUART interrupt flag clear register (LPUART_ICR) . . . . . | 1847 |
| 51.7.10 | LPUART receive data register (LPUART_RDR) . . . . . | 1848 |
| 51.7.11 | LPUART transmit data register (LPUART_TDR) . . . . . | 1848 |
| 51.7.12 | LPUART prescaler register (LPUART_PRESC) . . . . . | 1849 |
| 51.7.13 | LPUART register map . . . . . | 1850 |
| 52 | Serial peripheral interface (SPI) . . . . . | 1852 |
| 52.1 | Introduction . . . . . | 1852 |
| 52.2 | SPI main features . . . . . | 1852 |
| 52.3 | SPI implementation . . . . . | 1852 |
| 52.4 | SPI functional description . . . . . | 1853 |
| 52.4.1 | General description . . . . . | 1853 |
| 52.4.2 | Communications between one master and one slave . . . . . | 1854 |
| 52.4.3 | Standard multi-slave communication . . . . . | 1856 |
| 52.4.4 | Multi-master communication . . . . . | 1857 |
| 52.4.5 | Slave select (NSS) pin management . . . . . | 1858 |
| 52.4.6 | Communication formats . . . . . | 1859 |
| 52.4.7 | Configuration of SPI . . . . . | 1861 |
| 52.4.8 | Procedure for enabling SPI . . . . . | 1862 |
| 52.4.9 | Data transmission and reception procedures . . . . . | 1862 |
| 52.4.10 | SPI status flags . . . . . | 1872 |
| 52.4.11 | SPI error flags . . . . . | 1873 |
| 52.4.12 | NSS pulse mode . . . . . | 1874 |
| 52.4.13 | TI mode . . . . . | 1874 |
| 52.4.14 | CRC calculation . . . . . | 1875 |
| 52.5 | SPI interrupts . . . . . | 1877 |
| 52.6 | SPI registers . . . . . | 1878 |
| 52.6.1 | SPI control register 1 (SPIx_CR1) . . . . . | 1878 |
| 52.6.2 | SPI control register 2 (SPIx_CR2) . . . . . | 1880 |
| 52.6.3 | SPI status register (SPIx_SR) . . . . . | 1882 |
| 52.6.4 | SPI data register (SPIx_DR) . . . . . | 1883 |
| 52.6.5 | SPI CRC polynomial register (SPIx_CRCPR) . . . . . | 1884 |
| 52.6.6 | SPI Rx CRC register (SPIx_RXCRCR) . . . . . | 1884 |
| 52.6.7 | SPI Tx CRC register (SPIx_TXCRCR) . . . . . | 1884 |
| 52.6.8 | SPI register map . . . . . | 1886 |
| 53 | Serial audio interface (SAI) . . . . . | 1887 |
| 53.1 | Introduction . . . . . | 1887 |
| 53.2 | SAI main features . . . . . | 1887 |
| 53.3 | SAI implementation . . . . . | 1888 |
| 53.4 | SAI functional description . . . . . | 1888 |
| 53.4.1 | SAI block diagram . . . . . | 1888 |
| 53.4.2 | SAI pins and internal signals . . . . . | 1890 |
| 53.4.3 | Main SAI modes . . . . . | 1890 |
| 53.4.4 | SAI synchronization mode . . . . . | 1891 |
| 53.4.5 | Audio data size . . . . . | 1892 |
| 53.4.6 | Frame synchronization . . . . . | 1893 |
| 53.4.7 | Slot configuration . . . . . | 1896 |
| 53.4.8 | SAI clock generator . . . . . | 1898 |
| 53.4.9 | Internal FIFOs . . . . . | 1900 |
| 53.4.10 | PDM interface . . . . . | 1902 |
| 53.4.11 | AC'97 link controller . . . . . | 1910 |
| 53.4.12 | SPDIF output . . . . . | 1912 |
| 53.4.13 | Specific features . . . . . | 1915 |
| 53.4.14 | Error flags . . . . . | 1919 |
| 53.4.15 | Disabling the SAI . . . . . | 1922 |
| 53.4.16 | SAI DMA interface . . . . . | 1922 |
| 53.5 | SAI interrupts . . . . . | 1923 |
| 53.6 | SAI registers . . . . . | 1925 |
| 53.6.1 | SAI global configuration register (SAI_GCR) . . . . . | 1925 |
| 53.6.2 | SAI configuration register 1 (SAI_ACR1) . . . . . | 1925 |
| 53.6.3 | SAI configuration register 1 (SAI_BCR1) . . . . . | 1928 |
| 53.6.4 | SAI configuration register 2 (SAI_ACR2) . . . . . | 1931 |
| 53.6.5 | SAI configuration register 2 (SAI_BCR2) . . . . . | 1933 |
| 53.6.6 | SAI frame configuration register (SAI_AFR) . . . . . | 1935 |
| 53.6.7 | SAI frame configuration register (SAI_BFR) . . . . . | 1936 |
| 53.6.8 | SAI slot register (SAI_ASLOTR) . . . . . | 1937 |
| 53.6.9 | SAI slot register (SAI_BSLOTR) . . . . . | 1938 |
| 53.6.10 | SAI interrupt mask register (SAI_AIM) . . . . . | 1939 |
| 53.6.11 | SAI interrupt mask register (SAI_BIM) . . . . . | 1941 |
| 53.6.12 | SAI status register (SAI_ASR) . . . . . | 1942 |
| 53.6.13 | SAI status register (SAI_BSR) . . . . . | 1944 |
| 53.6.14 | SAI clear flag register (SAI_ACLRFR) . . . . . | 1946 |
| 53.6.15 | SAI clear flag register (SAI_BCLRFR) . . . . . | 1947 |
| 53.6.16 | SAI data register (SAI_ADR) . . . . . | 1948 |
| 53.6.17 | SAI data register (SAI_BDR) . . . . . | 1949 |
| 53.6.18 | SAI PDM control register (SAI_PDMCR) . . . . . | 1949 |
| 53.6.19 | SAI PDM delay register (SAI_PDMPLY) . . . . . | 1950 |
| 53.6.20 | SAI register map . . . . . | 1953 |
| 54 | Secure digital input/output MultiMediaCard interface (SDMMC) . . . | 1955 |
| 54.1 | SDMMC main features . . . . . | 1955 |
| 54.2 | SDMMC implementation . . . . . | 1955 |
| 54.3 | SDMMC bus topology . . . . . | 1956 |
| 54.4 | SDMMC operation modes . . . . . | 1958 |
| 54.5 | SDMMC functional description . . . . . | 1958 |
| 54.5.1 | SDMMC block diagram . . . . . | 1959 |
| 54.5.2 | SDMMC pins and internal signals . . . . . | 1959 |
| 54.5.3 | General description . . . . . | 1960 |
| 54.5.4 | SDMMC adapter . . . . . | 1961 |
| 54.5.5 | SDMMC AHB slave interface . . . . . | 1983 |
| 54.5.6 | SDMMC AHB master interface . . . . . | 1983 |
| 54.5.7 | AHB and SDMMC_CK clock relation . . . . . | 1985 |
| 54.6 | Card functional description . . . . . | 1986 |
| 54.6.1 | SD I/O mode . . . . . | 1986 |
| 54.6.2 | CMD12 send timing . . . . . | 1994 |
| 54.6.3 | Sleep (CMD5) . . . . . | 1997 |
| 54.6.4 | Interrupt mode (Wait-IRQ) . . . . . | 1998 |
| 54.6.5 | Boot operation . . . . . | 1999 |
| 54.6.6 | Response R1b handling . . . . . | 2002 |
| 54.6.7 | Reset and card cycle power . . . . . | 2003 |
| 54.7 | Hardware flow control . . . . . | 2004 |
| 54.8 | Ultra-high-speed phase I (UHS-I) voltage switch . . . . . | 2005 |
| 54.9 | SDMMC interrupts . . . . . | 2008 |
| 54.10 | SDMMC registers . . . . . | 2010 |
| 54.10.1 | SDMMC power control register (SDMMC_POWER) . . . . . | 2010 |
| 54.10.2 | SDMMC clock control register (SDMMC_CLKCR) . . . . . | 2011 |
| 54.10.3 | SDMMC argument register (SDMMC_ARGR) . . . . . | 2013 |
| 54.10.4 | SDMMC command register (SDMMC_CMDR) . . . . . | 2013 |
| 54.10.5 | SDMMC command response register (SDMMC_RESPCMDR) . . . . . | 2015 |
| 54.10.6 | SDMMC response x register (SDMMC_RESPxR) . . . . . | 2016 |
| 54.10.7 | SDMMC data timer register (SDMMC_DTIMER) . . . . . | 2016 |
| 54.10.8 | SDMMC data length register (SDMMC_DLENR) . . . . . | 2017 |
| 54.10.9 | SDMMC data control register (SDMMC_DCTRL) . . . . . | 2018 |
| 54.10.10 | SDMMC data counter register (SDMMC_DCNTR) . . . . . | 2019 |
| 54.10.11 | SDMMC status register (SDMMC_STAR) . . . . . | 2020 |
| 54.10.12 | SDMMC interrupt clear register (SDMMC_ICR) . . . . . | 2023 |
| 54.10.13 | SDMMC mask register (SDMMC_MASKR) . . . . . | 2025 |
| 54.10.14 | SDMMC acknowledgment timer register (SDMMC_ACKTIMER) . . . . . | 2028 |
| 54.10.15 | SDMMC data FIFO registers x (SDMMC_FIFORx) . . . . . | 2028 |
| 54.10.16 | SDMMC DMA control register (SDMMC_IDMACTLRLR) . . . . . | 2029 |
| 54.10.17 | SDMMC IDMA buffer size register (SDMMC_IDMABSIZER) . . . . . | 2030 |
| 54.10.18 | SDMMC IDMA buffer 0 base address register (SDMMC_IDMABASE0R) . . . . . | 2030 |
| 54.10.19 | SDMMC IDMA buffer 1 base address register (SDMMC_IDMABASE1R) . . . . . | 2031 |
| 54.10.20 | SDMMC register map . . . . . | 2032 |
| 55 | Controller area network (bxCAN) . . . . . | 2035 |
| 55.1 | Introduction . . . . . | 2035 |
| 55.2 | bxCAN main features . . . . . | 2035 |
| 55.3 | bxCAN general description . . . . . | 2036 |
| 55.3.1 | CAN 2.0B active core . . . . . | 2036 |
| 55.3.2 | Control, status and configuration registers . . . . . | 2036 |
| 55.3.3 | Tx mailboxes . . . . . | 2036 |
| 55.3.4 | Acceptance filters . . . . . | 2037 |
| 55.4 | bxCAN operating modes . . . . . | 2038 |
| 55.4.1 | Initialization mode . . . . . | 2038 |
| 55.4.2 | Normal mode . . . . . | 2038 |
| 55.4.3 | Sleep mode (low-power) . . . . . | 2039 |
| 55.5 | Test mode . . . . . | 2040 |
| 55.5.1 | Silent mode . . . . . | 2040 |
| 55.5.2 | Loop back mode . . . . . | 2040 |
| 55.5.3 | Loop back combined with silent mode . . . . . | 2041 |
| 55.6 | Behavior in debug mode . . . . . | 2041 |
| 55.7 | bxCAN functional description . . . . . | 2041 |
| 55.7.1 | Transmission handling . . . . . | 2041 |
| 55.7.2 | Time triggered communication mode . . . . . | 2043 |
| 55.7.3 | Reception handling . . . . . | 2043 |
| 55.7.4 | Identifier filtering . . . . . | 2045 |
| 55.7.5 | Message storage . . . . . | 2049 |
| 55.7.6 | Error management . . . . . | 2050 |
| 55.7.7 | Bit timing . . . . . | 2050 |
| 55.8 | bxCAN interrupts . . . . . | 2054 |
| 55.9 | CAN registers . . . . . | 2055 |
| 55.9.1 | Register access protection . . . . . | 2055 |
- 55.9.2 CAN control and status registers . . . . . 2055
- 55.9.3 CAN mailbox registers . . . . . 2066
- 55.9.4 CAN filter registers . . . . . 2071
- 55.9.5 bxCAN register map . . . . . 2075
- 56 USB on-the-go full-speed (OTG_FS) . . . . . 2079
- 56.1 Introduction . . . . . 2079
- 56.2 OTG_FS main features . . . . . 2080
- 56.2.1 General features . . . . . 2080
- 56.2.2 Host-mode features . . . . . 2081
- 56.2.3 Peripheral-mode features . . . . . 2081
- 56.3 OTG_FS implementation . . . . . 2082
- 56.4 OTG_FS functional description . . . . . 2083
- 56.4.1 OTG_FS block diagram . . . . . 2083
- 56.4.2 OTG_FS pin and internal signals . . . . . 2083
- 56.4.3 OTG_FS core . . . . . 2084
- 56.4.4 Embedded full-speed OTG PHY connected to OTG_FS . . . . . 2084
- 56.4.5 OTG detections . . . . . 2085
- 56.5 OTG_FS dual role device (DRD) . . . . . 2085
- 56.5.1 ID line detection . . . . . 2085
- 56.5.2 HNP dual role device . . . . . 2086
- 56.5.3 SRP dual role device . . . . . 2086
- 56.6 OTG_FS as a USB peripheral . . . . . 2086
- 56.6.1 SRP-capable peripheral . . . . . 2087
- 56.6.2 Peripheral states . . . . . 2087
- 56.6.3 Peripheral endpoints . . . . . 2088
- 56.7 OTG_FS as a USB host . . . . . 2090
- 56.7.1 SRP-capable host . . . . . 2091
- 56.7.2 USB host states . . . . . 2091
- 56.7.3 Host channels . . . . . 2093
- 56.7.4 Host scheduler . . . . . 2094
- 56.8 OTG_FS SOF trigger . . . . . 2095
- 56.8.1 Host SOFs . . . . . 2095
- 56.8.2 Peripheral SOFs . . . . . 2095
- 56.9 OTG_FS low-power modes . . . . . 2096
- 56.10 OTG_FS Dynamic update of the OTG_HFIR register . . . . . 2097
| 56.11 | OTG_FS data FIFOs . . . . . | 2097 |
| 56.11.1 | Peripheral FIFO architecture . . . . . | 2098 |
| 56.11.2 | Host FIFO architecture . . . . . | 2099 |
| 56.11.3 | FIFO RAM allocation . . . . . | 2100 |
| 56.12 | OTG_FS system performance . . . . . | 2102 |
| 56.13 | OTG_FS interrupts . . . . . | 2102 |
| 56.14 | OTG_FS control and status registers . . . . . | 2104 |
| 56.14.1 | CSR memory map . . . . . | 2104 |
| 56.15 | OTG_FS registers . . . . . | 2109 |
| 56.15.1 | OTG control and status register (OTG_GOTGCTL) . . . . . | 2109 |
| 56.15.2 | OTG interrupt register (OTG_GOTGINT) . . . . . | 2112 |
| 56.15.3 | OTG AHB configuration register (OTG_GAHBCFG) . . . . . | 2113 |
| 56.15.4 | OTG USB configuration register (OTG_GUSBCFG) . . . . . | 2114 |
| 56.15.5 | OTG reset register (OTG_GRSTCTL) . . . . . | 2116 |
| 56.15.6 | OTG core interrupt register (OTG_GINTSTS) . . . . . | 2118 |
| 56.15.7 | OTG interrupt mask register (OTG_GINTMSK) . . . . . | 2122 |
| 56.15.8 | OTG receive status debug read register (OTG_GRXSTSR) . . . . . | 2125 |
| 56.15.9 | OTG receive status debug read [alternate] (OTG_GRXSTSR) . . . . . | 2126 |
| 56.15.10 | OTG status read and pop registers (OTG_GRXSTSP) . . . . . | 2127 |
| 56.15.11 | OTG status read and pop registers [alternate] (OTG_GRXSTSP) . . . . . | 2128 |
| 56.15.12 | OTG receive FIFO size register (OTG_GRXFSIZ) . . . . . | 2129 |
| 56.15.13 | OTG host non-periodic transmit FIFO size register (OTG_HNPTXFSIZ)/Endpoint 0 Transmit FIFO size (OTG_DIEPTXF0) . . . . . | 2129 |
| 56.15.14 | OTG non-periodic transmit FIFO/queue status register (OTG_HNPTXSTS) . . . . . | 2130 |
| 56.15.15 | OTG general core configuration register (OTG_GCCFG) . . . . . | 2131 |
| 56.15.16 | OTG core ID register (OTG_CID) . . . . . | 2133 |
| 56.15.17 | OTG core LPM configuration register (OTG_GLPMCFG) . . . . . | 2133 |
| 56.15.18 | OTG power down register (OTG_GPWRDN) . . . . . | 2137 |
| 56.15.19 | OTG ADP timer, control and status register (OTG_GADPCTL) . . . . . | 2137 |
| 56.15.20 | OTG host periodic transmit FIFO size register (OTG_HPTXFSIZ) . . . . . | 2139 |
| 56.15.21 | OTG device IN endpoint transmit FIFO x size register (OTG_DIEPTXFx) . . . . . | 2140 |
| 56.15.22 | Host-mode registers . . . . . | 2140 |
| 56.15.23 | OTG host configuration register (OTG_HCFG) . . . . . | 2140 |
| 56.15.24 | OTG host frame interval register (OTG_HFIR) . . . . . | 2141 |
| 56.15.25 | OTG host frame number/frame time remaining register (OTG_HFNUM) . . . . . | 2142 |
| 56.15.26 | OTG_Host periodic transmit FIFO/queue status register (OTG_HPTXSTS) . . . . . | 2143 |
| 56.15.27 | OTG host all channels interrupt register (OTG_HAINT) . . . . . | 2144 |
| 56.15.28 | OTG host all channels interrupt mask register (OTG_HAINTMSK) . . . . . | 2144 |
| 56.15.29 | OTG host port control and status register (OTG_HPRT) . . . . . | 2145 |
| 56.15.30 | OTG host channel x characteristics register (OTG_HCCHARx) . . . . . | 2147 |
| 56.15.31 | OTG host channel x interrupt register (OTG_HCINTx) . . . . . | 2148 |
| 56.15.32 | OTG host channel x interrupt mask register (OTG_HCINTMSKx) . . . . . | 2149 |
| 56.15.33 | OTG host channel x transfer size register (OTG_HCTSIZx) . . . . . | 2150 |
| 56.15.34 | Device-mode registers . . . . . | 2151 |
| 56.15.35 | OTG device configuration register (OTG_DCFG) . . . . . | 2151 |
| 56.15.36 | OTG device control register (OTG_DCTL) . . . . . | 2153 |
| 56.15.37 | OTG device status register (OTG_DSTS) . . . . . | 2155 |
| 56.15.38 | OTG device IN endpoint common interrupt mask register (OTG_DIEPMSK) . . . . . | 2156 |
| 56.15.39 | OTG device OUT endpoint common interrupt mask register (OTG_DOEPMSK) . . . . . | 2157 |
| 56.15.40 | OTG device all endpoints interrupt register (OTG_Daint) . . . . . | 2158 |
| 56.15.41 | OTG all endpoints interrupt mask register (OTG_DaintMSK) . . . . . | 2159 |
| 56.15.42 | OTG device V
BUS
discharge time register (OTG_DVBUSDIS) . . . . . | 2159 |
| 56.15.43 | OTG device V
BUS
pulsing time register (OTG_DVBUSPULSE) . . . . . | 2160 |
| 56.15.44 | OTG device IN endpoint FIFO empty interrupt mask register (OTG_DIEPMPMSK) . . . . . | 2160 |
| 56.15.45 | OTG device control IN endpoint 0 control register (OTG_DIEPCTL0) . . . . . | 2161 |
| 56.15.46 | OTG device IN endpoint x control register (OTG_DIEPCTLx) . . . . . | 2162 |
| 56.15.47 | OTG device IN endpoint x interrupt register (OTG_DIEPINTx) . . . . . | 2165 |
| 56.15.48 | OTG device IN endpoint 0 transfer size register (OTG_DIEPTSIZ0) . . . . . | 2166 |
| 56.15.49 | OTG device IN endpoint transmit FIFO status register (OTG_DTXFSTSx) . . . . . | 2167 |
| 56.15.50 | OTG device IN endpoint x transfer size register (OTG_DIEPTSIZx) . . . . . | 2168 |
| 56.15.51 | OTG device control OUT endpoint 0 control register (OTG_DOEPCTL0) . . . . . | 2169 |
| 56.15.52 | OTG device OUT endpoint x interrupt register (OTG_DOEPINTx) . . . | 2170 |
| 56.15.53 | OTG device OUT endpoint 0 transfer size register (OTG_DOEPTSIZ0) . . . . . | 2172 |
| 56.15.54 | OTG device OUT endpoint x control register (OTG_DOEPCTLx) . . . . . | 2173 |
| 56.15.55 | OTG device OUT endpoint x transfer size register (OTG_DOEPTSIZx) . . . . . | 2175 |
| 56.15.56 | OTG power and clock gating control register (OTG_PCGCCTL) . . . | 2176 |
| 56.15.57 | OTG_FS register map . . . . . | 2177 |
| 56.16 | OTG_FS programming model . . . . . | 2186 |
| 56.16.1 | Core initialization . . . . . | 2186 |
| 56.16.2 | Host initialization . . . . . | 2187 |
| 56.16.3 | Device initialization . . . . . | 2187 |
| 56.16.4 | Host programming model . . . . . | 2188 |
| 56.16.5 | Device programming model . . . . . | 2209 |
| 56.16.6 | Worst case response time . . . . . | 2230 |
| 56.16.7 | OTG programming model . . . . . | 2232 |
| 57 | Debug support (DBG) . . . . . | 2238 |
| 57.1 | Overview . . . . . | 2238 |
| 57.2 | Reference Arm® documentation . . . . . | 2239 |
| 57.3 | SWJ debug port (serial wire and JTAG) . . . . . | 2239 |
| 57.3.1 | Mechanism to select the JTAG-DP or the SW-DP . . . . . | 2240 |
| 57.4 | Pinout and debug port pins . . . . . | 2240 |
| 57.4.1 | SWJ debug port pins . . . . . | 2241 |
| 57.4.2 | Flexible SWJ-DP pin assignment . . . . . | 2241 |
| 57.4.3 | Internal pull-up and pull-down on JTAG pins . . . . . | 2242 |
| 57.4.4 | Using serial wire and releasing the unused debug pins as GPIOs . . . | 2243 |
| 57.5 | JTAG TAP connection . . . . . | 2243 |
| 57.6 | ID codes and locking mechanism . . . . . | 2244 |
| 57.6.1 | MCU device ID code . . . . . | 2245 |
| 57.6.2 | Boundary scan TAP . . . . . | 2245 |
| 57.6.3 | Cortex®-M4 TAP . . . . . | 2245 |
| 57.6.4 | Cortex®-M4 JEDEC-106 ID code . . . . . | 2246 |
| 57.7 | JTAG debug port . . . . . | 2246 |
| 57.8 | SW debug port . . . . . | 2248 |
| 57.8.1 | SW protocol introduction . . . . . | 2248 |
| 57.8.2 | SW protocol sequence . . . . . | 2248 |
| 57.8.3 | SW DP state machine (reset, idle states, ID code) . . . . . | 2249 |
| 57.8.4 | DP and AP read/write accesses . . . . . | 2249 |
| 57.8.5 | SW-DP registers . . . . . | 2250 |
| 57.8.6 | SW-AP registers . . . . . | 2251 |
| 57.9 | AHB-AP (AHB access port) - valid for both JTAG-DP and SW-DP . . . . . | 2251 |
| 57.10 | Core debug . . . . . | 2252 |
| 57.11 | Capability of the debugger host to connect under system reset . . . . . | 2252 |
| 57.12 | FPB (Flash patch breakpoint) . . . . . | 2253 |
| 57.13 | DWT (data watchpoint trigger) . . . . . | 2253 |
| 57.14 | ITM (instrumentation trace macrocell) . . . . . | 2253 |
| 57.14.1 | General description . . . . . | 2253 |
| 57.14.2 | Time stamp packets, synchronization and overflow packets . . . . . | 2254 |
| 57.15 | ETM (Embedded trace macrocell) . . . . . | 2255 |
| 57.15.1 | General description . . . . . | 2255 |
| 57.15.2 | Signal protocol, packet types . . . . . | 2256 |
| 57.15.3 | Main ETM registers . . . . . | 2256 |
| 57.15.4 | Configuration example . . . . . | 2256 |
| 57.16 | MCU debug component (DBGMCU) . . . . . | 2257 |
| 57.16.1 | Debug support for low-power modes . . . . . | 2257 |
| 57.16.2 | Debug support for timers, RTC, watchdog, bxCAN and I 2 C . . . . . | 2257 |
| 57.16.3 | Debug MCU configuration register (DBGMCU_CR) . . . . . | 2257 |
| 57.16.4 | Debug MCU APB1 freeze register1 (DBGMCU_APB1FZR1) . . . . . | 2259 |
| 57.16.5 | Debug MCU APB1 freeze register 2 (DBGMCU_APB1FZR2) . . . . . | 2261 |
| 57.16.6 | Debug MCU APB2 freeze register (DBGMCU_APB2FZR) . . . . . | 2261 |
| 57.17 | TPIU (trace port interface unit) . . . . . | 2263 |
| 57.17.1 | Introduction . . . . . | 2263 |
| 57.17.2 | TRACE pin assignment . . . . . | 2263 |
| 57.17.3 | TPIU formatter . . . . . | 2265 |
| 57.17.4 | TPIU frame synchronization packets . . . . . | 2266 |
| 57.17.5 | Transmission of the synchronization frame packet . . . . . | 2266 |
| 57.17.6 | Synchronous mode . . . . . | 2266 |
| 57.17.7 | Asynchronous mode . . . . . | 2267 |
| 57.17.8 | TRACECLKIN connection inside STM32L4+ Series . . . . . | 2267 |
| 57.17.9 | TPIU registers . . . . . | 2268 |
- 57.17.10 Example of configuration . . . . . 2269
- 57.17.11 DBGMCU register map . . . . . 2270
- 58 Device electronic signature . . . . . 2271
- 58.1 Unique device ID register (96 bits) . . . . . 2271
- 58.2 Flash size data register . . . . . 2272
- 58.3 Package data register . . . . . 2273
- 59 Revision history . . . . . 2274
List of tables
Table 1. STM32L4Rxxx and STM32L4Sxxx memory map and peripheral register boundary addresses . . . . . 96
Table 2. STM32L4P5xx and STM32L4Q5xx memory map and peripheral register boundary addresses . . . . . 101
Table 3. SRAM2 organization. . . . . 108
Table 4. Boot modes. . . . . 111
Table 5. Memory mapping versus boot mode/physical remap . . . . . 112
Table 6. Flash module - 2 Mbytes dual-bank organization, DBANK = 1 (64 bits read width) . . . . . 117
Table 7. Flash module - 2 Mbytes single-bank organization, DBANK = 0 (128 bits read width) . . . . . 117
Table 8. Flash module - 1 Mbyte dual-bank organization, DB1M = 1 (64 bits read width) . . . . . 118
Table 9. Flash module - 1 Mbyte single-bank organization, DB1M = 0 (128 bits read width) . . . . . 119
Table 10. Flash module - 512 Kbytes dual-bank organization, DB1M = 1 (64 bits read width) . . . . . 119
Table 11. Flash module - 512 Kbytes single-bank organization DB1M = 0 (128 bits read width) . . . . . 120
Table 12. Number of wait states according to CPU clock (HCLK) frequency. . . . . 122
Table 13. Option byte format . . . . . 134
Table 14. Option byte organization. . . . . 134
Table 15. Flash memory read protection status . . . . . 144
Table 16. Access status versus protection level and execution modes . . . . . 146
Table 17. PCROP protection . . . . . 148
Table 18. WRP protection. . . . . 150
Table 19. Flash interrupt request . . . . . 150
Table 20. Flash interface - register map and reset values . . . . . 168
Table 21. Segment accesses according to the Firewall state. . . . . 173
Table 22. Segment granularity and area ranges . . . . . 174
Table 23. Firewall register map and reset values. . . . . 182
Table 24. Range 1 boost mode configuration. . . . . 191
Table 25. PVM features . . . . . 195
Table 26. Low-power mode summary . . . . . 199
Table 27. Functionalities depending on the working mode. . . . . 201
Table 28. Low-power run . . . . . 205
Table 29. Sleep. . . . . 207
Table 30. Low-power sleep. . . . . 208
Table 31. Stop 0 mode . . . . . 210
Table 32. Stop 1 mode . . . . . 211
Table 33. Stop 2 mode . . . . . 213
Table 34. Standby mode. . . . . 215
Table 35. Shutdown mode . . . . . 217
Table 36. PWR register map and reset values. . . . . 237
Table 37. Clock source frequency . . . . . 252
Table 38. RCC register map and reset values . . . . . 317
Table 39. CRS features . . . . . 322
Table 40. Effect of low-power modes on CRS . . . . . 326
| Table 41. | Interrupt control bits . . . . . | 326 |
| Table 42. | CRS register map and reset values . . . . . | 332 |
| Table 43. | Port bit configuration table . . . . . | 335 |
| Table 44. | GPIO register map and reset values . . . . . | 349 |
| Table 45. | BOOSTEN and ANASWVDD set/reset (when at least one analog peripheral supplied by VDDA is enabled) . . . . . | 354 |
| Table 46. | SYSCFG register map and reset values . . . . . | 364 |
| Table 47. | STM32L4+ Series peripherals interconnect matrix . . . . . | 366 |
| Table 48. | DMA1 and DMA2 implementation . . . . . | 376 |
| Table 49. | DMA internal input/output signals . . . . . | 378 |
| Table 50. | Programmable data width and endian behavior (when PINC = MINC = 1) . . . . . | 383 |
| Table 51. | DMA interrupt requests . . . . . | 385 |
| Table 52. | DMA register map and reset values . . . . . | 393 |
| Table 53. | DMAMUX instantiation . . . . . | 397 |
| Table 54. | DMAMUX: assignment of multiplexer inputs to resources (STM32L4Rxxx and STM32L4Sxxx devices) . . . . . | 398 |
| Table 55. | DMAMUX: assignment of multiplexer inputs to resources (STM32L4P5xx and STM32L4Q5xx devices) . . . . . | 399 |
| Table 56. | DMAMUX: assignment of trigger inputs to resources (STM32L4Rxxx and STM32L4Sxxx devices) . . . . . | 400 |
| Table 57. | DMAMUX: assignment of trigger inputs to resources (STM32L4P5xx and STM32L4Q5xx devices) . . . . . | 401 |
| Table 58. | DMAMUX: assignment of synchronization inputs to resources (STM32L4Rxxx and STM32L4Sxxx devices) . . . . . | 401 |
| Table 59. | DMAMUX: assignment of synchronization inputs to resources (STM32L4P5xx and STM32L4Q5xx devices) . . . . . | 402 |
| Table 60. | DMAMUX signals . . . . . | 404 |
| Table 61. | DMAMUX interrupts . . . . . | 408 |
| Table 62. | DMAMUX register map and reset values . . . . . | 413 |
| Table 63. | Supported color mode in input . . . . . | 418 |
| Table 64. | Data order in memory . . . . . | 419 |
| Table 65. | Alpha mode configuration . . . . . | 420 |
| Table 66. | Supported CLUT color mode . . . . . | 421 |
| Table 67. | CLUT data order in system memory . . . . . | 421 |
| Table 68. | Supported color mode in output . . . . . | 422 |
| Table 69. | Data order in memory . . . . . | 422 |
| Table 70. | Standard data order in memory . . . . . | 423 |
| Table 71. | Output FIFO byte reordering steps . . . . . | 424 |
| Table 72. | DMA2D interrupt requests . . . . . | 430 |
| Table 73. | DMA2D register map and reset values . . . . . | 450 |
| Table 74. | GFXMMU interrupt requests . . . . . | 459 |
| Table 75. | GFXMMU register map and reset values . . . . . | 466 |
| Table 76. | STM32L4Rxxx and STM32L4Sxxx vector table . . . . . | 468 |
| Table 77. | STM32L4P5xx and STM32Q5xx vector table . . . . . | 471 |
| Table 78. | EXTI lines connections . . . . . | 479 |
| Table 79. | Extended interrupt/event controller register map and reset values . . . . . | 488 |
| Table 80. | CRC internal input/output signals . . . . . | 490 |
| Table 81. | CRC register map and reset values . . . . . | 495 |
| Table 82. | FMC implementation . . . . . | 497 |
| Table 83. | NOR/PSRAM bank selection . . . . . | 500 |
| Table 84. | NOR/PSRAM External memory address . . . . . | 500 |
| Table 85. | NAND memory mapping and timing registers . . . . . | 501 |
| Table 86. | NAND bank selection . . . . . | 501 |
| Table 87. | Programmable NOR/PSRAM access parameters . . . . . | 503 |
| Table 88. | Non-multiplexed I/O NOR Flash memory . . . . . | 503 |
| Table 89. | 16-bit multiplexed I/O NOR Flash memory . . . . . | 504 |
| Table 90. | Non-multiplexed I/Os PSRAM/SRAM . . . . . | 504 |
| Table 91. | 16-Bit multiplexed I/O PSRAM . . . . . | 504 |
| Table 92. | NOR Flash/PSRAM: example of supported memories and transactions . . . . . | 505 |
| Table 93. | FMC_BCRx bitfields (mode 1) . . . . . | 508 |
| Table 94. | FMC_BTRx bitfields (mode 1) . . . . . | 509 |
| Table 95. | FMC_BCRx bitfields (mode A) . . . . . | 511 |
| Table 96. | FMC_BTRx bitfields (mode A) . . . . . | 511 |
| Table 97. | FMC_BWTRx bitfields (mode A) . . . . . | 512 |
| Table 98. | FMC_BCRx bitfields (mode 2/B) . . . . . | 514 |
| Table 99. | FMC_BTRx bitfields (mode 2/B) . . . . . | 514 |
| Table 100. | FMC_BWTRx bitfields (mode 2/B) . . . . . | 515 |
| Table 101. | FMC_BCRx bitfields (mode C) . . . . . | 516 |
| Table 102. | FMC_BTRx bitfields (mode C) . . . . . | 517 |
| Table 103. | FMC_BWTRx bitfields (mode C) . . . . . | 517 |
| Table 104. | FMC_BCRx bitfields (mode D) . . . . . | 519 |
| Table 105. | FMC_BTRx bitfields (mode D) . . . . . | 520 |
| Table 106. | FMC_BWTRx bitfields (mode D) . . . . . | 520 |
| Table 107. | FMC_BCRx bitfields (Muxed mode) . . . . . | 522 |
| Table 108. | FMC_BTRx bitfields (Muxed mode) . . . . . | 523 |
| Table 109. | FMC_BCRx bitfields (Synchronous multiplexed read mode) . . . . . | 528 |
| Table 110. | FMC_BTRx bitfields (Synchronous multiplexed read mode) . . . . . | 529 |
| Table 111. | FMC_BCRx bitfields (Synchronous multiplexed write mode) . . . . . | 530 |
| Table 112. | FMC_BTRx bitfields (Synchronous multiplexed write mode) . . . . . | 531 |
| Table 113. | Programmable NAND Flash access parameters . . . . . | 540 |
| Table 114. | 8-bit NAND Flash . . . . . | 541 |
| Table 115. | 16-bit NAND Flash . . . . . | 542 |
| Table 116. | Supported memories and transactions . . . . . | 543 |
| Table 117. | ECC result relevant bits . . . . . | 552 |
| Table 118. | FMC register map and reset values . . . . . | 553 |
| Table 119. | OCTOSPI implementation . . . . . | 556 |
| Table 120. | Command/address phase description . . . . . | 566 |
| Table 121. | Address alignment cases . . . . . | 582 |
| Table 122. | OCTOSPI interrupt requests . . . . . | 583 |
| Table 123. | OCTOSPI register map and reset values . . . . . | 607 |
| Table 124. | OCTOSPIM implementation on STM32L4+ Series . . . . . | 610 |
| Table 125. | OCTOSPIM register map and reset values . . . . . | 616 |
| Table 126. | ADC features . . . . . | 619 |
| Table 127. | ADC internal input/output signals . . . . . | 621 |
| Table 128. | ADC input/output pins . . . . . | 621 |
| Table 129. | Configuring the trigger polarity for regular external triggers . . . . . | 638 |
| Table 130. | Configuring the trigger polarity for injected external triggers . . . . . | 638 |
| Table 131. | ADC1 - External triggers for regular channels . . . . . | 639 |
| Table 132. | ADC1 - External trigger for injected channels . . . . . | 640 |
| Table 133. | TSAR timings depending on resolution . . . . . | 652 |
| Table 134. | Offset computation versus data resolution . . . . . | 655 |
| Table 135. | Analog watchdog channel selection . . . . . | 666 |
| Table 136. | Analog watchdog 1 comparison . . . . . | 667 |
| Table 137. | Analog watchdog 2 and 3 comparison . . . . . | 667 |
| Table 138. | Maximum output results versus N and M (gray cells indicate truncation). . . . . | 671 |
| Table 139. | Oversampler operating modes summary . . . . . | 675 |
| Table 140. | ADC interrupts per each ADC. . . . . | 694 |
| Table 141. | DELAY bits versus ADC resolution. . . . . | 725 |
| Table 142. | ADC global register map. . . . . | 726 |
| Table 143. | ADC register map and reset values for each ADC (offset=0x000 for master ADC, 0x100 for slave ADC). . . . . | 727 |
| Table 144. | ADC register map and reset values (master and slave ADC common registers) offset = 0x300 . . . . . | 729 |
| Table 145. | DAC features . . . . . | 731 |
| Table 146. | DAC input/output pins. . . . . | 733 |
| Table 147. | DAC trigger selection . . . . . | 736 |
| Table 148. | Sample and refresh timings . . . . . | 741 |
| Table 149. | Channel output modes summary . . . . . | 742 |
| Table 150. | Effect of low-power modes on DAC . . . . . | 748 |
| Table 151. | DAC interrupts . . . . . | 749 |
| Table 152. | DAC register map and reset values . . . . . | 766 |
| Table 153. | VREF buffer modes . . . . . | 768 |
| Table 154. | VREFBUF register map and reset values. . . . . | 770 |
| Table 155. | DCMI input/output pins . . . . . | 772 |
| Table 156. | Positioning of captured data bytes in 32-bit words (8-bit width) . . . . . | 774 |
| Table 157. | Positioning of captured data bytes in 32-bit words (10-bit width) . . . . . | 774 |
| Table 158. | Positioning of captured data bytes in 32-bit words (12-bit width) . . . . . | 774 |
| Table 159. | Positioning of captured data bytes in 32-bit words (14-bit width) . . . . . | 775 |
| Table 160. | Data storage in monochrome progressive video format. . . . . | 780 |
| Table 161. | Data storage in RGB progressive video format . . . . . | 781 |
| Table 162. | Data storage in YCbCr progressive video format . . . . . | 781 |
| Table 163. | Data storage in YCbCr progressive video format - Y extraction mode . . . . . | 782 |
| Table 164. | DCMI interrupts. . . . . | 782 |
| Table 165. | DCMI register map and reset values . . . . . | 794 |
| Table 166. | PSSI input/output pins . . . . . | 797 |
| Table 167. | PSSI internal input/output signals. . . . . | 797 |
| Table 168. | Positioning of captured data bytes in 32-bit words (8-bit width) . . . . . | 798 |
| Table 169. | Positioning of captured data bytes in 32-bit words (16-bit width) . . . . . | 799 |
| Table 170. | PSSI interrupt requests. . . . . | 802 |
| Table 171. | PSSI register map and reset values . . . . . | 808 |
| Table 172. | COMP1 input plus assignment . . . . . | 811 |
| Table 173. | COMP1 input minus assignment . . . . . | 811 |
| Table 174. | COMP2 input plus assignment . . . . . | 812 |
| Table 175. | COMP2 input minus assignment . . . . . | 812 |
| Table 176. | Comparator behavior in the low power modes . . . . . | 815 |
| Table 177. | Interrupt control bits . . . . . | 816 |
| Table 178. | COMP register map and reset values. . . . . | 821 |
| Table 179. | Operational amplifier possible connections . . . . . | 823 |
| Table 180. | Operating modes and calibration . . . . . | 828 |
| Table 181. | Effect of low-power modes on the OPAMP . . . . . | 829 |
| Table 182. | OPAMP register map and reset values . . . . . | 834 |
| Table 183. | STM32L4Rxxx and STM32L4Sxxx DFSDM1 implementation . . . . . | 837 |
| Table 184. | STM32L4P5xx and STM32L4Q5xx DFSDM1 implementation . . . . . | 837 |
| Table 185. | DFSDM external pins . . . . . | 839 |
| Table 186. | DFSDM internal signals . . . . . | 839 |
| Table 187. | DFSDM triggers connection . . . . . | 839 |
| Table 188. | DFSDM break connection. . . . . | 840 |
| Table 189. | Filter maximum output resolution (peak data values from filter output) for some FOSR values . . . . . | 855 |
| Table 190. | Integrator maximum output resolution (peak data values from integrator output) for some IOSR values and FOSR = 256 and Sinc3 filter type (largest data) . . . . . | 856 |
| Table 191. | DFSDM interrupt requests . . . . . | 864 |
| Table 192. | DFSDM register map and reset values. . . . . | 885 |
| Table 193. | LTDC implementation . . . . . | 895 |
| Table 194. | LTDC pins and signal interface. . . . . | 896 |
| Table 195. | Clock domain for each register . . . . . | 897 |
| Table 196. | Pixel data mapping versus color format . . . . . | 902 |
| Table 197. | LTDC interrupt requests . . . . . | 906 |
| Table 198. | LTDC register map and reset values . . . . . | 926 |
| Table 199. | DSI pins . . . . . | 932 |
| Table 200. | DSI internal input/output signals . . . . . | 933 |
| Table 201. | Location of color components in the LTDC interface . . . . . | 936 |
| Table 202. | Multiplicity of the payload size in pixels for each data type . . . . . | 937 |
| Table 203. | Contention detection timeout counters configuration . . . . . | 949 |
| Table 204. | List of events of different categories of the PRESP_TO counter . . . . . | 950 |
| Table 205. | PRESP_TO counter configuration . . . . . | 953 |
| Table 206. | Frame requirement configuration registers. . . . . | 965 |
| Table 207. | RGB components . . . . . | 967 |
| Table 208. | Slew-rate and delay tuning . . . . . | 969 |
| Table 209. | Custom lane configuration . . . . . | 970 |
| Table 210. | Custom timing parameters . . . . . | 970 |
| Table 211. | DSI Wrapper interrupt requests . . . . . | 973 |
| Table 212. | Error causes and recovery . . . . . | 975 |
| Table 213. | DSI register map and reset values . . . . . | 1041 |
| Table 214. | Acquisition sequence summary . . . . . | 1050 |
| Table 215. | Spread spectrum deviation versus AHB clock frequency. . . . . | 1052 |
| Table 216. | I/O state depending on its mode and IODEF bit value . . . . . | 1053 |
| Table 217. | Effect of low-power modes on TSC . . . . . | 1055 |
| Table 218. | Interrupt control bits . . . . . | 1055 |
| Table 219. | TSC register map and reset values . . . . . | 1064 |
| Table 220. | RNG internal input/output signals . . . . . | 1067 |
| Table 221. | RNG interrupt requests. . . . . | 1074 |
| Table 222. | RNG register map and reset map. . . . . | 1078 |
| Table 223. | RNG internal input/output signals . . . . . | 1080 |
| Table 224. | RNG interrupt requests. . . . . | 1088 |
| Table 225. | RNG configurations . . . . . | 1088 |
| Table 226. | RNG register map and reset map. . . . . | 1093 |
| Table 227. | AES internal input/output signals . . . . . | 1095 |
| Table 228. | CTR mode initialization vector definition. . . . . | 1112 |
| Table 229. | GCM last block definition . . . . . | 1114 |
| Table 230. | Initialization of SAES_IVRx registers in GCM mode. . . . . | 1115 |
| Table 231. | Initialization of AES_IVRx registers in CCM mode . . . . . | 1122 |
| Table 232. | Key endianness in AES_KEYRx registers (128- or 256-bit key length) . . . . . | 1127 |
| Table 233. | AES interrupt requests . . . . . | 1130 |
| Table 234. | Processing latency for ECB, CBC and CTR. . . . . | 1131 |
| Table 235. | Processing latency for GCM and CCM (in clock cycles). . . . . | 1131 |
| Table 236. | AES register map and reset values . . . . . | 1141 |
| Table 237. | HASH internal input/output signals . . . . . | 1145 |
| Table 238. | Hash processor outputs . . . . . | 1148 |
| Table 239. | HASH interrupt requests . . . . . | 1155 |
| Table 240. | Processing time (in clock cycle) . . . . . | 1155 |
| Table 241. | HASH register map and reset values . . . . . | 1164 |
| Table 242. | Internal input/output signals . . . . . | 1167 |
| Table 243. | PKA integer arithmetic functions list . . . . . | 1168 |
| Table 244. | PKA prime field (Fp) elliptic curve functions list . . . . . | 1168 |
| Table 245. | Montgomery parameter computation . . . . . | 1173 |
| Table 246. | Modular addition . . . . . | 1174 |
| Table 247. | Modular subtraction . . . . . | 1174 |
| Table 248. | Montgomery multiplication . . . . . | 1175 |
| Table 249. | Modular exponentiation (normal mode) . . . . . | 1176 |
| Table 250. | Modular exponentiation (fast mode) . . . . . | 1176 |
| Table 251. | Modular inversion . . . . . | 1176 |
| Table 252. | Modular reduction . . . . . | 1177 |
| Table 253. | Arithmetic addition . . . . . | 1177 |
| Table 254. | Arithmetic subtraction . . . . . | 1177 |
| Table 255. | Arithmetic multiplication . . . . . | 1178 |
| Table 256. | Arithmetic comparison . . . . . | 1178 |
| Table 257. | CRT exponentiation . . . . . | 1179 |
| Table 258. | Point on elliptic curve Fp check . . . . . | 1180 |
| Table 259. | ECC Fp scalar multiplication . . . . . | 1180 |
| Table 260. | ECC Fp scalar multiplication (Fast Mode) . . . . . | 1181 |
| Table 261. | ECDSA sign - Inputs . . . . . | 1182 |
| Table 262. | ECDSA sign - Outputs . . . . . | 1182 |
| Table 263. | Extended ECDSA sign (extra outputs) . . . . . | 1183 |
| Table 264. | ECDSA verification (inputs) . . . . . | 1183 |
| Table 265. | ECDSA verification (outputs) . . . . . | 1183 |
| Table 266. | Family of supported curves for ECC operations . . . . . | 1184 |
| Table 267. | Modular exponentiation computation times . . . . . | 1186 |
| Table 268. | ECC scalar multiplication computation times . . . . . | 1186 |
| Table 269. | ECDSA signature average computation times . . . . . | 1186 |
| Table 270. | ECDSA verification average computation times . . . . . | 1187 |
| Table 271. | Point on elliptic curve Fp check average computation times . . . . . | 1187 |
| Table 272. | Montgomery parameters average computation times . . . . . | 1187 |
| Table 273. | PKA interrupt requests . . . . . | 1187 |
| Table 274. | PKA register map and reset values . . . . . | 1191 |
| Table 275. | Behavior of timer outputs versus BRK/BRK2 inputs . . . . . | 1233 |
| Table 276. | Break protection disarming conditions . . . . . | 1235 |
| Table 277. | Counting direction versus encoder signals . . . . . | 1241 |
| Table 278. | TIMx internal trigger connection . . . . . | 1258 |
| Table 279. | Output control bits for complementary OCx and OCxN channels with break feature . . . . . | 1272 |
| Table 280. | TIM1 register map and reset values . . . . . | 1293 |
| Table 281. | TIM8 register map and reset values . . . . . | 1295 |
| Table 282. | Counting direction versus encoder signals . . . . . | 1332 |
| Table 283. | TIMx internal trigger connection . . . . . | 1349 |
| Table 284. | Output control bit for standard OCx channels . . . . . | 1360 |
| Table 285. | TIM2/TIM3/TIM4/TIM5 register map and reset values . . . . . | 1368 |
| Table 286. | Break protection disarming conditions . . . . . | 1399 |
| Table 287. | TIMx Internal trigger connection . . . . . | 1415 |
| Table 288. | Output control bits for complementary OCx and OCxN channels with break feature |
| (TIM15) . . . . . | 1425 |
| Table 289. TIM15 register map and reset values . . . . . | 1434 |
| Table 290. Output control bits for complementary OCx and OCxN channels with break feature (TIM16/17) . . . . . | 1447 |
| Table 291. TIM16/TIM17 register map and reset values . . . . . | 1458 |
| Table 292. TIMx register map and reset values . . . . . | 1472 |
| Table 293. STM32L4Rxxx and STM32L4Sxxx LPTIM features . . . . . | 1474 |
| Table 294. LPTIM input/output pins . . . . . | 1475 |
| Table 295. LPTIM internal signals . . . . . | 1475 |
| Table 296. LPTIM1 external trigger connection . . . . . | 1475 |
| Table 297. LPTIM2 external trigger connection . . . . . | 1476 |
| Table 298. Prescaler division ratios . . . . . | 1477 |
| Table 299. Encoder counting scenarios . . . . . | 1484 |
| Table 300. Effect of low-power modes on the LPTIM . . . . . | 1485 |
| Table 301. Interrupt events . . . . . | 1486 |
| Table 302. LPTIM register map and reset values . . . . . | 1497 |
| Table 303. STM32L4Pxxx and STM32L4Qxxx LPTIM features . . . . . | 1500 |
| Table 304. LPTIM input/output pins . . . . . | 1501 |
| Table 305. LPTIM internal signals . . . . . | 1501 |
| Table 306. LPTIM1 external trigger connection . . . . . | 1501 |
| Table 307. LPTIM2 external trigger connection . . . . . | 1502 |
| Table 308. Prescaler division ratios . . . . . | 1503 |
| Table 309. Encoder counting scenarios . . . . . | 1510 |
| Table 310. Effect of low-power modes on the LPTIM . . . . . | 1513 |
| Table 311. Interrupt events . . . . . | 1513 |
| Table 312. LPTIM register map and reset values . . . . . | 1524 |
| Table 313. IWDG register map and reset values . . . . . | 1535 |
| Table 314. WWDG register map and reset values . . . . . | 1541 |
| Table 315. RTC pin PC13 configuration . . . . . | 1545 |
| Table 316. RTC_OUT mapping . . . . . | 1546 |
| Table 317. RTC functions over modes . . . . . | 1547 |
| Table 318. Effect of low-power modes on RTC . . . . . | 1559 |
| Table 319. Interrupt control bits . . . . . | 1560 |
| Table 320. RTC register map and reset values . . . . . | 1585 |
| Table 321. RTC input/output pins . . . . . | 1589 |
| Table 322. RTC internal input/output signals . . . . . | 1589 |
| Table 323. RTC interconnection . . . . . | 1589 |
| Table 324. PC13 configuration . . . . . | 1590 |
| Table 325. RTC_OUT mapping . . . . . | 1592 |
| Table 326. Effect of low-power modes on RTC . . . . . | 1604 |
| Table 327. RTC pins functionality over modes . . . . . | 1605 |
| Table 328. Interrupt requests . . . . . | 1605 |
| Table 329. RTC register map and reset values . . . . . | 1627 |
| Table 330. TAMP input/output pins . . . . . | 1630 |
| Table 331. TAMP internal input/output signals . . . . . | 1631 |
| Table 332. TAMP interconnection . . . . . | 1631 |
| Table 333. Effect of low-power modes on TAMP . . . . . | 1634 |
| Table 334. Interrupt requests . . . . . | 1634 |
| Table 335. TAMP register map and reset values . . . . . | 1643 |
| Table 336. I2C implementation . . . . . | 1645 |
| Table 337. I2C input/output pins . . . . . | 1647 |
| Table 338. I2C internal input/output signals . . . . . | 1647 |
| Table 339. | Comparison of analog vs. digital filters . . . . . | 1649 |
| Table 340. | I2C-SMBus specification data setup and hold times . . . . . | 1652 |
| Table 341. | I2C configuration. . . . . | 1656 |
| Table 342. | I2C-SMBus specification clock timings . . . . . | 1667 |
| Table 343. | Examples of timing settings for fI2CCLK = 8 MHz . . . . . | 1677 |
| Table 344. | Examples of timings settings for fI2CCLK = 16 MHz . . . . . | 1677 |
| Table 345. | Examples of timings settings for fI2CCLK = 48 MHz . . . . . | 1678 |
| Table 346. | SMBus timeout specifications . . . . . | 1680 |
| Table 347. | SMBus with PEC configuration . . . . . | 1682 |
| Table 348. | Examples of TIMEOUTA settings for various I2CCLK frequencies (max t TIMEOUT = 25 ms) . . . . . | 1683 |
| Table 349. | Examples of TIMEOUTB settings for various I2CCLK frequencies . . . . . | 1683 |
| Table 350. | Examples of TIMEOUTA settings for various I2CCLK frequencies (max t IDLE = 50 µs) . . . . . | 1683 |
| Table 351. | Effect of low-power modes on the I2C . . . . . | 1694 |
| Table 352. | I2C Interrupt requests . . . . . | 1695 |
| Table 353. | I2C register map and reset values . . . . . | 1710 |
| Table 354. | USART / LPUART features . . . . . | 1714 |
| Table 355. | Noise detection from sampled data . . . . . | 1729 |
| Table 356. | Tolerance of the USART receiver when BRR [3:0] = 0000. . . . . | 1732 |
| Table 357. | Tolerance of the USART receiver when BRR[3:0] is different from 0000. . . . . | 1733 |
| Table 358. | USART frame formats . . . . . | 1738 |
| Table 359. | Effect of low-power modes on the USART . . . . . | 1761 |
| Table 360. | USART interrupt requests. . . . . | 1762 |
| Table 361. | USART register map and reset values . . . . . | 1797 |
| Table 362. | USART / LPUART features . . . . . | 1801 |
| Table 363. | Error calculation for programmed baud rates at lpuart_ker_ck_pres = 32.768 kHz . . . . . | 1812 |
| Table 364. | Error calculation for programmed baud rates at fCK = 100 MHz . . . . . | 1813 |
| Table 365. | Tolerance of the LPUART receiver. . . . . | 1814 |
| Table 367. | Effect of low-power modes on the LPUART . . . . . | 1825 |
| Table 368. | LPUART interrupt requests. . . . . | 1826 |
| Table 369. | LPUART register map and reset values . . . . . | 1850 |
| Table 370. | STM32L4Rxxx/STM32L4Sxxx and STM32L4P5xx/STM32L4Q5xx SPI implementation | 1853 |
| Table 371. | SPI interrupt requests . . . . . | 1877 |
| Table 372. | SPI register map and reset values . . . . . | 1886 |
| Table 373. | STM32L4S/STM32L4R SAI features . . . . . | 1888 |
| Table 374. | SAI internal input/output signals . . . . . | 1890 |
| Table 375. | SAI input/output pins. . . . . | 1890 |
| Table 376. | External synchronization selection . . . . . | 1892 |
| Table 377. | Clock generator programming examples . . . . . | 1900 |
| Table 378. | TDM settings. . . . . | 1907 |
| Table 379. | TDM frame configuration examples . . . . . | 1909 |
| Table 380. | SOPD pattern . . . . . | 1913 |
| Table 381. | Parity bit calculation . . . . . | 1913 |
| Table 382. | Audio sampling frequency versus symbol rates . . . . . | 1914 |
| Table 383. | SAI interrupt sources . . . . . | 1923 |
| Table 384. | SAI register map and reset values . . . . . | 1953 |
| Table 385. | STM32L4Rxxx and STM32L4Sxxx SDMMC features . . . . . | 1955 |
| Table 386. | STM32L4P5xx and STM32L4Q5xx SDMMC features . . . . . | 1955 |
| Table 387. | SDMMC operation modes SD & SDIO . . . . . | 1958 |
| Table 388. | SDMMC operation modes e•MMC . . . . . | 1958 |
| Table 389. | SDMMC internal input/output signals . . . . . | 1959 |
| Table 390. | SDMMC pins . . . . . | 1959 |
| Table 391. | SDMMC Command and data phase selection . . . . . | 1961 |
| Table 392. | Command token format . . . . . | 1966 |
| Table 393. | Short response with CRC token format . . . . . | 1967 |
| Table 394. | Short response without CRC token format . . . . . | 1967 |
| Table 395. | Long response with CRC token format . . . . . | 1967 |
| Table 396. | Specific Commands overview . . . . . | 1968 |
| Table 397. | Command path status flags . . . . . | 1969 |
| Table 398. | Command path error handling . . . . . | 1969 |
| Table 399. | Data token format . . . . . | 1977 |
| Table 400. | Data path status flags and clear bits . . . . . | 1977 |
| Table 401. | Data path error handling . . . . . | 1979 |
| Table 402. | Data FIFO access . . . . . | 1980 |
| Table 403. | Transmit FIFO status flags . . . . . | 1981 |
| Table 404. | Receive FIFO status flags . . . . . | 1982 |
| Table 405. | AHB and SDMMC_CK clock frequency relation . . . . . | 1985 |
| Table 406. | SDIO special operation control . . . . . | 1986 |
| Table 407. | 4-bit mode Start, interrupt, and CRC-status Signaling detection . . . . . | 1990 |
| Table 408. | CMD12 use cases . . . . . | 1994 |
| Table 409. | SDMMC interrupts . . . . . | 2008 |
| Table 410. | Response type and SDMMC_RESPxR registers . . . . . | 2016 |
| Table 411. | SDMMC register map . . . . . | 2032 |
| Table 412. | Transmit mailbox mapping . . . . . | 2049 |
| Table 413. | Receive mailbox mapping . . . . . | 2049 |
| Table 414. | bxCAN register map and reset values . . . . . | 2075 |
| Table 415. | OTG_FS speeds supported . . . . . | 2079 |
| Table 416. | OTG_FS implementation . . . . . | 2082 |
| Table 417. | OTG_FS input/output pins . . . . . | 2083 |
| Table 418. | OTG_FS input/output signals . . . . . | 2084 |
| Table 419. | Compatibility of STM32 low power modes with the OTG . . . . . | 2096 |
| Table 420. | Core global control and status registers (CSRs) . . . . . | 2104 |
| Table 421. | Host-mode control and status registers (CSRs) . . . . . | 2105 |
| Table 422. | Device-mode control and status registers . . . . . | 2106 |
| Table 423. | Data FIFO (DFIFO) access register map . . . . . | 2108 |
| Table 424. | Power and clock gating control and status registers . . . . . | 2108 |
| Table 425. | TRDT values (FS) . . . . . | 2115 |
| Table 426. | Minimum duration for soft disconnect . . . . . | 2154 |
| Table 427. | OTG_FS register map and reset values . . . . . | 2177 |
| Table 428. | SWJ debug port pins . . . . . | 2241 |
| Table 429. | Flexible SWJ-DP pin assignment . . . . . | 2241 |
| Table 430. | JTAG debug port data registers . . . . . | 2246 |
| Table 431. | 32-bit debug port registers addressed through the shifted value A[3:2] . . . . . | 2247 |
| Table 432. | Packet request (8-bits) . . . . . | 2248 |
| Table 433. | ACK response (3 bits) . . . . . | 2249 |
| Table 434. | DATA transfer (33 bits) . . . . . | 2249 |
| Table 435. | SW-DP registers . . . . . | 2250 |
| Table 436. | Cortex®-M4 AHB-AP registers . . . . . | 2251 |
| Table 437. | Core debug registers . . . . . | 2252 |
| Table 438. | Main ITM registers . . . . . | 2254 |
| Table 439. | Main ETM registers . . . . . | 2256 |
| Table 440. | Asynchronous TRACE pin assignment . . . . . | 2263 |
| Table 441. | Synchronous TRACE pin assignment . . . . . | 2264 |
| Table 442. Flexible TRACE pin assignment . . . . . | 2264 |
| Table 443. Important TPIU registers. . . . . | 2268 |
| Table 444. DBGMCU register map and reset values . . . . . | 2270 |
| Table 445. Document revision history . . . . . | 2274 |
List of figures
| Figure 1. | System architecture for STM32L4Rxxx and STM32L4Sxxx . . . . . | 89 |
| Figure 2. | System architecture for STM32L4P5xx and STM32L4Q5xx . . . . . | 90 |
| Figure 3. | Memory map for STM32L4Rxxx and STM32L4Sxxx . . . . . | 94 |
| Figure 4. | Memory map for STM32L4P5xx and STM32L4Q5xx . . . . . | 95 |
| Figure 5. | Sequential 16-bit instructions execution (64-bit read data width) . . . . . | 125 |
| Figure 6. | Changing the Read protection (RDP) level. . . . . | 146 |
| Figure 7. | STM32L4+ Series firewall connection schematics . . . . . | 171 |
| Figure 8. | Firewall functional states . . . . . | 175 |
| Figure 9. | STM32L4P5xx/Q5xx, STM32L4S5xx/R5xx and STM32L4S7xx/L4R7xx power supply overview . . . . . | 184 |
| Figure 10. | STM32L4S9xx/L4R9xx power supply overview . . . . . | 185 |
| Figure 11. | Internal main regulator overview. . . . . | 189 |
| Figure 12. | Brown-out reset waveform . . . . . | 194 |
| Figure 13. | PVD thresholds . . . . . | 194 |
| Figure 14. | Low-power modes possible transitions. . . . . | 198 |
| Figure 15. | Simplified diagram of the reset circuit. . . . . | 240 |
| Figure 16. | Clock tree for STM32L4Rxxx and STM32L4Sxxx devices . . . . . | 244 |
| Figure 17. | DSI clock tree . . . . . | 245 |
| Figure 18. | Clock tree for STM32L4P5xx and STM32L4Q5xx devices. . . . . | 246 |
| Figure 19. | HSE/ LSE clock sources. . . . . | 247 |
| Figure 20. | Frequency measurement with TIM15 in capture mode. . . . . | 255 |
| Figure 21. | Frequency measurement with TIM16 in capture mode. . . . . | 256 |
| Figure 22. | Frequency measurement with TIM17 in capture mode. . . . . | 256 |
| Figure 23. | CRS block diagram. . . . . | 323 |
| Figure 24. | CRS counter behavior . . . . . | 324 |
| Figure 25. | Basic structure of an I/O port bit . . . . . | 334 |
| Figure 26. | Basic structure of a 5-Volt tolerant I/O port bit . . . . . | 334 |
| Figure 27. | Input floating/pull up/pull down configurations . . . . . | 339 |
| Figure 28. | Output configuration . . . . . | 340 |
| Figure 29. | Alternate function configuration . . . . . | 340 |
| Figure 30. | High impedance-analog configuration . . . . . | 341 |
| Figure 31. | DMA block diagram . . . . . | 377 |
| Figure 32. | DMAMUX block diagram . . . . . | 403 |
| Figure 33. | Synchronization mode of the DMAMUX request line multiplexer channel . . . . . | 406 |
| Figure 34. | Event generation of the DMA request line multiplexer channel . . . . . | 406 |
| Figure 35. | DMA2D block diagram . . . . . | 417 |
| Figure 36. | Intel 8080 16-bit mode (RGB565). . . . . | 423 |
| Figure 37. | Intel 8080 18/24-bit mode (RGB888) . . . . . | 424 |
| Figure 38. | GFXMMU block diagram . . . . . | 453 |
| Figure 39. | Virtual buffer . . . . . | 454 |
| Figure 40. | Virtual buffer and physical buffer memory map . . . . . | 455 |
| Figure 41. | MMU block diagram . . . . . | 456 |
| Figure 42. | Block validation/comparator implementation . . . . . | 457 |
| Figure 43. | Configurable interrupt/event block diagram . . . . . | 477 |
| Figure 44. | External interrupt/event GPIO mapping . . . . . | 479 |
| Figure 45. | CRC calculation unit block diagram . . . . . | 490 |
| Figure 46. | FMC block diagram. . . . . | 497 |
| Figure 47. | FMC memory banks . . . . . | 500 |
| Figure 48. | Mode 1 read access waveforms . . . . . | 507 |
| Figure 49. | Mode 1 write access waveforms . . . . . | 508 |
| Figure 50. | Mode A read access waveforms . . . . . | 510 |
| Figure 51. | Mode A write access waveforms . . . . . | 510 |
| Figure 52. | Mode 2 and mode B read access waveforms . . . . . | 512 |
| Figure 53. | Mode 2 write access waveforms . . . . . | 513 |
| Figure 54. | Mode B write access waveforms . . . . . | 513 |
| Figure 55. | Mode C read access waveforms . . . . . | 515 |
| Figure 56. | Mode C write access waveforms . . . . . | 516 |
| Figure 57. | Mode D read access waveforms . . . . . | 518 |
| Figure 58. | Mode D write access waveforms . . . . . | 519 |
| Figure 59. | Muxed read access waveforms . . . . . | 521 |
| Figure 60. | Muxed write access waveforms . . . . . | 522 |
| Figure 61. | Asynchronous wait during a read access waveforms . . . . . | 524 |
| Figure 62. | Asynchronous wait during a write access waveforms . . . . . | 525 |
| Figure 63. | Wait configuration waveforms . . . . . | 527 |
| Figure 64. | Synchronous multiplexed read mode waveforms - NOR, PSRAM (CRAM) . . . . . | 528 |
| Figure 65. | Synchronous multiplexed write mode waveforms - PSRAM (CRAM) . . . . . | 530 |
| Figure 66. | NAND Flash controller waveforms for common memory access . . . . . | 544 |
| Figure 67. | Access to non 'CE don't care' NAND-Flash . . . . . | 545 |
| Figure 68. | OCTOSPI block diagram in octal configuration . . . . . | 557 |
| Figure 69. | OCTOSPI block diagram in quad configuration . . . . . | 557 |
| Figure 70. | OCTOSPI block diagram in dual-quad configuration . . . . . | 558 |
| Figure 71. | SDR read command in octal configuration . . . . . | 559 |
| Figure 72. | DTR read in Octal-SPI mode with DQS (Macronix mode) example . . . . . | 562 |
| Figure 73. | SDR write command in Octo-SPI mode example . . . . . | 564 |
| Figure 74. | DTR write in Octal-SPI mode (Macronix mode) example . . . . . | 564 |
| Figure 75. | Example of HyperBus read operation . . . . . | 566 |
| Figure 76. | HyperBus write operation with initial latency . . . . . | 567 |
| Figure 77. | HyperBus read operation with additional latency . . . . . | 567 |
| Figure 78. | HyperBus write operation with additional latency . . . . . | 568 |
| Figure 79. | HyperBus write operation with no latency . . . . . | 568 |
| Figure 80. | HyperBus read operation page crossing with latency . . . . . | 569 |
| Figure 81. | NCS when CKMODE = 0 (T = CLK period) . . . . . | 580 |
| Figure 82. | NCS when CKMODE = 1 in SDR mode (T = CLK period) . . . . . | 581 |
| Figure 83. | NCS when CKMODE = 1 in DTR mode (T = CLK period) . . . . . | 581 |
| Figure 84. | NCS when CKMODE = 1 with an abort (T = CLK period) . . . . . | 581 |
| Figure 85. | OCTOSPIM block diagram for SMT32L4P5xx and STM32L4Q5xx . . . . . | 611 |
| Figure 86. | OCTOSPIM block diagram for SMT32L4Rxxx and STM32L4Sxxx . . . . . | 611 |
| Figure 87. | ADC block diagram . . . . . | 620 |
| Figure 88. | ADC clock scheme . . . . . | 623 |
| Figure 89. | ADC1 connectivity . . . . . | 624 |
| Figure 90. | ADC2 connectivity . . . . . | 625 |
| Figure 91. | ADC calibration . . . . . | 628 |
| Figure 92. | Updating the ADC calibration factor . . . . . | 629 |
| Figure 93. | Mixing single-ended and differential channels . . . . . | 629 |
| Figure 94. | Enabling / disabling the ADC . . . . . | 631 |
| Figure 95. | Analog to digital conversion time . . . . . | 636 |
| Figure 96. | Stopping ongoing regular conversions . . . . . | 637 |
| Figure 97. | Stopping ongoing regular and injected conversions . . . . . | 637 |
| Figure 98. | Triggers sharing between ADC master and ADC slave . . . . . | 639 |
| Figure 99. | Injected conversion latency . . . . . | 642 |
| Figure 100. Example of JSQR queue of context (sequence change) . . . . . | 645 |
| Figure 101. Example of JSQR queue of context (trigger change) . . . . . | 645 |
| Figure 102. Example of JSQR queue of context with overflow before conversion . . . . . | 646 |
| Figure 103. Example of JSQR queue of context with overflow during conversion . . . . . | 646 |
| Figure 104. Example of JSQR queue of context with empty queue (case JQM=0). . . . . | 647 |
| Figure 105. Example of JSQR queue of context with empty queue (case JQM=1). . . . . | 648 |
| Figure 106. Flushing JSQR queue of context by setting JADSTP=1 (JQM=0). Case when JADSTP occurs during an ongoing conversion. . . . . | 648 |
| Figure 107. Flushing JSQR queue of context by setting JADSTP=1 (JQM=0). Case when JADSTP occurs during an ongoing conversion and a new trigger occurs. . . . . | 649 |
| Figure 108. Flushing JSQR queue of context by setting JADSTP=1 (JQM=0). Case when JADSTP occurs outside an ongoing conversion . . . . . | 649 |
| Figure 109. Flushing JSQR queue of context by setting JADSTP=1 (JQM=1) . . . . . | 650 |
| Figure 110. Flushing JSQR queue of context by setting ADDIS=1 (JQM=0). . . . . | 650 |
| Figure 111. Flushing JSQR queue of context by setting ADDIS=1 (JQM=1). . . . . | 651 |
| Figure 112. Single conversions of a sequence, software trigger . . . . . | 653 |
| Figure 113. Continuous conversion of a sequence, software trigger. . . . . | 653 |
| Figure 114. Single conversions of a sequence, hardware trigger . . . . . | 654 |
| Figure 115. Continuous conversions of a sequence, hardware trigger . . . . . | 654 |
| Figure 116. Right alignment (offset disabled, unsigned value) . . . . . | 656 |
| Figure 117. Right alignment (offset enabled, signed value). . . . . | 657 |
| Figure 118. Left alignment (offset disabled, unsigned value) . . . . . | 657 |
| Figure 119. Left alignment (offset enabled, signed value). . . . . | 658 |
| Figure 120. Example of overrun (OVR) . . . . . | 659 |
| Figure 121. AUTODLY=1, regular conversion in continuous mode, software trigger . . . . . | 662 |
| Figure 122. AUTODLY=1, regular HW conversions interrupted by injected conversions (DISCEN=0; JDISCEN=0) . . . . . | 663 |
| Figure 123. AUTODLY=1, regular HW conversions interrupted by injected conversions (DISCEN=1, JDISCEN=1) . . . . . | 664 |
| Figure 124. AUTODLY=1, regular continuous conversions interrupted by injected conversions . . . . . | 665 |
| Figure 125. AUTODLY=1 in auto- injected mode (JAUTO=1). . . . . | 665 |
| Figure 126. Analog watchdog guarded area . . . . . | 666 |
| Figure 127. ADC y _AWD x _OUT signal generation (on all regular channels). . . . . | 668 |
| Figure 128. ADC y _AWD x _OUT signal generation (AWD x flag not cleared by software) . . . . . | 669 |
| Figure 129. ADC y _AWD x _OUT signal generation (on a single regular channel) . . . . . | 669 |
| Figure 130. ADC y _AWD x _OUT signal generation (on all injected channels) . . . . . | 669 |
| Figure 131. 20-bit to 16-bit result truncation . . . . . | 670 |
| Figure 132. Numerical example with 5-bit shift and rounding . . . . . | 670 |
| Figure 133. Triggered regular oversampling mode (TROVS bit = 1). . . . . | 672 |
| Figure 134. Regular oversampling modes (4x ratio) . . . . . | 673 |
| Figure 135. Regular and injected oversampling modes used simultaneously . . . . . | 674 |
| Figure 136. Triggered regular oversampling with injection . . . . . | 674 |
| Figure 137. Oversampling in auto-injected mode . . . . . | 675 |
| Figure 138. Dual ADC block diagram (1) . . . . . | 677 |
| Figure 139. Injected simultaneous mode on 4 channels: dual ADC mode . . . . . | 678 |
| Figure 140. Regular simultaneous mode on 16 channels: dual ADC mode . . . . . | 680 |
| Figure 141. Interleaved mode on 1 channel in continuous conversion mode: dual ADC mode. . . . . | 681 |
| Figure 142. Interleaved mode on 1 channel in single conversion mode: dual ADC mode. . . . . | 682 |
| Figure 143. Interleaved conversion with injection . . . . . | 682 |
| Figure 144. Alternate trigger: injected group of each ADC . . . . . | 683 |
| Figure 145. Alternate trigger: 4 injected channels (each ADC) in discontinuous mode. . . . . | 684 |
| Figure 146. Alternate + regular simultaneous . . . . . | 685 |
| Figure 147. Case of trigger occurring during injected conversion . . . . . | 685 |
| Figure 148. Interleaved single channel CH0 with injected sequence CH11, CH12 . . . . . | 686 |
| Figure 149. Two Interleaved channels (CH1, CH2) with injected sequence CH11, CH12 - case 1: Master interrupted first . . . . . | 686 |
| Figure 150. Two Interleaved channels (CH1, CH2) with injected sequence CH11, CH12 - case 2: Slave interrupted first . . . . . | 686 |
| Figure 151. DMA Requests in regular simultaneous mode when MDMA=0b00 . . . . . | 687 |
| Figure 152. DMA requests in regular simultaneous mode when MDMA=0b10 . . . . . | 688 |
| Figure 153. DMA requests in interleaved mode when MDMA=0b10 . . . . . | 688 |
| Figure 154. Temperature sensor channel block diagram . . . . . | 690 |
| Figure 155. VBAT channel block diagram . . . . . | 691 |
| Figure 156. VREFINT channel block diagram . . . . . | 692 |
| Figure 157. Dual-channel DAC block diagram . . . . . | 732 |
| Figure 158. Data registers in single DAC channel mode . . . . . | 734 |
| Figure 159. Data registers in dual DAC channel mode . . . . . | 734 |
| Figure 160. Timing diagram for conversion with trigger disabled TEN = 0 . . . . . | 735 |
| Figure 161. DAC LFSR register calculation algorithm . . . . . | 738 |
| Figure 162. DAC conversion (SW trigger enabled) with LFSR wave generation . . . . . | 738 |
| Figure 163. DAC triangle wave generation . . . . . | 739 |
| Figure 164. DAC conversion (SW trigger enabled) with triangle wave generation . . . . . | 739 |
| Figure 165. DAC Sample and hold mode phase diagram . . . . . | 742 |
| Figure 166. DCMI block diagram . . . . . | 772 |
| Figure 167. Top-level block diagram . . . . . | 772 |
| Figure 168. DCMI signal waveforms . . . . . | 773 |
| Figure 169. Timing diagram . . . . . | 775 |
| Figure 170. Frame capture waveforms in snapshot mode . . . . . | 777 |
| Figure 171. Frame capture waveforms in continuous grab mode . . . . . | 778 |
| Figure 172. Coordinates and size of the window after cropping . . . . . | 778 |
| Figure 173. Data capture waveforms . . . . . | 779 |
| Figure 174. Pixel raster scan order . . . . . | 780 |
| Figure 175. PSSI block diagram . . . . . | 796 |
| Figure 176. Top-level block diagram . . . . . | 796 |
| Figure 177. Data enable in receive mode waveform diagram (CKPOL=0) . . . . . | 800 |
| Figure 178. Data enable waveform diagram in transmit mode (CKPOL=0) . . . . . | 800 |
| Figure 179. Ready in receive mode waveform diagram (CKPOL=0) . . . . . | 801 |
| Figure 180. Bidirectional PSSI_DE/PSSI_RDY waveform . . . . . | 802 |
| Figure 181. Bidirectional PSSI_DE/PSSI_RDY connection diagram . . . . . | 802 |
| Figure 182. Comparator block diagram . . . . . | 811 |
| Figure 183. Window mode . . . . . | 813 |
| Figure 184. Comparator hysteresis . . . . . | 814 |
| Figure 185. Comparator output blanking . . . . . | 814 |
| Figure 186. Standalone mode: external gain setting mode . . . . . | 824 |
| Figure 187. Follower configuration . . . . . | 825 |
| Figure 188. PGA mode, internal gain setting (x2/x4/x8/x16), inverting input not used . . . . . | 826 |
| Figure 189. PGA mode, internal gain setting (x2/x4/x8/x16), inverting input used for filtering . . . . . | 827 |
| Figure 190. Single DFSDM block diagram . . . . . | 838 |
| Figure 191. Input channel pins redirection . . . . . | 842 |
| Figure 192. Channel transceiver timing diagrams . . . . . | 845 |
| Figure 193. Clock absence timing diagram for SPI . . . . . | 846 |
| Figure 194. Clock absence timing diagram for Manchester coding . . . . . | 847 |
| Figure 195. First conversion for Manchester coding (Manchester synchronization) . . . . . | 849 |
| Figure 196. DFSDM_CHyDATINR registers operation modes and assignment . . . . . | 853 |
| Figure 197. Example: Sinc3 filter response . . . . . | 855 |
| Figure 198. LTDC block diagram . . . . . | 896 |
| Figure 199. LCD-TFT synchronous timings . . . . . | 899 |
| Figure 200. Layer window programmable parameters . . . . . | 902 |
| Figure 201. Blending two layers with background . . . . . | 905 |
| Figure 202. Interrupt events . . . . . | 906 |
| Figure 203. DSI block diagram . . . . . | 932 |
| Figure 204. DSI Host architecture . . . . . | 934 |
| Figure 205. Flow to update the LTDC interface configuration using shadow registers . . . . . | 939 |
| Figure 206. Immediate update procedure . . . . . | 940 |
| Figure 207. Configuration update during the transmission of a frame . . . . . | 940 |
| Figure 208. Adapted command mode usage flow . . . . . | 942 |
| Figure 209. 24 bpp APB pixel to byte organization . . . . . | 946 |
| Figure 210. 18 bpp APB pixel to byte organization . . . . . | 947 |
| Figure 211. 16 bpp APB pixel to byte organization . . . . . | 947 |
| Figure 212. 12 bpp APB pixel to byte organization . . . . . | 948 |
| Figure 213. 8 bpp APB pixel to byte organization . . . . . | 948 |
| Figure 214. Timing of PRESP_TO after a bus-turn-around . . . . . | 951 |
| Figure 215. Timing of PRESP_TO after a read request (HS or LP). . . . . | 952 |
| Figure 216. Timing of PRESP_TO after a write request (HS or LP) . . . . . | 953 |
| Figure 217. Effect of prep mode at 1 . . . . . | 954 |
| Figure 218. Command transmission periods within the image area . . . . . | 955 |
| Figure 219. Transmission of commands on the last line of a frame. . . . . | 956 |
| Figure 220. LPSIZE for non-burst with sync pulses . . . . . | 957 |
| Figure 221. LPSIZE for burst or non-burst with sync events . . . . . | 957 |
| Figure 222. VLPSIZE for non-burst with sync pulses . . . . . | 959 |
| Figure 223. VLPSIZE for non-burst with sync events . . . . . | 959 |
| Figure 224. VLPSIZE for burst mode . . . . . | 959 |
| Figure 225. Location of LPSIZE and VLPSIZE in the image area . . . . . | 961 |
| Figure 226. Clock lane and data lane in HS . . . . . | 962 |
| Figure 227. Clock lane in HS and data lanes in LP . . . . . | 963 |
| Figure 228. Clock lane and data lane in LP . . . . . | 963 |
| Figure 229. Command transmission by the generic interface . . . . . | 964 |
| Figure 230. Vertical color bar mode . . . . . | 966 |
| Figure 231. Horizontal color bar mode . . . . . | 966 |
| Figure 232. RGB888 BER testing pattern . . . . . | 967 |
| Figure 233. Vertical pattern (103x15) . . . . . | 968 |
| Figure 234. Horizontal pattern (103x15) . . . . . | 968 |
| Figure 235. PLL block diagram . . . . . | 972 |
| Figure 236. Error sources . . . . . | 975 |
| Figure 237. Video packet transmission configuration flow diagram. . . . . | 986 |
| Figure 238. Programming sequence to send a test pattern. . . . . | 988 |
| Figure 239. Frame configuration registers . . . . . | 989 |
| Figure 240. TSC block diagram . . . . . | 1048 |
| Figure 241. Surface charge transfer analog I/O group structure . . . . . | 1049 |
| Figure 242. Sampling capacitor voltage variation . . . . . | 1050 |
| Figure 243. Charge transfer acquisition sequence . . . . . | 1051 |
| Figure 244. Spread spectrum variation principle . . . . . | 1052 |
| Figure 245. RNG block diagram . . . . . | 1067 |
| Figure 246. Entropy source model. . . . . | 1068 |
| Figure 247. RNG initialization overview . . . . . | 1071 |
| Figure 248. RNG block diagram . . . . . | 1080 |
| Figure 249. NIST SP800-90B entropy source model. . . . . | 1081 |
| Figure 250. RNG initialization overview . . . . . | 1084 |
| Figure 251. AES block diagram . . . . . | 1095 |
| Figure 252. ECB encryption and decryption principle . . . . . | 1097 |
| Figure 253. CBC encryption and decryption principle . . . . . | 1098 |
| Figure 254. CTR encryption and decryption principle . . . . . | 1099 |
| Figure 255. GCM encryption and authentication principle . . . . . | 1100 |
| Figure 256. GMAC authentication principle . . . . . | 1100 |
| Figure 257. CCM encryption and authentication principle . . . . . | 1101 |
| Figure 258. Encryption key derivation for ECB/CBC decryption (Mode 2). . . . . | 1104 |
| Figure 259. Example of suspend mode management . . . . . | 1105 |
| Figure 260. ECB encryption . . . . . | 1106 |
| Figure 261. ECB decryption . . . . . | 1106 |
| Figure 262. CBC encryption . . . . . | 1107 |
| Figure 263. CBC decryption . . . . . | 1107 |
| Figure 264. ECB/CBC encryption (Mode 1). . . . . | 1108 |
| Figure 265. ECB/CBC decryption (Mode 3). . . . . | 1109 |
| Figure 266. Message construction in CTR mode. . . . . | 1111 |
| Figure 267. CTR encryption . . . . . | 1112 |
| Figure 268. CTR decryption . . . . . | 1112 |
| Figure 269. Message construction in GCM . . . . . | 1114 |
| Figure 270. GCM authenticated encryption . . . . . | 1115 |
| Figure 271. Message construction in GMAC mode . . . . . | 1119 |
| Figure 272. GMAC authentication mode . . . . . | 1119 |
| Figure 273. Message construction in CCM mode . . . . . | 1120 |
| Figure 274. CCM mode authenticated encryption . . . . . | 1122 |
| Figure 275. 128-bit block construction with respect to data swap . . . . . | 1126 |
| Figure 276. DMA transfer of a 128-bit data block during input phase . . . . . | 1128 |
| Figure 277. DMA transfer of a 128-bit data block during output phase . . . . . | 1129 |
| Figure 278. HASH block diagram . . . . . | 1144 |
| Figure 279. Message data swapping feature . . . . . | 1146 |
| Figure 280. HASH suspend/resume mechanism . . . . . | 1152 |
| Figure 281. PKA block diagram . . . . . | 1167 |
| Figure 282. Advanced-control timer block diagram . . . . . | 1193 |
| Figure 283. Counter timing diagram with prescaler division change from 1 to 2 . . . . . | 1195 |
| Figure 284. Counter timing diagram with prescaler division change from 1 to 4 . . . . . | 1195 |
| Figure 285. Counter timing diagram, internal clock divided by 1 . . . . . | 1197 |
| Figure 286. Counter timing diagram, internal clock divided by 2 . . . . . | 1197 |
| Figure 287. Counter timing diagram, internal clock divided by 4 . . . . . | 1198 |
| Figure 288. Counter timing diagram, internal clock divided by N . . . . . | 1198 |
| Figure 289. Counter timing diagram, update event when ARPE=0 (TIMx_ARR not preloaded). . . . . | 1199 |
| Figure 290. Counter timing diagram, update event when ARPE=1 (TIMx_ARR preloaded). . . . . | 1199 |
| Figure 291. Counter timing diagram, internal clock divided by 1 . . . . . | 1201 |
| Figure 292. Counter timing diagram, internal clock divided by 2 . . . . . | 1201 |
| Figure 293. Counter timing diagram, internal clock divided by 4 . . . . . | 1202 |
| Figure 294. Counter timing diagram, internal clock divided by N . . . . . | 1202 |
| Figure 295. Counter timing diagram, update event when repetition counter is not used. . . . . | 1203 |
| Figure 296. Counter timing diagram, internal clock divided by 1, TIMx_ARR = 0x6 . . . . . | 1204 |
| Figure 297. Counter timing diagram, internal clock divided by 2 . . . . . | 1205 |
| Figure 298. Counter timing diagram, internal clock divided by 4, TIMx_ARR=0x36 . . . . . | 1205 |
| Figure 299. Counter timing diagram, internal clock divided by N . . . . . | 1206 |
| Figure 300. Counter timing diagram, update event with ARPE=1 (counter underflow) . . . . . | 1206 |
| Figure 301. Counter timing diagram, Update event with ARPE=1 (counter overflow) . . . . . | 1207 |
| Figure 302. Update rate examples depending on mode and TIMx_RCR register settings . . . . . | 1208 |
| Figure 303. External trigger input block . . . . . | 1209 |
| Figure 304. TIM1 ETR input circuitry . . . . . | 1209 |
| Figure 305. TIM8 ETR input circuitry . . . . . | 1209 |
| Figure 306. Control circuit in normal mode, internal clock divided by 1 . . . . . | 1210 |
| Figure 307. TI2 external clock connection example. . . . . | 1211 |
| Figure 308. Control circuit in external clock mode 1 . . . . . | 1212 |
| Figure 309. External trigger input block . . . . . | 1212 |
| Figure 310. Control circuit in external clock mode 2 . . . . . | 1213 |
| Figure 311. Capture/compare channel (example: channel 1 input stage) . . . . . | 1214 |
| Figure 312. Capture/compare channel 1 main circuit . . . . . | 1215 |
| Figure 313. Output stage of capture/compare channel (channel 1, idem ch. 2 and 3) . . . . . | 1215 |
| Figure 314. Output stage of capture/compare channel (channel 4). . . . . | 1216 |
| Figure 315. Output stage of capture/compare channel (channel 5, idem ch. 6) . . . . . | 1216 |
| Figure 316. PWM input mode timing . . . . . | 1218 |
| Figure 317. Output compare mode, toggle on OC1 . . . . . | 1220 |
| Figure 318. Edge-aligned PWM waveforms (ARR=8) . . . . . | 1221 |
| Figure 319. Center-aligned PWM waveforms (ARR=8) . . . . . | 1222 |
| Figure 320. Generation of 2 phase-shifted PWM signals with 50% duty cycle . . . . . | 1224 |
| Figure 321. Combined PWM mode on channel 1 and 3 . . . . . | 1225 |
| Figure 322. 3-phase combined PWM signals with multiple trigger pulses per period . . . . . | 1226 |
| Figure 323. Complementary output with dead-time insertion . . . . . | 1227 |
| Figure 324. Dead-time waveforms with delay greater than the negative pulse . . . . . | 1227 |
| Figure 325. Dead-time waveforms with delay greater than the positive pulse. . . . . | 1228 |
| Figure 326. Break and Break2 circuitry overview . . . . . | 1230 |
| Figure 327. Various output behavior in response to a break event on BRK (OSSI = 1) . . . . . | 1232 |
| Figure 328. PWM output state following BRK and BRK2 pins assertion (OSSI=1) . . . . . | 1233 |
| Figure 329. PWM output state following BRK assertion (OSSI=0) . . . . . | 1234 |
| Figure 330. Output redirection (BRK2 request not represented) . . . . . | 1235 |
| Figure 331. Clearing TIMx OCxREF . . . . . | 1236 |
| Figure 332. 6-step generation, COM example (OSSR=1) . . . . . | 1237 |
| Figure 333. Example of one pulse mode. . . . . | 1238 |
| Figure 334. Retriggerable one pulse mode . . . . . | 1240 |
| Figure 335. Example of counter operation in encoder interface mode. . . . . | 1241 |
| Figure 336. Example of encoder interface mode with TI1FP1 polarity inverted. . . . . | 1242 |
| Figure 337. Measuring time interval between edges on 3 signals . . . . . | 1243 |
| Figure 338. Example of Hall sensor interface . . . . . | 1245 |
| Figure 339. Control circuit in reset mode . . . . . | 1246 |
| Figure 340. Control circuit in Gated mode . . . . . | 1247 |
| Figure 341. Control circuit in trigger mode . . . . . | 1248 |
| Figure 342. Control circuit in external clock mode 2 + trigger mode . . . . . | 1249 |
| Figure 343. General-purpose timer block diagram . . . . . | 1299 |
| Figure 344. Counter timing diagram with prescaler division change from 1 to 2 . . . . . | 1301 |
| Figure 345. Counter timing diagram with prescaler division change from 1 to 4 . . . . . | 1301 |
| Figure 346. Counter timing diagram, internal clock divided by 1 . . . . . | 1302 |
| Figure 347. Counter timing diagram, internal clock divided by 2 . . . . . | 1303 |
| Figure 348. Counter timing diagram, internal clock divided by 4 . . . . . | 1303 |
| Figure 349. Counter timing diagram, internal clock divided by N. . . . . | 1304 |
| Figure 350. Counter timing diagram, Update event when ARPE=0 (TIMx_ARR not preloaded). . . . . | 1304 |
| Figure 351. Counter timing diagram, Update event when ARPE=1 (TIMx_ARR preloaded). . . . . | 1305 |
| Figure 352. Counter timing diagram, internal clock divided by 1 . . . . . | 1306 |
| Figure 353. Counter timing diagram, internal clock divided by 2 . . . . . | 1306 |
| Figure 354. Counter timing diagram, internal clock divided by 4 . . . . . | 1307 |
| Figure 355. Counter timing diagram, internal clock divided by N . . . . . | 1307 |
| Figure 356. Counter timing diagram, Update event when repetition counter is not used . . . . . | 1308 |
| Figure 357. Counter timing diagram, internal clock divided by 1, TIMx_ARR=0x6 . . . . . | 1309 |
| Figure 358. Counter timing diagram, internal clock divided by 2 . . . . . | 1310 |
| Figure 359. Counter timing diagram, internal clock divided by 4, TIMx_ARR=0x36 . . . . . | 1310 |
| Figure 360. Counter timing diagram, internal clock divided by N . . . . . | 1311 |
| Figure 361. Counter timing diagram, Update event with ARPE=1 (counter underflow). . . . . | 1311 |
| Figure 362. Counter timing diagram, Update event with ARPE=1 (counter overflow). . . . . | 1312 |
| Figure 363. Control circuit in normal mode, internal clock divided by 1 . . . . . | 1313 |
| Figure 364. TI2 external clock connection example. . . . . | 1313 |
| Figure 365. Control circuit in external clock mode 1 . . . . . | 1314 |
| Figure 366. External trigger input block . . . . . | 1315 |
| Figure 367. Control circuit in external clock mode 2 . . . . . | 1316 |
| Figure 368. Capture/Compare channel (example: channel 1 input stage) . . . . . | 1317 |
| Figure 369. Capture/Compare channel 1 main circuit . . . . . | 1317 |
| Figure 370. Output stage of Capture/Compare channel (channel 1). . . . . | 1318 |
| Figure 371. PWM input mode timing . . . . . | 1320 |
| Figure 372. Output compare mode, toggle on OC1 . . . . . | 1322 |
| Figure 373. Edge-aligned PWM waveforms (ARR=8). . . . . | 1323 |
| Figure 374. Center-aligned PWM waveforms (ARR=8). . . . . | 1324 |
| Figure 375. Generation of 2 phase-shifted PWM signals with 50% duty cycle . . . . . | 1325 |
| Figure 376. Combined PWM mode on channels 1 and 3 . . . . . | 1327 |
| Figure 377. Clearing TIMx_OCxREF . . . . . | 1328 |
| Figure 378. Example of one-pulse mode. . . . . | 1329 |
| Figure 379. Retriggerable one-pulse mode. . . . . | 1331 |
| Figure 380. Example of counter operation in encoder interface mode . . . . . | 1332 |
| Figure 381. Example of encoder interface mode with TI1FP1 polarity inverted . . . . . | 1333 |
| Figure 382. Control circuit in reset mode . . . . . | 1334 |
| Figure 383. Control circuit in gated mode . . . . . | 1335 |
| Figure 384. Control circuit in trigger mode . . . . . | 1336 |
| Figure 385. Control circuit in external clock mode 2 + trigger mode . . . . . | 1337 |
| Figure 386. Master/Slave timer example . . . . . | 1337 |
| Figure 387. Master/slave connection example with 1 channel only timers . . . . . | 1338 |
| Figure 388. Gating TIM2 with OC1REF of TIM3 . . . . . | 1339 |
| Figure 389. Gating TIM2 with Enable of TIM3 . . . . . | 1340 |
| Figure 390. Triggering TIM2 with update of TIM3 . . . . . | 1340 |
| Figure 391. Triggering TIM2 with Enable of TIM3 . . . . . | 1341 |
| Figure 392. Triggering TIM3 and TIM2 with TIM3 TI1 input. . . . . | 1342 |
| Figure 393. TIM15 block diagram . . . . . | 1373 |
| Figure 394. TIM16/TIM17 block diagram . . . . . | 1374 |
| Figure 395. Counter timing diagram with prescaler division change from 1 to 2 . . . . . | 1376 |
| Figure 396. Counter timing diagram with prescaler division change from 1 to 4 . . . . . | 1376 |
| Figure 397. Counter timing diagram, internal clock divided by 1 . . . . . | 1378 |
| Figure 398. Counter timing diagram, internal clock divided by 2 . . . . . | 1378 |
| Figure 399. Counter timing diagram, internal clock divided by 4 . . . . . | 1379 |
| Figure 400. Counter timing diagram, internal clock divided by N . . . . . | 1379 |
| Figure 401. Counter timing diagram, update event when ARPE=0 (TIMx_ARR not |
| preloaded). . . . . | 1380 |
| Figure 402. Counter timing diagram, update event when ARPE=1 (TIMx_ARR preloaded). . . . . | 1380 |
| Figure 403. Update rate examples depending on mode and TIMx_RCR register settings . . . . . | 1382 |
| Figure 404. Control circuit in normal mode, internal clock divided by 1 . . . . . | 1383 |
| Figure 405. TI2 external clock connection example. . . . . | 1383 |
| Figure 406. Control circuit in external clock mode 1 . . . . . | 1384 |
| Figure 407. Capture/compare channel (example: channel 1 input stage). . . . . | 1385 |
| Figure 408. Capture/compare channel 1 main circuit . . . . . | 1385 |
| Figure 409. Output stage of capture/compare channel (channel 1). . . . . | 1386 |
| Figure 410. Output stage of capture/compare channel (channel 2 for TIM15) . . . . . | 1386 |
| Figure 411. PWM input mode timing . . . . . | 1388 |
| Figure 412. Output compare mode, toggle on OC1 . . . . . | 1390 |
| Figure 413. Edge-aligned PWM waveforms (ARR=8) . . . . . | 1391 |
| Figure 414. Combined PWM mode on channel 1 and 2 . . . . . | 1392 |
| Figure 415. Complementary output with dead-time insertion. . . . . | 1393 |
| Figure 416. Dead-time waveforms with delay greater than the negative pulse. . . . . | 1393 |
| Figure 417. Dead-time waveforms with delay greater than the positive pulse. . . . . | 1394 |
| Figure 418. Break circuitry overview . . . . . | 1396 |
| Figure 419. Output behavior in response to a break . . . . . | 1398 |
| Figure 420. Output redirection . . . . . | 1400 |
| Figure 421. Example of one pulse mode . . . . . | 1402 |
| Figure 422. Retriggerable one pulse mode . . . . . | 1403 |
| Figure 423. Measuring time interval between edges on 2 signals . . . . . | 1405 |
| Figure 424. Control circuit in reset mode . . . . . | 1406 |
| Figure 425. Control circuit in gated mode . . . . . | 1407 |
| Figure 426. Control circuit in trigger mode . . . . . | 1408 |
| Figure 427. Basic timer block diagram. . . . . | 1460 |
| Figure 428. Counter timing diagram with prescaler division change from 1 to 2 . . . . . | 1462 |
| Figure 429. Counter timing diagram with prescaler division change from 1 to 4 . . . . . | 1462 |
| Figure 430. Counter timing diagram, internal clock divided by 1 . . . . . | 1463 |
| Figure 431. Counter timing diagram, internal clock divided by 2 . . . . . | 1464 |
| Figure 432. Counter timing diagram, internal clock divided by 4 . . . . . | 1464 |
| Figure 433. Counter timing diagram, internal clock divided by N . . . . . | 1465 |
| Figure 434. Counter timing diagram, update event when ARPE = 0 (TIMx_ARR not preloaded). . . . . | 1465 |
| Figure 435. Counter timing diagram, update event when ARPE=1 (TIMx_ARR preloaded). . . . . | 1466 |
| Figure 436. Control circuit in normal mode, internal clock divided by 1 . . . . . | 1467 |
| Figure 437. Low-power timer block diagram . . . . . | 1474 |
| Figure 438. Glitch filter timing diagram . . . . . | 1477 |
| Figure 439. LPTIM output waveform, single counting mode configuration . . . . . | 1479 |
| Figure 440. LPTIM output waveform, Single counting mode configuration and Set-once mode activated (WAVE bit is set). . . . . | 1479 |
| Figure 441. LPTIM output waveform, Continuous counting mode configuration . . . . . | 1480 |
| Figure 442. Waveform generation . . . . . | 1481 |
| Figure 443. Encoder mode counting sequence . . . . . | 1485 |
| Figure 444. Low-power timer block diagram . . . . . | 1500 |
| Figure 445. Glitch filter timing diagram . . . . . | 1503 |
| Figure 446. LPTIM output waveform, single counting mode configuration when repetition register content is different than zero (with PRELOAD = 1) . . . . . | 1505 |
| Figure 447. LPTIM output waveform, Single counting mode configuration |
| and Set-once mode activated (WAVE bit is set) . . . . . | 1505 |
| Figure 448. LPTIM output waveform, Continuous counting mode configuration . . . . . | 1506 |
| Figure 449. Waveform generation . . . . . | 1507 |
| Figure 450. Encoder mode counting sequence . . . . . | 1511 |
| Figure 451. Continuous counting mode when repetition register LPTIM_RCR different from zero (with PRELOAD = 1). . . . . | 1512 |
| Figure 452. IRTIM internal hardware connections with TIM16 and TIM17 . . . . . | 1526 |
| Figure 453. Independent watchdog block diagram . . . . . | 1527 |
| Figure 454. Watchdog block diagram . . . . . | 1537 |
| Figure 455. Window watchdog timing diagram . . . . . | 1538 |
| Figure 456. RTC block diagram . . . . . | 1544 |
| Figure 457. RTC block diagram . . . . . | 1588 |
| Figure 458. TAMP block diagram . . . . . | 1630 |
| Figure 459. I2C block diagram . . . . . | 1646 |
| Figure 460. I2C bus protocol . . . . . | 1648 |
| Figure 461. Setup and hold timings . . . . . | 1650 |
| Figure 462. I2C initialization flowchart . . . . . | 1653 |
| Figure 463. Data reception . . . . . | 1654 |
| Figure 464. Data transmission . . . . . | 1655 |
| Figure 465. Slave initialization flowchart . . . . . | 1658 |
| Figure 466. Transfer sequence flowchart for I2C slave transmitter, NOSTRETCH= 0 . . . . . | 1660 |
| Figure 467. Transfer sequence flowchart for I2C slave transmitter, NOSTRETCH= 1 . . . . . | 1661 |
| Figure 468. Transfer bus diagrams for I2C slave transmitter . . . . . | 1662 |
| Figure 469. Transfer sequence flowchart for slave receiver with NOSTRETCH=0 . . . . . | 1663 |
| Figure 470. Transfer sequence flowchart for slave receiver with NOSTRETCH=1 . . . . . | 1664 |
| Figure 471. Transfer bus diagrams for I2C slave receiver . . . . . | 1664 |
| Figure 472. Master clock generation . . . . . | 1666 |
| Figure 473. Master initialization flowchart . . . . . | 1668 |
| Figure 474. 10-bit address read access with HEAD10R=0 . . . . . | 1668 |
| Figure 475. 10-bit address read access with HEAD10R=1 . . . . . | 1669 |
| Figure 476. Transfer sequence flowchart for I2C master transmitter for N≤255 bytes . . . . . | 1670 |
| Figure 477. Transfer sequence flowchart for I2C master transmitter for N>255 bytes . . . . . | 1671 |
| Figure 478. Transfer bus diagrams for I2C master transmitter . . . . . | 1672 |
| Figure 479. Transfer sequence flowchart for I2C master receiver for N≤255 bytes . . . . . | 1674 |
| Figure 480. Transfer sequence flowchart for I2C master receiver for N >255 bytes . . . . . | 1675 |
| Figure 481. Transfer bus diagrams for I2C master receiver . . . . . | 1676 |
| Figure 482. Timeout intervals for \( t_{LOW:SEXT} \) , \( t_{LOW:MEXT} \) . . . . . | 1680 |
| Figure 483. Transfer sequence flowchart for SMBus slave transmitter N bytes + PEC . . . . . | 1684 |
| Figure 484. Transfer bus diagrams for SMBus slave transmitter (SBC=1) . . . . . | 1685 |
| Figure 485. Transfer sequence flowchart for SMBus slave receiver N Bytes + PEC . . . . . | 1686 |
| Figure 486. Bus transfer diagrams for SMBus slave receiver (SBC=1). . . . . | 1687 |
| Figure 487. Bus transfer diagrams for SMBus master transmitter . . . . . | 1688 |
| Figure 488. Bus transfer diagrams for SMBus master receiver . . . . . | 1690 |
| Figure 489. USART block diagram . . . . . | 1715 |
| Figure 490. Word length programming . . . . . | 1718 |
| Figure 491. Configurable stop bits . . . . . | 1720 |
| Figure 492. TC/TXE behavior when transmitting . . . . . | 1723 |
| Figure 493. Start bit detection when oversampling by 16 or 8. . . . . | 1724 |
| Figure 494. usart_ker_ck clock divider block diagram . . . . . | 1727 |
| Figure 495. Data sampling when oversampling by 16 . . . . . | 1728 |
| Figure 496. | Data sampling when oversampling by 8 . . . . . | 1729 |
| Figure 497. | Mute mode using Idle line detection . . . . . | 1736 |
| Figure 498. | Mute mode using address mark detection . . . . . | 1737 |
| Figure 499. | Break detection in LIN mode (11-bit break length - LBDL bit is set) . . . . . | 1740 |
| Figure 500. | Break detection in LIN mode vs. Framing error detection. . . . . | 1741 |
| Figure 501. | USART example of synchronous master transmission. . . . . | 1742 |
| Figure 502. | USART data clock timing diagram in synchronous master mode (M bits = 00) . . . . . | 1742 |
| Figure 503. | USART data clock timing diagram in synchronous master mode (M bits = 01) . . . . . | 1743 |
| Figure 504. | USART data clock timing diagram in synchronous slave mode (M bits = 00) . . . . . | 1744 |
| Figure 505. | ISO 7816-3 asynchronous protocol . . . . . | 1746 |
| Figure 506. | Parity error detection using the 1.5 stop bits . . . . . | 1748 |
| Figure 507. | IrDA SIR ENDEC block diagram. . . . . | 1752 |
| Figure 508. | IrDA data modulation (3/16) - Normal mode. . . . . | 1752 |
| Figure 509. | Transmission using DMA . . . . . | 1754 |
| Figure 510. | Reception using DMA . . . . . | 1755 |
| Figure 511. | Hardware flow control between 2 USARTs . . . . . | 1755 |
| Figure 512. | RS232 RTS flow control . . . . . | 1756 |
| Figure 513. | RS232 CTS flow control . . . . . | 1757 |
| Figure 514. | Wakeup event verified (wakeup event = address match, FIFO disabled) . . . . . | 1760 |
| Figure 515. | Wakeup event not verified (wakeup event = address match, FIFO disabled) . . . . . | 1760 |
| Figure 516. | LPUART block diagram . . . . . | 1802 |
| Figure 517. | LPUART word length programming . . . . . | 1804 |
| Figure 518. | Configurable stop bits . . . . . | 1806 |
| Figure 519. | TC/TXE behavior when transmitting . . . . . | 1808 |
| Figure 520. | lpuart_ker_ck clock divider block diagram . . . . . | 1811 |
| Figure 521. | Mute mode using Idle line detection . . . . . | 1815 |
| Figure 522. | Mute mode using address mark detection . . . . . | 1816 |
| Figure 523. | Transmission using DMA . . . . . | 1818 |
| Figure 524. | Reception using DMA . . . . . | 1819 |
| Figure 525. | Hardware flow control between 2 LPUARTs . . . . . | 1820 |
| Figure 526. | RS232 RTS flow control . . . . . | 1820 |
| Figure 527. | RS232 CTS flow control . . . . . | 1821 |
| Figure 528. | Wakeup event verified (wakeup event = address match, FIFO disabled) . . . . . | 1824 |
| Figure 529. | Wakeup event not verified (wakeup event = address match, FIFO disabled) . . . . . | 1824 |
| Figure 530. | SPI block diagram. . . . . | 1853 |
| Figure 531. | Full-duplex single master/ single slave application. . . . . | 1854 |
| Figure 532. | Half-duplex single master/ single slave application . . . . . | 1855 |
| Figure 533. | Simplex single master/single slave application (master in transmit-only/ slave in receive-only mode) . . . . . | 1856 |
| Figure 534. | Master and three independent slaves. . . . . | 1857 |
| Figure 535. | Multi-master application . . . . . | 1858 |
| Figure 536. | Hardware/software slave select management . . . . . | 1859 |
| Figure 537. | Data clock timing diagram . . . . . | 1860 |
| Figure 538. | Data alignment when data length is not equal to 8-bit or 16-bit . . . . . | 1861 |
| Figure 539. | Packing data in FIFO for transmission and reception. . . . . | 1865 |
| Figure 540. | Master full-duplex communication . . . . . | 1868 |
| Figure 541. Slave full-duplex communication . . . . . | 1869 |
| Figure 542. Master full-duplex communication with CRC . . . . . | 1870 |
| Figure 543. Master full-duplex communication in packed mode . . . . . | 1871 |
| Figure 544. NSSP pulse generation in Motorola SPI master mode . . . . . | 1874 |
| Figure 545. TI mode transfer . . . . . | 1875 |
| Figure 546. SAI functional block diagram . . . . . | 1889 |
| Figure 547. Audio frame . . . . . | 1893 |
| Figure 548. FS role is start of frame + channel side identification (FSDEF = TRIS = 1) . . . . . | 1895 |
| Figure 549. FS role is start of frame (FSDEF = 0) . . . . . | 1896 |
| Figure 550. Slot size configuration with FBOFF = 0 in SAI_xSLOTR . . . . . | 1897 |
| Figure 551. First bit offset . . . . . | 1897 |
| Figure 552. Audio block clock generator overview . . . . . | 1898 |
| Figure 553. PDM typical connection and timing . . . . . | 1902 |
| Figure 554. Detailed PDM interface block diagram . . . . . | 1903 |
| Figure 555. Start-up sequence . . . . . | 1904 |
| Figure 556. SAI_ADR format in TDM, 32-bit slot width . . . . . | 1905 |
| Figure 557. SAI_ADR format in TDM, 16-bit slot width . . . . . | 1906 |
| Figure 558. SAI_ADR format in TDM, 8-bit slot width . . . . . | 1907 |
| Figure 559. AC'97 audio frame . . . . . | 1910 |
| Figure 560. Example of typical AC'97 configuration on devices featuring at least 2 embedded SAIs (three external AC'97 decoders) . . . . . | 1911 |
| Figure 561. SPDIF format . . . . . | 1912 |
| Figure 562. SAI_xDR register ordering . . . . . | 1913 |
| Figure 563. Data companding hardware in an audio block in the SAI . . . . . | 1917 |
| Figure 564. Tristate strategy on SD output line on an inactive slot . . . . . | 1918 |
| Figure 565. Tristate on output data line in a protocol like I2S . . . . . | 1919 |
| Figure 566. Overrun detection error . . . . . | 1920 |
| Figure 567. FIFO underrun event . . . . . | 1920 |
| Figure 568. SDMMC “no response” and “no data” operations . . . . . | 1956 |
| Figure 569. SDMMC (multiple) block read operation . . . . . | 1956 |
| Figure 570. SDMMC (multiple) block write operation . . . . . | 1957 |
| Figure 571. SDMMC (sequential) stream read operation . . . . . | 1957 |
| Figure 572. SDMMC (sequential) stream write operation . . . . . | 1957 |
| Figure 573. SDMMC block diagram . . . . . | 1959 |
| Figure 574. SDMMC Command and data phase relation . . . . . | 1960 |
| Figure 575. Control unit . . . . . | 1962 |
| Figure 576. Command/response path . . . . . | 1963 |
| Figure 577. Command path state machine (CPSM) . . . . . | 1964 |
| Figure 578. Data path . . . . . | 1970 |
| Figure 579. DDR mode data packet clocking . . . . . | 1971 |
| Figure 580. DDR mode CRC status / boot acknowledgment clocking . . . . . | 1971 |
| Figure 581. Data path state machine (DPSM) . . . . . | 1972 |
| Figure 582. CLKMUX unit . . . . . | 1983 |
| Figure 583. Asynchronous interrupt generation . . . . . | 1987 |
| Figure 584. Synchronous interrupt period data read . . . . . | 1987 |
| Figure 585. Synchronous interrupt period data write . . . . . | 1988 |
| Figure 586. Asynchronous interrupt period data read . . . . . | 1989 |
| Figure 587. Asynchronous interrupt period data write . . . . . | 1989 |
| Figure 588. Clock stop with SDMMC_CK for DS, HS, SDR12, SDR25 . . . . . | 1992 |
| Figure 589. Clock stop with SDMMC_CK for DDR50, SDR50 . . . . . | 1992 |
| Figure 590. Read Wait with SDMMC_CK < 50 MHz . . . . . | 1993 |
| Figure 591. Read Wait with SDMMC_CK > 50 MHz . . . . . | 1994 |
| Figure 592. CMD12 stream timing . . . . . | 1996 |
| Figure 593. CMD5 Sleep Awake procedure . . . . . | 1998 |
| Figure 594. Normal boot mode operation . . . . . | 2000 |
| Figure 595. Alternative boot mode operation . . . . . | 2001 |
| Figure 596. Command response R1b busy signaling . . . . . | 2002 |
| Figure 597. SDMMC state control . . . . . | 2003 |
| Figure 598. Card cycle power / power up diagram . . . . . | 2004 |
| Figure 599. CMD11 signal voltage switch sequence . . . . . | 2005 |
| Figure 600. Voltage switch transceiver typical application . . . . . | 2007 |
| Figure 601. CAN network topology . . . . . | 2036 |
| Figure 602. Dual-CAN block diagram . . . . . | 2037 |
| Figure 603. bxCAN operating modes . . . . . | 2039 |
| Figure 604. bxCAN in silent mode . . . . . | 2040 |
| Figure 605. bxCAN in loop back mode . . . . . | 2040 |
| Figure 606. bxCAN in combined mode . . . . . | 2041 |
| Figure 607. Transmit mailbox states . . . . . | 2043 |
| Figure 608. Receive FIFO states . . . . . | 2044 |
| Figure 609. Filter bank scale configuration - Register organization . . . . . | 2046 |
| Figure 610. Example of filter numbering . . . . . | 2047 |
| Figure 611. Filtering mechanism example . . . . . | 2048 |
| Figure 612. CAN error state diagram . . . . . | 2050 |
| Figure 613. Bit timing . . . . . | 2052 |
| Figure 614. CAN frames . . . . . | 2053 |
| Figure 615. Event flags and interrupt generation . . . . . | 2054 |
| Figure 616. CAN mailbox registers . . . . . | 2066 |
| Figure 617. OTG_FS full-speed block diagram . . . . . | 2083 |
| Figure 618. OTG_FS A-B device connection . . . . . | 2085 |
| Figure 619. OTG_FS peripheral-only connection . . . . . | 2087 |
| Figure 620. OTG_FS host-only connection . . . . . | 2091 |
| Figure 621. SOF connectivity (SOF trigger output to TIM and ITR1 connection) . . . . . | 2095 |
| Figure 622. Updating OTG_HFIR dynamically (RLDCTRL = 1) . . . . . | 2097 |
| Figure 623. Device-mode FIFO address mapping and AHB FIFO access mapping . . . . . | 2098 |
| Figure 624. Host-mode FIFO address mapping and AHB FIFO access mapping . . . . . | 2099 |
| Figure 625. Interrupt hierarchy . . . . . | 2103 |
| Figure 626. Transmit FIFO write task . . . . . | 2189 |
| Figure 627. Receive FIFO read task . . . . . | 2190 |
| Figure 628. Normal bulk/control OUT/SETUP . . . . . | 2191 |
| Figure 629. Bulk/control IN transactions . . . . . | 2195 |
| Figure 630. Normal interrupt OUT . . . . . | 2198 |
| Figure 631. Normal interrupt IN . . . . . | 2203 |
| Figure 632. Isochronous OUT transactions . . . . . | 2205 |
| Figure 633. Isochronous IN transactions . . . . . | 2208 |
| Figure 634. Receive FIFO packet read . . . . . | 2212 |
| Figure 635. Processing a SETUP packet . . . . . | 2214 |
| Figure 636. Bulk OUT transaction . . . . . | 2221 |
| Figure 637. TRDT max timing case . . . . . | 2231 |
| Figure 638. A-device SRP . . . . . | 2232 |
| Figure 639. B-device SRP . . . . . | 2233 |
| Figure 640. A-device HNP . . . . . | 2234 |
| Figure 641. B-device HNP . . . . . | 2236 |
| Figure 642. Block diagram of STM32 MCU and Cortex ® -M4-level debug support . . . . . | 2238 |
| Figure 643. SWJ debug port . . . . . | 2240 |
Figure 644. JTAG TAP connections . . . . . 2244
Figure 645. TPIU block diagram . . . . . 2263
Chapters
- 1. Documentation conventions
- 2. System and memory overview
- 3. Embedded Flash memory (FLASH)
- 4. Firewall (FW)
- 5. Power control (PWR)
- 6. Reset and clock control (RCC)
- 7. Clock recovery system (CRS)
- 8. General-purpose I/Os (GPIO)
- 9. System configuration controller (SYSCFG)
- 10. Peripherals interconnect matrix
- 11. Direct memory access controller (DMA)
- 12. DMA request multiplexer (DMAMUX)
- 13. Chrom-ART Accelerator controller (DMA2D)
- 14. Chrom-GRC (GFXMMU)
- 15. Nested vectored interrupt controller (NVIC)
- 16. Extended interrupts and events controller (EXTI)
- 17. Cyclic redundancy check calculation unit (CRC)
- 18. Flexible static memory controller (FSMC)
- 19. Octo-SPI interface (OCTOSPI)
- 20. OCTOSPI I/O manager (OCTOSPIM)
- 21. Analog-to-digital converters (ADC)
- 22. Digital-to-analog converter (DAC)
- 23. Voltage reference buffer (VREFBUF)
- 24. Digital camera interface (DCMI)
- 25. Parallel synchronous slave interface (PSSI) applied to STM32L4P5xx and STM32LQ5xx only
- 26. Comparator (COMP)
- 27. Operational amplifiers (OPAMP)
- 28. Digital filter for sigma delta modulators (DFSDM)
- 29. LCD-TFT display controller (LTDC)
- 30. DSI Host (DSI) applied to STM32L4R9xx and STM32L4S9xx only
- 31. Touch sensing controller (TSC)
- 32. True random number generator (RNG) applied to STM32L4Rxxx and STM32L4Sxxx only
- 33. True random number generator (RNG) applied to STM32L4P5xx and STM32L4Q5xx only
- 34. AES hardware accelerator (AES)
- 35. Hash processor (HASH)
- 36. Public key accelerator (PKA) applied to STM32L4P5xx and STM32L4Q5xx only
- 37. Advanced-control timers (TIM1/TIM8)
- 38. General-purpose timers (TIM2/TIM3/TIM4/TIM5)
- 39. General-purpose timers (TIM15/TIM16/TIM17)
- 40. Basic timers (TIM6/TIM7)
- 41. Low-power timer (LPTIM) applied to STM32L4Rxxx and STM32L4Sxxx only
- 42. Low-power timer (LPTIM) applied to STM32L4P5xx and STM32L4Q5xx only
- 43. Infrared interface (IRTIM)
- 44. Independent watchdog (IWDG)
- 45. System window watchdog (WWDG)
- 46. Real-time clock (RTC) applied to STM32L4Rxxx and STM32L4Sxxx only
- 47. Real-time clock (RTC) applied to STM32L4P5xx and STM32L4Q5xx only
- 48. Tamper and backup registers (TAMP) applied to STM32L4P5xx and STM32L4Q5xx only
- 49. Inter-integrated circuit (I2C) interface
- 50. Universal synchronous/asynchronous receiver transmitter (USART/UART)
- 51. Low-power universal asynchronous receiver transmitter (LPUART)
- 52. Serial peripheral interface (SPI)
- 53. Serial audio interface (SAI)
- 54. Secure digital input/output MultiMediaCard interface (SDMMC)
- 55. Controller area network (bxCAN)
- 56. USB on-the-go full-speed (OTG_FS)
- 57. Debug support (DBG)
- 58. Device electronic signature
- 59. Revision history
- Index