RM0481-STM32H523-533-543-553-562-563-573

This document is addressed to application developers. It provides complete information on how to use the STM32H523xx, STM32H533xx, STM32H543xx, STM32H553xx, STM32H562xx, STM32H563xx, and STM32H573xx microcontrollers memory and peripherals.

For ordering information, mechanical and electrical device characteristics, refer to the corresponding datasheets.

For information on the Arm® Cortex®-M33 core, refer to the corresponding Arm® Technical Reference Manuals available on http://infocenter.arm.com.

Contents

1Documentation conventions119
1.1General information119
1.2List of abbreviations for registers119
1.3Register reset value120
1.4Glossary120
2Memory and bus architecture121
2.1System architecture121
2.1.1Fast C-bus122
2.1.2Slow C-bus123
2.1.3S-bus123
2.1.4DCache S-bus123
2.1.5GPDMA1 and GPDMA2 buses123
2.1.6SDMMC1 and SDMMC2 controllers DMA buses123
2.1.7BusMatrix123
2.1.8AHB/APB bridges124
2.1.9Ethernet MAC124
2.2TrustZone security architecture124
2.2.1Default TrustZone security state124
2.2.2TrustZone peripheral classification125
2.3Memory organization130
2.3.1Introduction130
2.3.2Memory map and register boundary addresses131
2.3.3Embedded SRAMs147
2.3.4Flash memory overview147
2.3.5Boot modes147
3System security149
3.1Key security features149
3.2Secure install150
3.3Secure boot151
3.3.1Unique boot entry151
3.3.2Immutable root of trust in system flash memory152
3.4Secure update .....152
3.5Resource isolation using hide protection levels .....153
3.6Resource isolation using TrustZone .....153
3.6.1TrustZone security architecture .....154
3.6.2Armv8-M security extension of Cortex-M33 .....154
3.6.3Memory and peripheral allocation using IDAU/SAU .....154
3.6.4Memory and peripheral allocation using GTZC .....156
3.6.5Managing security in TrustZone-aware peripherals .....160
3.6.6Activating TrustZone security .....166
3.6.7Deactivating TrustZone security .....167
3.7Other resources isolation .....168
3.7.1Temporal isolation using secure hide protection (HDP) .....168
3.7.2Resource isolation using Cortex privileged mode .....168
3.8Secure execution .....172
3.8.1Memory protection unit (MPU) .....172
3.8.2Embedded flash memory write protection .....173
3.8.3Tamper detection and response .....173
3.9Secure storage .....175
3.9.1Hardware secret key management .....176
3.9.2Unique ID .....177
3.10Crypto engines .....177
3.10.1Crypto engines features .....177
3.10.2Secure AES co-processor (SAES) .....178
3.10.3On-the-fly decryption engine (OTFDEC) .....179
3.11Product life cycle .....179
3.11.1Product configurations and security services .....181
3.11.2Life cycle management .....181
3.11.3Recommended product settings .....184
3.12Software intellectual property protection and collaborative development .....184
3.12.1Software intellectual property protection .....186
3.12.2Software intellectual property protection with OTFDEC .....186
3.12.3Other software intellectual property protections .....188
4Boot modes .....189
4.1STM32H523/43/62/63xx boot modes .....190
4.2STM32H533/53/73xx boot modes .....191
5Global TrustZone® controller (GTZC) .....192
5.1GTZC introduction .....192
5.2GTZC main features .....192
5.3GTZC implementation .....194
5.4GTZC functional description .....196
5.4.1GTZC block diagram .....196
5.4.2Illegal access definition .....197
5.4.3TrustZone security controller (TZSC) .....198
5.4.4Memory protection controller - block based (MPCBB) .....199
5.4.5TrustZone illegal access controller (TZIC) .....200
5.4.6Power-on/reset state .....200
5.5GTZC interrupts .....200
5.6GTZC1 TZSC registers .....201
5.6.1GTZC1 TZSC control register (GTZC1_TZSC_CR) .....201
5.6.2GTZC1 TZSC secure configuration register 1
(GTZC1_TZSC_SECCFGR1) .....
201
5.6.3GTZC1 TZSC secure configuration register 2
(GTZC1_TZSC_SECCFGR2) .....
204
5.6.4GTZC1 TZSC secure configuration register 3
(GTZC1_TZSC_SECCFGR3) .....
206
5.6.5GTZC1 TZSC privilege configuration register 1
(GTZC1_TZSC_PRIVCFGR1) .....
209
5.6.6GTZC1 TZSC privilege configuration register 2
(GTZC1_TZSC_PRIVCFGR2) .....
211
5.6.7GTZC1 TZSC privilege configuration register 3
(GTZC1_TZSC_PRIVCFGR3) .....
213
5.6.8GTZC1 TZSC memory x subregion A watermark configuration
register (GTZC1_TZSC_MPCWMxACFGR) .....
216
5.6.9GTZC1 TZSC memory x subregion A watermark register
(GTZC1_TZSC_MPCWMxAR) .....
217
5.6.10GTZC1 TZSC memory x subregion B watermark configuration
register (GTZC1_TZSC_MPCWMxBCFGR) .....
217
5.6.11GTZC1 TZSC memory x subregion B watermark register
(GTZC1_TZSC_MPCWMxBR) .....
218
5.6.12GTZC1 TZSC register map .....220
5.7GTZC1 TZIC registers .....222
5.7.1GTZC1 TZIC interrupt enable register 1 (GTZC1_TZIC_IER1) .....222
5.7.2GTZC1 TZIC interrupt enable register 2 (GTZC1_TZIC_IER2) .....224
5.7.3GTZC1 TZIC interrupt enable register 3 (GTZC1_TZIC_IER3) .....226
5.7.4GTZC1 TZIC interrupt enable register 4 (GTZC1_TZIC_IER4) . . . . .229
5.7.5GTZC1 TZIC status register 1 (GTZC1_TZIC_SR1) . . . . .231
5.7.6GTZC1 TZIC status register 2 (GTZC1_TZIC_SR2) . . . . .233
5.7.7GTZC1 TZIC status register 3 (GTZC1_TZIC_SR3) . . . . .236
5.7.8GTZC1 TZIC status register 4 (GTZC1_TZIC_SR4) . . . . .238
5.7.9GTZC1 TZIC flag clear register 1 (GTZC1_TZIC_FCR1) . . . . .240
5.7.10GTZC1 TZIC flag clear register 2 (GTZC1_TZIC_FCR2) . . . . .242
5.7.11GTZC1 TZIC flag clear register 3 (GTZC1_TZIC_FCR3) . . . . .244
5.7.12GTZC1 TZIC flag clear register 4 (GTZC1_TZIC_FCR4) . . . . .246
5.7.13GTZC1 TZIC register map . . . . .249
5.8GTZC1 MPCBBz registers (z = 1 to 3) . . . . .251
5.8.1GTZC1 SRAMz MPCBB control register
(GTZC1_MPCBBz_CR) (z = 1 to 3) . . . . .
251
5.8.2GTZC1 SRAMz MPCBB configuration lock register 1
(GTZC1_MPCBBz_CFGLOCK1) (z = 1 to 3) . . . . .
251
5.8.3GTZC1 SRAMz MPCBB security configuration for super-block x
register (GTZC1_MPCBBz_SECCFGRx) (z = 1 to 3) . . . . .
252
5.8.4GTZC1 SRAMz MPCBB privileged configuration for super-block x
register (GTZC1_MPCBBz_PRIVCFGRx) (z = 1 to 3) . . . . .
252
5.8.5GTZC1 MPCBBz register map (z = 1 to 3) . . . . .253
6RAMs configuration controller (RAMCFG) . . . . .254
6.1RAMCFG introduction . . . . .254
6.2RAMCFG main features . . . . .254
6.3RAMCFG functional description . . . . .254
6.3.1Internal SRAMs features . . . . .254
6.3.2Error code correction (SRAM2, SRAM3, BKPSRAM) . . . . .255
6.3.3Write protection (SRAM2) . . . . .258
6.3.4Software erase . . . . .259
6.4RAMCFG low-power modes . . . . .259
6.5RAMCFG interrupts . . . . .259
6.6RAMCFG registers . . . . .260
6.6.1RAMCFG memory x control register (RAMCFG_MxCR) . . . . .260
6.6.2RAMCFG memory x interrupt enable register (RAMCFG_MxIER) . . .260
6.6.3RAMCFG memory interrupt status register (RAMCFG_MxISR) . . . .261
6.6.4RAMCFG memory x ECC single error address register
(RAMCFG_MxSEAR) . . . . .
262
6.6.5RAMCFG memory x ECC double error address register (RAMCFG_MxDEAR) .....262
6.6.6RAMCFG memory x interrupt clear register x (RAMCFG_MxICR) ...262
6.6.7RAMCFG memory 2 write protection register 1 (RAMCFG_M2WPR1) .....263
6.6.8RAMCFG memory 2 write protection register 2 (RAMCFG_M2WPR2) .....263
6.6.9RAMCFG memory 2 write protection register 3 (RAMCFG_M2WPR3) .....264
6.6.10RAMCFG memory x ECC key register (RAMCFG_MxECCKEYR) ...264
6.6.11RAMCFG memory x erase key register (RAMCFG_MxERKEYR) ...265
6.6.12RAMCFG register map .....266
7Embedded flash memory (FLASH) .....269
7.1FLASH introduction .....269
7.2FLASH main features .....269
7.3FLASH functional description .....270
7.3.1FLASH block diagram .....270
7.3.2FLASH signals .....271
7.3.3Flash memory architecture and usage .....272
7.3.4FLASH read operations .....274
7.3.5FLASH program operations .....276
7.3.6FLASH erase operations .....279
7.3.7FLASH parallel operations .....282
7.3.8FLASH error protections .....283
7.3.9OTP and RO memory access .....283
7.3.10Flash high-cycle data .....285
7.3.11Flash bank swapping .....287
7.3.12FLASH reset and clocks .....291
7.4FLASH option bytes .....292
7.4.1About option bytes .....292
7.4.2Option bytes loading .....292
7.4.3Option bytes modification .....293
7.4.4Description of user and system option bytes .....296
7.4.5Description of data protection option bytes .....297
7.4.6Description of boot address option bytes .....297
7.4.7Specific rules for modifying option bytes .....298
7.5Option bytes key (OBK) management .....300
7.5.1OBK loading . . . . .300
7.5.2OBK access per HDPL level . . . . .300
7.5.3OBK programming sequence . . . . .301
7.5.4OBK programming finite state machine . . . . .302
7.5.5OBK swap sector . . . . .303
7.5.6OBK alternate sector erase . . . . .305
7.6FLASH security and protections . . . . .305
7.6.1TrustZone security protection . . . . .306
7.6.2Hide protection (HDP) . . . . .308
7.6.3Block-based secure flash memory area protection . . . . .310
7.6.4Block-based privileged flash memory area protection . . . . .311
7.6.5Flash memory register privileged and unprivileged modes . . . . .312
7.6.6Flash memory banks attributes in case of bank swap . . . . .313
7.6.7Flash memory configuration protection . . . . .314
7.6.8Write protection . . . . .315
7.6.9Flash high-cycle data protections . . . . .315
7.6.10Life cycle management . . . . .317
7.6.11Product state transitions . . . . .318
7.6.12OBK protection . . . . .320
7.6.13One-time-programmable and read-only memory protections . . . . .321
7.7System memory . . . . .322
7.7.1Introduction . . . . .322
7.7.2RSS user functions . . . . .322
7.8FLASH low-power modes . . . . .329
7.9FLASH error management . . . . .330
7.9.1Introduction . . . . .330
7.9.2Nonsecure write protection error (WRPERR) . . . . .330
7.9.3Secure write protection error (WRPERR) . . . . .331
7.9.4Non secure programming sequence error (PGSERR) . . . . .332
7.9.5Secure programming sequence error (PGSERR) . . . . .333
7.9.6Nonsecure strobe error (STRBERR) . . . . .334
7.9.7Secure strobe error (STRBERR) . . . . .334
7.9.8Nonsecure inconsistency error (INCERR) . . . . .334
7.9.9Secure inconsistency error (INCERR) . . . . .335
7.9.10Error correction code error (ECCC, ECCD) . . . . .336
7.9.11Illegal access (ILAFM/ILAP) . . . . .337
7.9.12Option byte change error (OPTCHANGEERR) . . . . .337
7.9.13Miscellaneous HardFault errors .....338
7.9.14OBK error cases (OBKERR, OBKWERR) .....338
7.10FLASH interrupts .....339
7.11FLASH registers .....341
7.11.1FLASH access control register (FLASH_ACR) .....341
7.11.2FLASH nonsecure key register (FLASH_NSKEYR) .....342
7.11.3FLASH secure key register (FLASH_SECKEYR) .....342
7.11.4FLASH option key register (FLASH_OPTKEYR) .....343
7.11.5FLASH nonsecure OBK key register (FLASH_NSOBKKEYR) .....343
7.11.6FLASH secure OBK key register (FLASH_SECOBKKEYR) .....343
7.11.7FLASH operation status register (FLASH_OPSR) .....344
7.11.8FLASH option control register (FLASH_OPTCR) .....345
7.11.9FLASH nonsecure status register (FLASH_NSSR) .....346
7.11.10FLASH secure status register (FLASH_SECSR) .....348
7.11.11FLASH nonsecure control register (FLASH_NSCR) .....350
7.11.12FLASH secure control register (FLASH_SECCR) .....352
7.11.13FLASH nonsecure clear control register (FLASH_NSCCR) .....355
7.11.14FLASH secure clear control register (FLASH_SECCCR) .....356
7.11.15FLASH privilege configuration register (FLASH_PRIVCFGR) .....357
7.11.16FLASH nonsecure OBK configuration register
(FLASH_NSOBKCFGR) .....
357
7.11.17FLASH secure OBK configuration register (FLASH_SECOBKCFGR) .....358
7.11.18FLASH HDP extension register (FLASH_HDPEXTR) .....359
7.11.19FLASH option status register (FLASH_OPTSR_CUR) .....360
7.11.20FLASH option status register (FLASH_OPTSR_PRG) .....362
7.11.21FLASH nonsecure EPOCH register (FLASH_NSEPOCHR_CUR) .....363
7.11.22FLASH secure EPOCH register (FLASH_SECEPOCHR_CUR) .....364
7.11.23FLASH option status register 2 (FLASH_OPTSR2_CUR) .....364
7.11.24FLASH option status register 2 (FLASH_OPTSR2_PRG) .....365
7.11.25FLASH nonsecure boot register (FLASH_NSBOOTR_CUR) .....367
7.11.26FLASH nonsecure boot register (FLASH_NSBOOTR_PRG) .....367
7.11.27FLASH secure boot register (FLASH_SECBOTR_CUR) .....368
7.11.28FLASH secure boot register (FLASH_BOOTR_PRG) .....368
7.11.29FLASH nonsecure OTP block lock (FLASH_OTPBLR_CUR) .....369
7.11.30FLASH nonsecure OTP block lock (FLASH_OTPBLR_PRG) .....369
7.11.31FLASH secure block based register for Bank1 (FLASH_SECBB1Rx) .....370
7.11.32FLASH privilege block based register for Bank1
(FLASH_PRIVBB1Rx) .....
370
7.11.33FLASH security watermark for Bank1 (FLASH_SECWM1R_CUR) ..371
7.11.34FLASH security watermark for Bank1 (FLASH_SECWM1R_PRG) ..371
7.11.35FLASH write sector group protection for Bank1
(FLASH_WRP1R_CUR) .....
372
7.11.36FLASH write sector group protection for Bank1
(FLASH_WRP1R_PRG) .....
373
7.11.37FLASH data sector configuration Bank1 (FLASH_EDATA1R_CUR) ..373
7.11.38FLASH data sector configuration Bank1 (FLASH_EDATA1R_PRG) ..374
7.11.39FLASH HDP Bank1 configuration (FLASH_HDP1R_CUR) .....375
7.11.40FLASH HDP Bank1 configuration (FLASH_HDP1R_PRG) .....375
7.11.41FLASH ECC correction register (FLASH_ECCCORR) .....376
7.11.42FLASH ECC detection register (FLASH_ECCDETR) .....377
7.11.43FLASH ECC data (FLASH_ECCDR) .....378
7.11.44FLASH secure block-based register for Bank2 (FLASH_SECBB2Rx)378
7.11.45FLASH privilege block-based register for Bank2
(FLASH_PRIVBB2Rx) .....
379
7.11.46FLASH security watermark for Bank2 (FLASH_SECWM2R_CUR) ..379
7.11.47FLASH security watermark for Bank2 (FLASH_SECWM2R_PRG) ..380
7.11.48FLASH write sector group protection for Bank2
(FLASH_WRP2R_CUR) .....
380
7.11.49FLASH write sector group protection for Bank2
(FLASH_WRP2R_PRG) .....
381
7.11.50FLASH data sectors configuration Bank2 (FLASH_EDATA2R_CUR) ..382
7.11.51FLASH data sector configuration Bank2 (FLASH_EDATA2R_PRG) ..382
7.11.52FLASH HDP Bank2 configuration (FLASH_HDP2R_CUR) .....383
7.11.53FLASH HDP Bank2 configuration (FLASH_HDP2R_PRG) .....383
7.12FLASH register map and reset values .....385
8Instruction cache (ICACHE) .....390
8.1ICACHE introduction .....390
8.2ICACHE main features .....390
8.3ICACHE implementation .....391
8.4ICACHE functional description .....391
8.4.1ICACHE block diagram .....392
8.4.2ICACHE reset and clocks .....392
8.4.3ICACHE TAG memory .....393
8.4.4Direct-mapped ICACHE (1-way cache) .....394
8.4.5ICACHE enable .....395
8.4.6Cacheable and noncacheable traffic .....395
8.4.7Address remapping .....396
8.4.8Cacheable accesses .....398
8.4.9Dual-master cache .....399
8.4.10ICACHE security .....399
8.4.11ICACHE maintenance .....399
8.4.12ICACHE performance monitoring .....400
8.4.13ICACHE boot .....400
8.5ICACHE low-power modes .....400
8.6ICACHE error management and interrupts .....401
8.7ICACHE registers .....401
8.7.1ICACHE control register (ICACHE_CR) .....401
8.7.2ICACHE status register (ICACHE_SR) .....402
8.7.3ICACHE interrupt enable register (ICACHE_IER) .....403
8.7.4ICACHE flag clear register (ICACHE_FCR) .....403
8.7.5ICACHE hit monitor register (ICACHE_HMONR) .....404
8.7.6ICACHE miss monitor register (ICACHE_MMONR) .....404
8.7.7ICACHE region x configuration register (ICACHE_CRRx) .....404
8.7.8ICACHE register map .....405
9Data cache (DCACHE) .....407
9.1DCACHE introduction .....407
9.2DCACHE main features .....407
9.3DCACHE implementation .....408
9.4DCACHE functional description .....408
9.4.1DCACHE block diagram .....409
9.4.2DCACHE reset and clocks .....409
9.4.3DCACHE TAG memory .....410
9.4.4DCACHE enable .....412
9.4.5Cacheable and noncacheable traffic .....412
9.4.6Cacheable accesses .....413
9.4.7DCACHE security .....415
9.4.8DCACHE maintenance .....415
9.4.9DCACHE performance monitoring .....417
9.4.10DCACHE boot417
9.5DCACHE low-power modes418
9.6DCACHE error management and interrupts418
9.7DCACHE registers419
9.7.1DCACHE control register (DCACHE_CR)419
9.7.2DCACHE status register (DCACHE_SR)420
9.7.3DCACHE interrupt enable register (DCACHE_IER)421
9.7.4DCACHE flag clear register (DCACHE_FCR)422
9.7.5DCACHE read-hit monitor register (DCACHE_RHMONR)422
9.7.6DCACHE read-miss monitor register (DCACHE_RMMONR)423
9.7.7DCACHE write-hit monitor register (DCACHE_WHMONR)423
9.7.8DCACHE write-miss monitor register (DCACHE_WMMONR)423
9.7.9DCACHE command range start address register
(DCACHE_CMDRSADDRR)
424
9.7.10DCACHE command range end address register
(DCACHE_CMDREADDRR)
424
9.7.11DCACHE register map424
10Power control (PWR)426
10.1PWR introduction426
10.2PWR main features426
10.3PWR pins and internal signals427
10.4PWR power supplies and supply domains428
10.4.1External power supplies430
10.4.2Internal regulators431
10.4.3Power-up and power-down power sequences433
10.4.4Independent analog peripherals supply433
10.4.5Independent I/O supply rail434
10.4.6Independent USB transceivers supply434
10.4.7Backup domain435
10.5PWR system supply voltage regulation436
10.5.1SMPS and LDO embedded regulators436
10.5.2VCORE supply versus reset, voltage scaling, and low-power modes437
10.5.3Embedded voltage regulator operating modes437
10.6PWR power supply and temperature supervision437
10.6.1Power-on reset (POR)/power-down reset (PDR)438
10.6.2Brownout reset (BOR)438
10.6.3Programmable voltage detector (PVD) .....439
10.6.4Analog voltage detector (AVD) .....440
10.6.5VDDIO2 voltage monitor (IO2VM) .....441
10.6.6Backup domain voltage monitoring .....441
10.6.7Temperature monitoring .....442
10.7PWR management .....443
10.7.1Voltage scaling .....443
10.7.2Power management examples .....444
10.8Power modes .....445
10.8.1Slowing down system clocks .....449
10.8.2Peripheral clock gating .....449
10.8.3Low-power modes .....449
10.8.4Sleep mode .....450
10.8.5Stop mode .....451
10.8.6Standby mode .....453
10.8.7Power modes output pins .....456
10.9PWR security and privileged protection .....457
10.9.1PWR security protection .....457
10.9.2PWR privileged protection .....458
10.10PWR interrupts .....459
10.11PWR registers .....460
10.11.1PWR power mode control register (PWR_PMCR) .....460
10.11.2PWR power mode control register [alternate] (PWR_PMCR) .....462
10.11.3PWR power mode control register [alternate] (PWR_PMCR) .....464
10.11.4PWR status register (PWR_PMSR) .....466
10.11.5PWR voltage scaling control register (PWR_VOSCR) .....466
10.11.6PWR voltage scaling status register (PWR_VOSSR) .....467
10.11.7PWR Backup domain control register (PWR_BDCR) .....468
10.11.8PWR Backup domain control register (PWR_DBPCR) .....469
10.11.9PWR Backup domain status register (PWR_BDSR) .....469
10.11.10PWR USB Type-C power delivery register (PWR_UCPDR) .....470
10.11.11PWR supply configuration control register (PWR_SCCR) .....470
10.11.12PWR voltage monitor control register (PWR_VMCR) .....471
10.11.13PWR USB supply control register (PWR_USBSCR) .....472
10.11.14PWR voltage monitor status register (PWR_VMSR) .....473
10.11.15PWR wake-up status clear register (PWR_WUSCR) .....474
10.11.16PWR wake-up status register (PWR_WUSR) .....474
10.11.17PWR wake-up configuration register (PWR_WUCR) .....475
10.11.18PWR I/O retention register (PWR_IORETR) .....475
10.11.19PWR security configuration register (PWR_SECCFGR) .....476
10.11.20PWR privilege configuration register (PWR_PRIVCFGR) .....477
10.11.21PWR register map .....478
11Reset and clock control (RCC) .....480
11.1RCC introduction .....480
11.2RCC pins and internal signals .....480
11.3RCC reset functional description .....480
11.3.1Power reset .....480
11.3.2System reset .....481
11.3.3Backup domain reset .....482
11.3.4Reset source identification .....482
11.4RCC clocks functional description .....483
11.4.1HSE clock .....486
11.4.2HSI clock .....487
11.4.3CSI oscillator .....488
11.4.4HSI48 clock .....489
11.4.5PLL description .....489
11.4.6LSE clock .....493
11.4.7LSI clock .....494
11.4.8System clock (SYSCLK) selection .....494
11.4.9Handling clock generators in stop and standby modes .....495
11.4.10Clock security system (CSS) .....496
11.4.11Clock output generation (MCO1/MCO2) .....497
11.4.12Kernel clock selection .....498
11.4.13RTC and TAMP clock .....503
11.4.14Timer clock .....503
11.4.15Watchdog clock .....504
11.4.16Peripherals clock gating and autonomous mode .....504
11.5RCC security and privilege functional description .....504
11.5.1RCC TrustZone security protection modes .....504
11.5.2RCC privilege protection modes .....507
11.6RCC low-power modes .....508
11.7RCC interrupts509
11.8RCC registers511
11.8.1RCC clock control register (RCC_CR)511
11.8.2RCC HSI calibration register (RCC_HSICFGR)514
11.8.3RCC clock recovery RC register (RCC_CRRCR)515
11.8.4RCC CSI calibration register (RCC_CSICFGR)515
11.8.5RCC clock configuration register1 (RCC_CFGR1)516
11.8.6RCC CPU domain clock configuration register 2 (RCC_CFGR2)518
11.8.7RCC PLL clock source selection register (RCC_PLL1CFGR)521
11.8.8RCC PLL clock source selection register (RCC_PLL2CFGR)523
11.8.9RCC PLL clock source selection register (RCC_PLL3CFGR)524
11.8.10RCC PLL1 dividers register (RCC_PLL1DIVR)526
11.8.11RCC PLL1 fractional divider register (RCC_PLL1FRACR)527
11.8.12RCC PLL2 dividers register (RCC_PLL2DIVR)528
11.8.13RCC PLL2 fractional divider register (RCC_PLL2FRACR)529
11.8.14RCC PLL3 dividers register (RCC_PLL3DIVR)530
11.8.15RCC PLL3 fractional divider register (RCC_PLL3FRACR)531
11.8.16RCC clock source interrupt enable register (RCC_CIER)532
11.8.17RCC clock source interrupt flag register (RCC_CIFR)533
11.8.18RCC clock source interrupt clear register (RCC_CICR)535
11.8.19RCC AHB1 reset register (RCC_AHB1RSTR)536
11.8.20RCC AHB2 peripheral reset register (RCC_AHB2RSTR)537
11.8.21RCC AHB4 peripheral reset register (RCC_AHB4RSTR)540
11.8.22RCC APB1 peripheral low reset register (RCC_APB1LRSTR)541
11.8.23RCC APB1 peripheral high reset register (RCC_APB1HRSTR)544
11.8.24RCC APB2 peripheral reset register (RCC_APB2RSTR)545
11.8.25RCC APB3 peripheral reset register (RCC_APB3RSTR)547
11.8.26RCC AHB1 peripherals clock register (RCC_AHB1ENR)549
11.8.27RCC AHB2 peripheral clock register (RCC_AHB2ENR)551
11.8.28RCC AHB4 peripheral clock register (RCC_AHB4ENR)554
11.8.29RCC APB1 peripheral clock register (RCC_APB1LENR)555
11.8.30RCC APB1 peripheral clock register (RCC_APB1HENR)558
11.8.31RCC APB2 peripheral clock register (RCC_APB2ENR)559
11.8.32RCC APB3 peripheral clock register (RCC_APB3ENR)561
11.8.33RCC AHB1 sleep clock register (RCC_AHB1LPENR)563
11.8.34RCC AHB2 sleep clock register (RCC_AHB2LPENR)565
11.8.35RCC AHB4 sleep clock register (RCC_AHB4LPENR)568
11.8.36RCC APB1 sleep clock register (RCC_APB1LLPENR) . . . . .569
11.8.37RCC APB1 sleep clock register (RCC_APB1HLPENR) . . . . .573
11.8.38RCC APB2 sleep clock register (RCC_APB2LPENR) . . . . .574
11.8.39RCC APB3 sleep clock register (RCC_APB3LPENR) . . . . .576
11.8.40RCC kernel clock configuration register (RCC_CCIPR1) . . . . .578
11.8.41RCC kernel clock configuration register (RCC_CCIPR2) . . . . .581
11.8.42RCC kernel clock configuration register (RCC_CCIPR3) . . . . .583
11.8.43RCC kernel clock configuration register (RCC_CCIPR4) . . . . .586
11.8.44RCC kernel clock configuration register (RCC_CCIPR5) . . . . .588
11.8.45RCC Backup domain control register (RCC_BDCR) . . . . .590
11.8.46RCC reset status register (RCC_RSR) . . . . .592
11.8.47RCC secure configuration register (RCC_SECCFGR) . . . . .593
11.8.48RCC privilege configuration register (RCC_PRIVCFGR) . . . . .595
11.9RCC register map . . . . .597
12Clock recovery system (CRS) . . . . .603
12.1CRS introduction . . . . .603
12.2CRS main features . . . . .603
12.3CRS implementation . . . . .603
12.4CRS functional description . . . . .604
12.4.1CRS block diagram . . . . .604
12.4.2CRS internal signals . . . . .604
12.4.3Synchronization input . . . . .605
12.4.4Frequency error measurement . . . . .605
12.4.5Frequency error evaluation and automatic trimming . . . . .606
12.4.6CRS initialization and configuration . . . . .607
12.5CRS in low-power modes . . . . .608
12.6CRS interrupts . . . . .608
12.7CRS registers . . . . .608
12.7.1CRS control register (CRS_CR) . . . . .608
12.7.2CRS configuration register (CRS_CFGR) . . . . .610
12.7.3CRS interrupt and status register (CRS_ISR) . . . . .611
12.7.4CRS interrupt flag clear register (CRS_ICR) . . . . .613
12.7.5CRS register map . . . . .613
13General-purpose I/Os (GPIO) . . . . .615
13.1GPIO introduction . . . . .615
13.2GPIO main features . . . . .615
13.3GPIO functional description . . . . .615
13.3.1General-purpose I/O (GPIO) . . . . .617
13.3.2I/O pin alternate function multiplexer and mapping . . . . .618
13.3.3I/O port control registers . . . . .619
13.3.4I/O data bitwise handling . . . . .619
13.3.5GPIO locking mechanism . . . . .619
13.3.6I/O alternate function input/output . . . . .620
13.3.7External interrupt/wake-up lines . . . . .620
13.3.8Input configuration . . . . .620
13.3.9Output configuration . . . . .621
13.3.10Alternate function configuration . . . . .621
13.3.11Analog configuration . . . . .622
13.3.12Using the HSE or LSE oscillator pins as GPIOs . . . . .622
13.3.13Using the GPIO pins in the RTC supply domain . . . . .623
13.3.14I/Os state retention during standby mode . . . . .623
13.3.15TrustZone security . . . . .623
13.3.16Privileged and unprivileged modes . . . . .624
13.3.17High-speed low-voltage mode (HSLV) . . . . .624
13.3.18I/O compensation cell . . . . .625
13.4GPIO registers . . . . .626
13.4.1GPIO port mode register (GPIOx_MODER) (x = A to I) . . . . .626
13.4.2GPIO port output type register (GPIOx_OTYPER) (x = A to I) . . . . .626
13.4.3GPIO port output speed register (GPIOx_OSPEEDR) (x = A to I) . . . . .627
13.4.4GPIO port pull-up/pull-down register (GPIOx_PUPDR) (x = A to I) . . . . .627
13.4.5GPIO port input data register (GPIOx_IDR) (x = A to I) . . . . .628
13.4.6GPIO port output data register (GPIOx_ODR) (x = A to I) . . . . .628
13.4.7GPIO port bit set/reset register (GPIOx_BSRR) (x = A to I) . . . . .629
13.4.8GPIO port configuration lock register (GPIOx_LCKR) (x = A to I) . . . . .629
13.4.9GPIO alternate function low register (GPIOx_AFRL) (x = A to I) . . . . .630
13.4.10GPIO alternate function high register (GPIOx_AFRH) (x = A to H) . . . . .631
13.4.11GPIO port bit reset register (GPIOx_BRR) (x = A to I) . . . . .632
13.4.12GPIO high-speed low-voltage register (GPIOx_HSLVR) (x = A to I) . . . . .632
13.4.13GPIO secure configuration register (GPIOx_SECCFGR) (x = A to I) . . . . .633
13.4.14GPIO register map . . . . .634
14System configuration, boot, and security (SBS)636
14.1SBS introduction636
14.2SBS main features636
14.3SBS functional description637
14.3.1SBS block diagram637
14.3.2SBS signals638
14.3.3SBS reset and clocks638
14.3.4SBS system configuration639
14.3.5SBS boot control640
14.3.6SBS debug control643
14.3.7SBS hardware secure storage control645
14.4SBS interrupts647
14.5SBS registers647
14.5.1SBS temporal isolation control register (SBS_HDPLCR)647
14.5.2SBS temporal isolation status register (SBS_HDPLSR)647
14.5.3SBS next HDPL control register (SBS_NEXTHDPLCR)648
14.5.4SBS debug control register (SBS_DBGCR)648
14.5.5SBS debug lock register (SBS_DBGLOCKR)649
14.5.6SBS RSS command register (SBS_RSSCMDR)650
14.5.7SBS EPOCH selection control register (SBS_EPOCHSELCR)650
14.5.8SBS security mode configuration control register (SBS_SECCFGR)651
14.5.9SBS product mode and configuration register (SBS_PMCR)651
14.5.10SBS product mode and configuration register [alternate]
(SBS_PMCR)
653
14.5.11SBS FPU interrupt mask register (SBS_FPUIMR)654
14.5.12SBS memory erase status register (SBS_MESR)655
14.5.13SBS compensation cell for I/Os control and status register
(SBS_CCCSR)
656
14.5.14SBS compensation cell for I/Os value register (SBS_CCVALR)657
14.5.15SBS compensation cell for I/Os software code register
(SBS_CCWCR)
657
14.5.16SBS Class B register (SBS_CFGR2)658
14.5.17SBS CPU nonsecure lock register (SBS_CNSLCKR)659
14.5.18SBS CPU secure lock register (SBS_CSLCKR)660
14.5.19SBS flitf ECC NMI mask register (SBS_ECCNMIR)661
14.5.20SBS register map662
15Peripherals interconnect matrix664
15.1Interconnect matrix introduction664
15.2Connection summary664
15.3Interconnection details666
15.3.1Master to slave interconnection for timers666
15.3.2Triggers to ADCs666
15.3.3ADC analog watchdogs as triggers to timers and PLAY667
15.3.4Triggers to DAC668
15.3.5Clock sources to timers668
15.3.6Triggers to low-power timers669
15.3.7RTC wake-up as inputs to timers670
15.3.8System errors as break signals to timers670
15.3.9Triggers for communication peripherals671
15.3.10Triggers to GPDMA1/2671
15.3.11Internal analog signals to analog peripherals672
15.3.12Clock source for the DAC sample and hold mode672
15.3.13Internal tamper sources672
15.3.14Output from tamper to RTC672
15.3.15Encryption keys to AES/SAES673
15.3.16Comparators as inputs, trigger, or break signals to timers1673
15.3.17Blanking sources to comparators674
15.3.18Play as input to timers675
15.3.19Clock source to PLAY675
15.3.20Inputs to PLAY675
15.3.21Triggers to DTS676
16General purpose direct memory access controller (GPDMA)677
16.1GPDMA introduction677
16.2GPDMA main features677
16.3GPDMA implementation678
16.3.1GPDMA instances678
16.3.2GPDMA channels678
16.3.3GPDMA in low-power modes679
16.3.4GPDMA requests679
16.3.5GPDMA block requests684
16.3.6GPDMA channels with peripheral early termination684
16.3.7GPDMA triggers .....685
16.4GPDMA functional description .....687
16.4.1GPDMA block diagram .....687
16.4.2GPDMA channel state and direct programming without any
linked-list .....
688
16.4.3GPDMA channel suspend and resume .....689
16.4.4GPDMA channel abort and restart .....690
16.4.5GPDMA linked-list data structure .....691
16.4.6Linked-list item transfer execution .....694
16.4.7GPDMA channel state and linked-list programming
in run-to-completion mode .....
694
16.4.8GPDMA channel state and linked-list programming in link step
mode .....
698
16.4.9GPDMA channel state and linked-list programming .....705
16.4.10GPDMA FIFO-based transfers .....707
16.4.11GPDMA transfer request and arbitration .....714
16.4.12GPDMA triggered transfer .....718
16.4.13GPDMA circular buffering with linked-list programming .....719
16.4.14GPDMA transfer in peripheral flow-control mode .....721
16.4.15GPDMA secure/nonsecure channel .....722
16.4.16GPDMA privileged/unprivileged channel .....723
16.4.17GPDMA error management .....723
16.5GPDMA in debug mode .....725
16.6GPDMA in low-power modes .....725
16.7GPDMA interrupts .....726
16.8GPDMA registers .....727
16.8.1GPDMA secure configuration register (GPDMA_SECCFGR) .....727
16.8.2GPDMA privileged configuration register (GPDMA_PRIVCFGR) ....728
16.8.3GPDMA configuration lock register (GPDMA_RCFGLOCKR) .....728
16.8.4GPDMA nonsecure masked interrupt status register
(GPDMA_MISR) .....
729
16.8.5GPDMA secure masked interrupt status register (GPDMA_SMISR) ..730
16.8.6GPDMA channel x linked-list base address register
(GPDMA_CxLBAR) .....
730
16.8.7GPDMA channel x flag clear register (GPDMA_CxFCR) .....731
16.8.8GPDMA channel x status register (GPDMA_CxSR) .....732
16.8.9GPDMA channel x control register (GPDMA_CxCR) .....733
16.8.10GPDMA channel x transfer register 1 (GPDMA_CxTR1) .....735
16.8.11GPDMA channel x transfer register 2 (GPDMA_CxTR2) . . . . .739
16.8.12GPDMA channel x block register 1 (GPDMA_CxBR1) . . . . .743
16.8.13GPDMA channel x alternate block register 1 (GPDMA_CxBR1) . . . . .744
16.8.14GPDMA channel x source address register (GPDMA_CxSAR) . . . . .747
16.8.15GPDMA channel x destination address register (GPDMA_CxDAR) . . . . .749
16.8.16GPDMA channel x transfer register 3 (GPDMA_CxTR3) . . . . .750
16.8.17GPDMA channel x block register 2 (GPDMA_CxBR2) . . . . .751
16.8.18GPDMA channel x linked-list address register (GPDMA_CxLLR) . . . . .752
16.8.19GPDMA channel x alternate linked-list address register
(GPDMA_CxLLR) . . . . .
754
16.8.20GPDMA register map . . . . .755
17Nested vectored interrupt controller (NVIC) . . . . .758
17.1NVIC main features . . . . .758
17.2SysTick calibration value register . . . . .758
17.3Interrupt and exception vectors . . . . .759
18Extended interrupts and event controller (EXTI) . . . . .775
18.1EXTI introduction . . . . .775
18.2EXTI main features . . . . .775
18.3EXTI block diagram . . . . .776
18.3.1EXTI connections between peripherals and CPU . . . . .777
18.3.2EXTI interrupt/event mapping . . . . .777
18.4EXTI functional description . . . . .779
18.4.1EXTI configurable event input wake-up . . . . .780
18.4.2EXTI direct event input wake-up . . . . .780
18.4.3EXTI mux selection . . . . .781
18.5EXTI functional behavior . . . . .781
18.6EXTI event protection . . . . .782
18.6.1EXTI security protection . . . . .783
18.6.2EXTI privilege protection . . . . .783
18.7EXTI registers . . . . .784
18.7.1EXTI rising trigger selection register (EXTI_RTSR1) . . . . .784
18.7.2EXTI falling trigger selection register (EXTI_FTSR1) . . . . .784
18.7.3EXTI software interrupt event register (EXTI_SWIER1) . . . . .785
18.7.4EXTI rising edge pending register (EXTI_RPR1) . . . . .786
18.7.5EXTI falling edge pending register (EXTI_FPR1) . . . . .786
18.7.6EXTI security configuration register (EXTI_SECCFGR1) . . . . .787
18.7.7EXTI privilege configuration register (EXTI_PRIVCFGR1) . . . . .788
18.7.8EXTI rising trigger selection register 2 (EXTI_RTSR2) . . . . .788
18.7.9EXTI falling trigger selection register 2 (EXTI_FTSR2) . . . . .790
18.7.10EXTI software interrupt event register 2 (EXTI_SWIER2) . . . . .792
18.7.11EXTI rising edge pending register 2 (EXTI_RPR2) . . . . .795
18.7.12EXTI falling edge pending register 2 (EXTI_FPR2) . . . . .797
18.7.13EXTI security configuration register 2 (EXTI_SECCFGR2) . . . . .799
18.7.14EXTI privilege configuration register 2 (EXTI_PRIVCFGR2) . . . . .800
18.7.15EXTI rising trigger selection register 3 (EXTI_RTSR3) . . . . .801
18.7.16EXTI falling trigger selection register 3 (EXTI_FTSR3) . . . . .802
18.7.17EXTI software interrupt event register 3 (EXTI_SWIER3) . . . . .803
18.7.18EXTI rising edge pending register 3 (EXTI_RPR3) . . . . .804
18.7.19EXTI falling edge pending register 3 (EXTI_FPR3) . . . . .805
18.7.20EXTI security configuration register 3 (EXTI_SECCFGR3) . . . . .806
18.7.21EXTI privilege configuration register 3 (EXTI_PRIVCFGR3) . . . . .806
18.7.22EXTI external interrupt selection register (EXTI_EXTICR1) . . . . .807
18.7.23EXTI external interrupt selection register (EXTI_EXTICR2) . . . . .809
18.7.24EXTI external interrupt selection register (EXTI_EXTICR3) . . . . .811
18.7.25EXTI external interrupt selection register (EXTI_EXTICR4) . . . . .813
18.7.26EXTI lock register (EXTI_LOCKR) . . . . .815
18.7.27EXTI CPU wake-up with interrupt mask register (EXTI_IMR1) . . . . .816
18.7.28EXTI CPU wake-up with event mask register (EXTI_EMR1) . . . . .816
18.7.29EXTI CPU wake-up with interrupt mask register 2 (EXTI_IMR2) . . . . .817
18.7.30EXTI CPU wake-up with event mask register 2 (EXTI_EMR2) . . . . .818
18.7.31EXTI CPU wake-up with interrupt mask register 3 (EXTI_IMR3) . . . . .820
18.7.32EXTI CPU wake-up with event mask register 3 (EXTI_EMR3) . . . . .821
18.7.33EXTI register map . . . . .822
19Cyclic redundancy check calculation unit (CRC) . . . . .825
19.1CRC introduction . . . . .825
19.2CRC main features . . . . .825
19.3CRC implementation . . . . .825
19.4CRC functional description . . . . .826
19.4.1CRC block diagram . . . . .826
19.4.2CRC internal signals . . . . .826
19.4.3CRC operation .....826
19.5CRC registers .....828
19.5.1CRC data register (CRC_DR) .....828
19.5.2CRC independent data register (CRC_IDR) .....828
19.5.3CRC control register (CRC_CR) .....829
19.5.4CRC initial value (CRC_INIT) .....830
19.5.5CRC polynomial (CRC_POL) .....830
19.5.6CRC register map .....831
20CORDIC coprocessor (CORDIC) .....832
20.1CORDIC introduction .....832
20.2CORDIC main features .....832
20.3CORDIC functional description .....832
20.3.1General description .....832
20.3.2CORDIC functions .....833
20.3.3Fixed point representation .....839
20.3.4Scaling factor .....840
20.3.5Precision .....840
20.3.6Zero-overhead mode .....843
20.3.7Polling mode .....844
20.3.8Interrupt mode .....845
20.3.9DMA mode .....845
20.4CORDIC registers .....846
20.4.1CORDIC control/status register (CORDIC_CSR) .....846
20.4.2CORDIC argument register (CORDIC_WDATA) .....848
20.4.3CORDIC result register (CORDIC_RDATA) .....849
20.4.4CORDIC register map .....849
21Filter math accelerator (FMAC) .....850
21.1FMAC introduction .....850
21.2FMAC main features .....850
21.3FMAC functional description .....851
21.3.1General description .....851
21.3.2Local memory and buffers .....852
21.3.3Input buffers .....852
21.3.4Output buffer .....855
21.3.5Initialization functions .....857
21.3.6Filter functions .....858
21.3.7Fixed point representation .....862
21.3.8Implementing FIR filters with the FMAC .....862
21.3.9Implementing IIR filters with the FMAC .....864
21.3.10Examples of filter initialization .....866
21.3.11Examples of filter operation .....867
21.3.12Filter design tips .....869
21.4FMAC registers .....870
21.4.1FMAC X1 buffer configuration register (FMAC_X1BUFCFG) .....870
21.4.2FMAC X2 buffer configuration register (FMAC_X2BUFCFG) .....870
21.4.3FMAC Y buffer configuration register (FMAC_YBUFCFG) .....871
21.4.4FMAC parameter register (FMAC_PARAM) .....872
21.4.5FMAC control register (FMAC_CR) .....873
21.4.6FMAC status register (FMAC_SR) .....874
21.4.7FMAC write data register (FMAC_WDATA) .....875
21.4.8FMAC read data register (FMAC_RDATA) .....876
21.4.9FMAC register map .....876
22Programmable logic array (PLAY) .....878
22.1PLAY introduction .....878
22.2PLAY main features .....878
22.3PLAY functional description .....879
22.3.1PLAY block diagram .....879
22.3.2PLAY pins and internal signals .....879
22.3.3PLAY reset and clocks .....882
22.3.4Input selection .....882
22.3.5Input filtering and edge detection .....883
22.3.6Software programmable inputs .....885
22.3.7Logic elements .....886
22.3.8Input interconnect .....889
22.3.9Output interconnect .....894
22.3.10Flags .....895
22.3.11Miscellaneous status bits .....896
22.4PLAY in low-power modes .....896
22.5PLAY interrupts .....896
22.6PLAY registers897
22.6.1PLAY configuration control register (PLAY_CFGCR)898
22.6.2PLAY security attributes configuration register (PLAY_SECCFGR)898
22.6.3PLAY privilege attributes configuration register (PLAY_PRIVCFGR)899
22.6.4PLAY filter x configuration register (PLAY_FILTxCFG)900
22.6.5PLAY logic element x configuration register 1 (PLAY_LExCFG1)901
22.6.6PLAY logic element x configuration register 2 (PLAY_LExCFG2)901
22.6.7PLAY output x configuration register (PLAY_OUTxCFG)902
22.6.8PLAY software input status register (PLAY_SWIN)903
22.6.9PLAY software input set register (PLAY_SWINSET)903
22.6.10PLAY software input clear register (PLAY_SWINCLR)904
22.6.11PLAY output status register (PLAY_OSR)905
22.6.12PLAY flag status register (PLAY_FLSTAT)905
22.6.13PLAY flag set register (PLAY_FLSET)906
22.6.14PLAY flag clear register (PLAY_FLCLR)907
22.6.15PLAY flag interrupt enable register (PLAY_FLIER)907
22.6.16PLAY flag control register (PLAY_FLCTL)908
22.6.17PLAY miscellaneous status register (PLAY_MSR)909
22.6.18PLAY interrupt status register (PLAY_ISR)909
22.6.19PLAY interrupt clear register (PLAY_ICR)910
22.6.20PLAY interrupt enable register (PLAY_IER)911
22.7PLAY register map911
23Flexible memory controller (FMC)914
23.1FMC introduction914
23.2FMC main features914
23.3FMC block diagram915
23.4AHB interface916
23.4.1Supported memories and transactions917
23.5External device address mapping918
23.5.1NOR/PSRAM address mapping919
23.5.2NAND flash memory address mapping919
23.5.3SDRAM address mapping920
23.6NOR flash/PSRAM controller922
23.6.1External memory interface signals924
23.6.2Supported memories and transactions926
23.6.3General timing rules . . . . .927
23.6.4NOR flash/PSRAM controller asynchronous transactions . . . . .927
23.6.5Synchronous transactions . . . . .945
23.6.6NOR/PSRAM controller registers . . . . .952
23.7NAND flash controller . . . . .960
23.7.1External memory interface signals . . . . .960
23.7.2NAND flash supported memories and transactions . . . . .961
23.7.3Timing diagrams for NAND flash memory . . . . .962
23.7.4NAND flash operations . . . . .963
23.7.5NAND flash prewait functionality . . . . .963
23.7.6Computation of the error correction code (ECC)
in NAND flash memory . . . . .
964
23.7.7NAND flash controller registers . . . . .965
23.8SDRAM controller . . . . .971
23.8.1SDRAM controller main features . . . . .971
23.8.2SDRAM External memory interface signals . . . . .971
23.8.3SDRAM controller functional description . . . . .972
23.8.4Low-power modes . . . . .978
23.8.5SDRAM controller registers . . . . .981
23.8.6FMC register map . . . . .987
24Octo-SPI interface (OCTOSPI) . . . . .990
24.1OCTOSPI introduction . . . . .990
24.2OCTOSPI main features . . . . .990
24.3OCTOSPI implementation . . . . .991
24.4OCTOSPI functional description . . . . .992
24.4.1OCTOSPI block diagram . . . . .992
24.4.2OCTOSPI pins and internal signals . . . . .993
24.4.3OCTOSPI interface to memory modes . . . . .994
24.4.4OCTOSPI regular-command protocol . . . . .994
24.4.5OCTOSPI regular-command protocol signal interface . . . . .998
24.4.6HyperBus protocol . . . . .1001
24.4.7Specific features . . . . .1005
24.4.8OCTOSPI operating mode introduction . . . . .1006
24.4.9OCTOSPI indirect mode . . . . .1006
24.4.10OCTOSPI automatic status-polling mode . . . . .1008
24.4.11OCTOSPI memory-mapped mode . . . . .1009
24.4.12OCTOSPI configuration introduction .....1010
24.4.13OCTOSPI system configuration .....1010
24.4.14OCTOSPI device configuration .....1011
24.4.15OCTOSPI regular-command mode configuration .....1014
24.4.16OCTOSPI HyperBus protocol configuration .....1016
24.4.17OCTOSPI error management .....1017
24.4.18OCTOSPI BUSY and ABORT .....1017
24.4.19OCTOSPI reconfiguration or deactivation .....1018
24.4.20NCS behavior .....1018
24.5Address alignment and data number .....1020
24.6OCTOSPI interrupts .....1021
24.7OCTOSPI registers .....1021
24.7.1OCTOSPI control register (OCTOSPI_CR) .....1021
24.7.2OCTOSPI device configuration register 1 (OCTOSPI_DCR1) .....1024
24.7.3OCTOSPI device configuration register 2 (OCTOSPI_DCR2) .....1026
24.7.4OCTOSPI device configuration register 3 (OCTOSPI_DCR3) .....1027
24.7.5OCTOSPI device configuration register 4 (OCTOSPI_DCR4) .....1027
24.7.6OCTOSPI status register (OCTOSPI_SR) .....1028
24.7.7OCTOSPI flag clear register (OCTOSPI_FCR) .....1029
24.7.8OCTOSPI data length register (OCTOSPI_DLR) .....1030
24.7.9OCTOSPI address register (OCTOSPI_AR) .....1030
24.7.10OCTOSPI data register (OCTOSPI_DR) .....1031
24.7.11OCTOSPI polling status mask register (OCTOSPI_PSMKR) .....1031
24.7.12OCTOSPI polling status match register (OCTOSPI_PSMAR) .....1032
24.7.13OCTOSPI polling interval register (OCTOSPI_PIR) .....1032
24.7.14OCTOSPI communication configuration register (OCTOSPI_CCR) .....1032
24.7.15OCTOSPI timing configuration register (OCTOSPI_TCR) .....1034
24.7.16OCTOSPI instruction register (OCTOSPI_IR) .....1035
24.7.17OCTOSPI alternate bytes register (OCTOSPI_ABR) .....1035
24.7.18OCTOSPI low-power timeout register (OCTOSPI_LPTR) .....1036
24.7.19OCTOSPI wrap communication configuration register
(OCTOSPI_WPCCR) .....
1036
24.7.20OCTOSPI wrap timing configuration register (OCTOSPI_WPTCR) .....1038
24.7.21OCTOSPI wrap instruction register (OCTOSPI_WPIR) .....1039
24.7.22OCTOSPI wrap alternate bytes register (OCTOSPI_WPABR) .....1039
24.7.23OCTOSPI write communication configuration register
(OCTOSPI_WCCR) .....
1040
24.7.24OCTOSPI write timing configuration register (OCTOSPI_WTCR) . . .1042
24.7.25OCTOSPI write instruction register (OCTOSPI_WIR) . . . . .1042
24.7.26OCTOSPI write alternate bytes register (OCTOSPI_WABR) . . . . .1043
24.7.27OCTOSPI HyperBus latency configuration register
(OCTOSPI_HLCR) . . . . .
1043
24.7.28OCTOSPI register map . . . . .1044
25Octo-SPI interface (OCTOSPI) . . . . .1047
25.1OCTOSPI introduction . . . . .1047
25.2OCTOSPI main features . . . . .1047
25.3OCTOSPI implementation . . . . .1048
25.4OCTOSPI functional description . . . . .1049
25.4.1OCTOSPI block diagram . . . . .1049
25.4.2OCTOSPI pins and internal signals . . . . .1050
25.4.3OCTOSPI interface to memory modes . . . . .1051
25.4.4OCTOSPI regular-command protocol . . . . .1051
25.4.5OCTOSPI regular-command protocol signal interface . . . . .1055
25.4.6HyperBus protocol . . . . .1058
25.4.7Specific features . . . . .1062
25.4.8OCTOSPI operating mode introduction . . . . .1063
25.4.9OCTOSPI indirect mode . . . . .1063
25.4.10OCTOSPI automatic status-polling mode . . . . .1065
25.4.11OCTOSPI memory-mapped mode . . . . .1066
25.4.12OCTOSPI configuration introduction . . . . .1067
25.4.13OCTOSPI system configuration . . . . .1067
25.4.14OCTOSPI device configuration . . . . .1068
25.4.15OCTOSPI regular-command mode configuration . . . . .1071
25.4.16OCTOSPI HyperBus protocol configuration . . . . .1073
25.4.17OCTOSPI error management . . . . .1074
25.4.18OCTOSPI BUSY and ABORT . . . . .1074
25.4.19OCTOSPI reconfiguration or deactivation . . . . .1075
25.4.20NCS behavior . . . . .1075
25.4.21Software control of two external memories . . . . .1077
25.4.22Hardware-controlled extended memory support . . . . .1077
25.5Address alignment and data number . . . . .1078
25.6OCTOSPI interrupts . . . . .1079
25.7OCTOSPI registers . . . . .1080
25.7.1OCTOSPI control register (OCTOSPI_CR) .....1080
25.7.2OCTOSPI device configuration register 1 (OCTOSPI_DCR1) .....1083
25.7.3OCTOSPI device configuration register 2 (OCTOSPI_DCR2) .....1085
25.7.4OCTOSPI device configuration register 3 (OCTOSPI_DCR3) .....1086
25.7.5OCTOSPI device configuration register 4 (OCTOSPI_DCR4) .....1087
25.7.6OCTOSPI status register (OCTOSPI_SR) .....1087
25.7.7OCTOSPI flag clear register (OCTOSPI_FCR) .....1088
25.7.8OCTOSPI data length register (OCTOSPI_DLR) .....1089
25.7.9OCTOSPI address register (OCTOSPI_AR) .....1089
25.7.10OCTOSPI data register (OCTOSPI_DR) .....1090
25.7.11OCTOSPI polling status mask register (OCTOSPI_PSMKR) .....1090
25.7.12OCTOSPI polling status match register (OCTOSPI_PSMAR) .....1091
25.7.13OCTOSPI polling interval register (OCTOSPI_PIR) .....1091
25.7.14OCTOSPI communication configuration register (OCTOSPI_CCR) ..1092
25.7.15OCTOSPI timing configuration register (OCTOSPI_TCR) .....1094
25.7.16OCTOSPI instruction register (OCTOSPI_IR) .....1094
25.7.17OCTOSPI alternate bytes register (OCTOSPI_ABR) .....1095
25.7.18OCTOSPI low-power timeout register (OCTOSPI_LPTR) .....1095
25.7.19OCTOSPI wrap communication configuration register
(OCTOSPI_WPCCR) .....
1096
25.7.20OCTOSPI wrap timing configuration register (OCTOSPI_WPTCR) ..1098
25.7.21OCTOSPI wrap instruction register (OCTOSPI_WPIR) .....1098
25.7.22OCTOSPI wrap alternate bytes register (OCTOSPI_WPABR) .....1099
25.7.23OCTOSPI write communication configuration register
(OCTOSPI_WCCR) .....
1099
25.7.24OCTOSPI write timing configuration register (OCTOSPI_WTCR) ..1101
25.7.25OCTOSPI write instruction register (OCTOSPI_WIR) .....1102
25.7.26OCTOSPI write alternate bytes register (OCTOSPI_WABR) .....1102
25.7.27OCTOSPI HyperBus latency configuration register
(OCTOSPI_HLCR) .....
1103
25.7.28OCTOSPI register map .....1103
26Secure digital input/output MultiMediaCard interface (SDMMC) ..1107
26.1SDMMC main features .....1107
26.2SDMMC implementation .....1107
26.3SDMMC bus topology .....1108
26.4SDMMC operation modes .....1110
26.5SDMMC functional description1111
26.5.1SDMMC block diagram1111
26.5.2SDMMC pins and internal signals1111
26.5.3General description1112
26.5.4SDMMC adapter1114
26.5.5SDMMC AHB slave interface1136
26.5.6SDMMC AHB master interface1137
26.5.7AHB and SDMMC_CK clock relation1140
26.6Card functional description1140
26.6.1SD I/O mode1140
26.6.2CMD12 send timing1148
26.6.3Sleep (CMD5)1152
26.6.4Interrupt mode (Wait-IRQ)1153
26.6.5Boot operation1154
26.6.6Response R1b handling1157
26.6.7Reset and card cycle power1158
26.7Hardware flow control1159
26.8Ultra-high-speed phase I (UHS-I) voltage switch1159
26.9SDMMC interrupts1163
26.10SDMMC registers1164
26.10.1SDMMC power control register (SDMMC_POWER)1164
26.10.2SDMMC clock control register (SDMMC_CLKCR)1165
26.10.3SDMMC argument register (SDMMC_ARGR)1167
26.10.4SDMMC command register (SDMMC_CMDR)1167
26.10.5SDMMC command response register (SDMMC_RESPCMDR)1169
26.10.6SDMMC response x register (SDMMC_RESPxR)1170
26.10.7SDMMC data timer register (SDMMC_DTIMER)1170
26.10.8SDMMC data length register (SDMMC_DLENR)1171
26.10.9SDMMC data control register (SDMMC_DCTRL)1172
26.10.10SDMMC data counter register (SDMMC_DCNTR)1173
26.10.11SDMMC status register (SDMMC_STAR)1174
26.10.12SDMMC interrupt clear register (SDMMC_ICR)1177
26.10.13SDMMC mask register (SDMMC_MASKR)1179
26.10.14SDMMC acknowledgment timer register (SDMMC_ACKTIMER)1182
26.10.15SDMMC DMA control register (SDMMC_IDMACTRLR)1182
26.10.16SDMMC IDMA buffer size register (SDMMC_IDMABSIZER)1183
26.10.17SDMMC IDMA buffer base address register (SDMMC_IDMABASER) .....1184
26.10.18SDMMC IDMA linked list address register (SDMMC_IDMALAR) .....1184
26.10.19SDMMC IDMA linked list memory base register (SDMMC_IDMABAR) .....1185
26.10.20SDMMC data FIFO registers x (SDMMC_FIFORx) .....1186
26.10.21SDMMC register map .....1186
27Delay block (DLYB) .....1189
27.1DLYB introduction .....1189
27.2DLYB main features .....1189
27.3DLYB implementation .....1189
27.4DLYB functional description .....1189
27.4.1DLYB diagram .....1189
27.4.2DLYB pins and internal signals .....1190
27.4.3General description .....1190
27.4.4Delay line length configuration procedure .....1191
27.4.5Output clock phase configuration procedure .....1192
27.5DLYB registers .....1192
27.5.1DLYB control register (DLYB_CR) .....1192
27.5.2DLYB configuration register (DLYB_CFGR) .....1193
27.5.3DLYB register map .....1194
28Analog-to-digital converters (ADC1/2/3) .....1195
28.1ADC introduction .....1195
28.2ADC main features .....1195
28.3ADC implementation .....1197
28.4ADC functional description .....1198
28.4.1ADC block diagram .....1198
28.4.2ADC pins and internal signals .....1199
28.4.3ADC clocks .....1202
28.4.4ADC connectivity .....1204
28.4.5Slave AHB interface .....1207
28.4.6ADC Deep-power-down mode (DEEPPWD) and ADC voltage regulator (ADVREGEN) .....1207
28.4.7Single-ended and differential input channels .....1208
28.4.8Calibration (ADCAL, ADCALDIF, ADC_CALFACT) .....1208
28.4.9ADC on-off control (ADEN, ADDIS, ADRDY) . . . . .1211
28.4.10Constraints when writing the ADC control bits . . . . .1212
28.4.11Channel selection (ADC_SQRy, ADC_JSQR) . . . . .1213
28.4.12Channel-wise programmable sampling time (SMPR1, SMPR2) . . . . .1214
28.4.13Single conversion mode (CONT = 0) . . . . .1216
28.4.14Continuous conversion mode (CONT = 1) . . . . .1216
28.4.15Starting conversions (ADSTART, JADSTART) . . . . .1217
28.4.16ADC timing . . . . .1218
28.4.17Stopping an ongoing conversion (ADSTP, JADSTP) . . . . .1219
28.4.18Conversion on external trigger and trigger polarity
(EXTSEL, EXTEN, JEXTSEL, JEXTEN) . . . . .
1220
28.4.19Injected channel management . . . . .1222
28.4.20Discontinuous mode (DISCEN, DISCNUM, JDISCEN) . . . . .1223
28.4.21Queue of context for injected conversions . . . . .1224
28.4.22Programmable resolution (RES) - fast conversion mode . . . . .1232
28.4.23End of conversion, end of sampling phase (EOC, JEOC, EOSMP) . . . . .1233
28.4.24End of conversion sequence (EOS, JEOS) . . . . .1233
28.4.25Timing diagrams example (single/continuous modes,
hardware/software triggers) . . . . .
1234
28.4.26Data management . . . . .1236
28.4.27Dynamic low-power features . . . . .1242
28.4.28Analog window watchdog (AWD1EN, JAWD1EN, AWD1SGL,
AWD1CH, AWD2CH, AWD3CH, AWD_HTx, AWD_LTx, AWDx) . . . . .
1247
28.4.29Oversampler . . . . .1251
28.4.30Dual ADC modes . . . . .1258
28.4.31Temperature sensor . . . . .1271
28.4.32VBAT supply monitoring . . . . .1273
28.4.33Monitoring the internal voltage reference . . . . .1274
28.4.34Monitoring the supply voltage . . . . .1275
28.5ADC interrupts . . . . .1276
28.6ADC registers (for each ADC) . . . . .1277
28.6.1ADC interrupt and status register (ADC_ISR) . . . . .1277
28.6.2ADC interrupt enable register (ADC_IER) . . . . .1279
28.6.3ADC control register (ADC_CR) . . . . .1281
28.6.4ADC configuration register (ADC_CFGR) . . . . .1284
28.6.5ADC configuration register 2 (ADC_CFGR2) . . . . .1289
28.6.6ADC sample time register 1 (ADC_SMPR1) . . . . .1291
28.6.7ADC sample time register 2 (ADC_SMPR2) . . . . .1292
28.6.8ADC watchdog threshold register 1 (ADC_TR1) . . . . .1293
28.6.9ADC watchdog threshold register 2 (ADC_TR2) . . . . .1294
28.6.10ADC watchdog threshold register 3 (ADC_TR3) . . . . .1295
28.6.11ADC regular sequence register 1 (ADC_SQR1) . . . . .1295
28.6.12ADC regular sequence register 2 (ADC_SQR2) . . . . .1296
28.6.13ADC regular sequence register 3 (ADC_SQR3) . . . . .1297
28.6.14ADC regular sequence register 4 (ADC_SQR4) . . . . .1298
28.6.15ADC regular data register (ADC_DR) . . . . .1299
28.6.16ADC injected sequence register (ADC_JSQR) . . . . .1299
28.6.17ADC offset y register (ADC_OFy) . . . . .1302
28.6.18ADC injected channel y data register (ADC_JDRy) . . . . .1303
28.6.19ADC analog watchdog 2 configuration register (ADC_AWD2CR) . . .1304
28.6.20ADC analog watchdog 3 configuration register (ADC_AWD3CR) . . .1304
28.6.21ADC Differential mode selection register (ADC_DIFSEL) . . . . .1305
28.6.22ADC calibration factors (ADC_CALFACT) . . . . .1306
28.6.23ADC option register (ADC_OR) . . . . .1306
28.7ADC common registers . . . . .1307
28.7.1ADC common status register (ADC_CSR) . . . . .1307
28.7.2ADC common control register (ADC_CCR) . . . . .1309
28.7.3ADC common regular data register for dual mode (ADC_CDR) . . . .1312
28.8ADC register map . . . . .1313
29Digital temperature sensor (DTS) . . . . .1317
29.1DTS introduction . . . . .1317
29.2DTS main features . . . . .1317
29.3DTS functional description . . . . .1318
29.3.1DTS block diagram . . . . .1318
29.3.2DTS internal signals . . . . .1318
29.3.3DTS block operation . . . . .1319
29.3.4Operating modes . . . . .1319
29.3.5Calibration . . . . .1319
29.3.6Prescaler . . . . .1319
29.3.7Temperature measurement principles . . . . .1320
29.3.8Sampling time . . . . .1321
29.3.9Quick measurement mode . . . . .1321
29.3.10Trigger input . . . . .1322
29.3.11On-off control and ready flag . . . . .1322
29.3.12Temperature measurement sequence .....1323
29.4DTS low-power modes .....1324
29.5DTS interrupts .....1324
29.5.1Temperature window comparator .....1324
29.5.2Synchronous interrupt .....1324
29.5.3Asynchronous wake-up .....1324
29.6DTS registers .....1325
29.6.1Temperature sensor configuration register 1 (DTS_CFGR1) .....1325
29.6.2Temperature sensor T0 value register 1 (DTS_T0VALR1) .....1327
29.6.3Temperature sensor ramp value register (DTS_RAMPVALR) .....1327
29.6.4Temperature sensor interrupt threshold register 1 (DTS_ITR1) ....1328
29.6.5Temperature sensor data register (DTS_DR) .....1328
29.6.6Temperature sensor status register (DTS_SR) .....1329
29.6.7Temperature sensor interrupt enable register (DTS_ITENR) .....1330
29.6.8Temperature sensor clear interrupt flag register (DTS_ICIFR) ....1331
29.6.9Temperature sensor option register (DTS_OR) .....1332
29.6.10DTS register map .....1333
30Digital-to-analog converter (DAC) .....1335
30.1DAC introduction .....1335
30.2DAC main features .....1335
30.3DAC implementation .....1336
30.4DAC functional description .....1337
30.4.1DAC block diagram .....1337
30.4.2DAC pins and internal signals .....1338
30.4.3DAC clocks .....1339
30.4.4DAC channel enable .....1339
30.4.5DAC data format .....1339
30.4.6DAC conversion .....1341
30.4.7DAC output voltage .....1342
30.4.8DAC trigger selection .....1342
30.4.9DMA requests .....1343
30.4.10Noise generation .....1344
30.4.11Triangle-wave generation .....1345
30.4.12DAC channel modes .....1346
30.4.13DAC channel buffer calibration .....1349
30.4.14DAC channel conversion modes .....1350
30.4.15Dual DAC channel conversion modes (if dual channels are available) .....1351
30.5DAC in low-power modes .....1355
30.6DAC interrupts .....1355
30.7DAC registers .....1356
30.7.1DAC control register (DAC_CR) .....1356
30.7.2DAC software trigger register (DAC_SWTRGR) .....1359
30.7.3DAC channel1 12-bit right-aligned data holding register (DAC_DHR12R1) .....1360
30.7.4DAC channel1 12-bit left aligned data holding register (DAC_DHR12L1) .....1361
30.7.5DAC channel1 8-bit right aligned data holding register (DAC_DHR8R1) .....1361
30.7.6DAC channel2 12-bit right aligned data holding register (DAC_DHR12R2) .....1362
30.7.7DAC channel2 12-bit left aligned data holding register (DAC_DHR12L2) .....1362
30.7.8DAC channel2 8-bit right-aligned data holding register (DAC_DHR8R2) .....1363
30.7.9Dual DAC 12-bit right-aligned data holding register (DAC_DHR12RD) .....1363
30.7.10Dual DAC 12-bit left aligned data holding register (DAC_DHR12LD) .....1364
30.7.11Dual DAC 8-bit right aligned data holding register (DAC_DHR8RD) .....1364
30.7.12DAC channel1 data output register (DAC_DOR1) .....1365
30.7.13DAC channel2 data output register (DAC_DOR2) .....1365
30.7.14DAC status register (DAC_SR) .....1366
30.7.15DAC calibration control register (DAC_CCR) .....1367
30.7.16DAC mode control register (DAC_MCR) .....1368
30.7.17DAC channel1 sample and hold sample time register (DAC_SHSR1) .....1369
30.7.18DAC channel2 sample and hold sample time register (DAC_SHSR2) .....1370
30.7.19DAC sample and hold time register (DAC_SHHR) .....1370
30.7.20DAC sample and hold refresh time register (DAC_SHRR) .....1371
30.7.21DAC register map .....1372
31Voltage reference buffer (VREFBUF) .....1374
31.1VREFBUF introduction . . . . .1374
31.2VREFBUF implementation . . . . .1374
31.3VREFBUF functional description . . . . .1374
31.4VREFBUF trimming . . . . .1375
31.5VREFBUF registers . . . . .1376
31.5.1VREFBUF control and status register (VREFBUF_CSR) . . . . .1376
31.5.2VREFBUF calibration control register (VREFBUF_CCR) . . . . .1377
31.5.3VREFBUF register map . . . . .1378
32Comparator (COMP) . . . . .1379
32.1COMP introduction . . . . .1379
32.2COMP main features . . . . .1379
32.3COMP functional description . . . . .1380
32.3.1COMP block diagram . . . . .1380
32.3.2COMP pins and internal signals . . . . .1380
32.3.3COMP reset and clocks . . . . .1382
32.3.4Comparator LOCK mechanism . . . . .1383
32.3.5Window comparator . . . . .1383
32.3.6Hysteresis . . . . .1383
32.3.7Comparator output blanking function . . . . .1384
32.3.8COMP startup stabilization time . . . . .1385
32.3.9COMP power and speed modes . . . . .1385
32.4COMP low-power modes . . . . .1385
32.5COMP interrupts . . . . .1386
32.5.1Wake-up interrupt through EXTI . . . . .1386
32.5.2Interrupt through EXTI . . . . .1386
32.5.3Interrupt through the NVIC of the CPU . . . . .1387
32.6SCALER function . . . . .1387
32.7COMP registers . . . . .1388
32.7.1Comparator status register (COMP_SR) . . . . .1388
32.7.2Comparator interrupt clear flag register (COMP_ICFR) . . . . .1389
32.7.3Comparator configuration register 1 (COMP_CFGR1) . . . . .1389
32.7.4Comparator configuration register 2 (COMP_CFGR2) . . . . .1391
32.7.5COMP register map . . . . .1393
33Digital camera interface (DCMI) . . . . .1394
33.1DCMI introduction . . . . .1394
33.2DCMI main features . . . . .1394
33.3DCMI functional description . . . . .1394
33.3.1DCMI block diagram . . . . .1395
33.3.2DCMI pins and internal signals . . . . .1395
33.3.3DCMI clocks . . . . .1396
33.3.4DCMI DMA interface . . . . .1396
33.3.5DCMI physical interface . . . . .1396
33.3.6DCMI synchronization . . . . .1398
33.3.7DCMI capture modes . . . . .1400
33.3.8DCMI crop feature . . . . .1401
33.3.9DCMI JPEG format . . . . .1402
33.3.10DCMI FIFO . . . . .1402
33.3.11DCMI data format description . . . . .1403
33.4DCMI interrupts . . . . .1405
33.5DCMI registers . . . . .1405
33.5.1DCMI control register (DCMI_CR) . . . . .1405
33.5.2DCMI status register (DCMI_SR) . . . . .1408
33.5.3DCMI raw interrupt status register (DCMI_RIS) . . . . .1408
33.5.4DCMI interrupt enable register (DCMI_IER) . . . . .1409
33.5.5DCMI masked interrupt status register (DCMI_MIS) . . . . .1410
33.5.6DCMI interrupt clear register (DCMI_ICR) . . . . .1411
33.5.7DCMI embedded synchronization code register (DCMI_ESCR) . . . . .1412
33.5.8DCMI embedded synchronization unmask register (DCMI_ESUR) . . . . .1412
33.5.9DCMI crop window start (DCMI_CWSTRT) . . . . .1413
33.5.10DCMI crop window size (DCMI_CWSIZE) . . . . .1414
33.5.11DCMI data register (DCMI_DR) . . . . .1414
33.5.12DCMI register map . . . . .1415
34Parallel synchronous slave interface (PSSI) . . . . .1416
34.1PSSI introduction . . . . .1416
34.2PSSI main features . . . . .1416
34.3PSSI functional description . . . . .1416
34.3.1PSSI block diagram . . . . .1417
34.3.2PSSI pins and internal signals . . . . .1417
34.3.3PSSI clock . . . . .1418
34.3.4PSSI data management .....1418
34.3.5PSSI optional control signals .....1420
34.4PSSI interrupts .....1423
34.5PSSI registers .....1424
34.5.1PSSI control register (PSSI_CR) .....1424
34.5.2PSSI status register (PSSI_SR) .....1425
34.5.3PSSI raw interrupt status register (PSSI_RIS) .....1426
34.5.4PSSI interrupt enable register (PSSI_IER) .....1427
34.5.5PSSI masked interrupt status register (PSSI_MIS) .....1427
34.5.6PSSI interrupt clear register (PSSI_ICR) .....1428
34.5.7PSSI data register (PSSI_DR) .....1428
34.5.8PSSI register map .....1429
35Coupling and chaining bridge (CCB) .....1430
35.1CCB introduction .....1430
35.2CCB main features .....1430
35.3CCB implementation .....1431
35.4CCB functional description .....1431
35.4.1CCB block diagram .....1431
35.4.2CCB internal signals .....1432
35.4.3CCB reset and clocks .....1432
35.4.4CCB coupling and chaining .....1432
35.4.5CCB error management .....1435
35.5CCB coupling and chaining operations .....1435
35.5.1Preliminary steps before any protected operation .....1437
35.5.2ECDSA signature .....1438
35.5.3ECC scalar multiplication .....1445
35.5.4RSA modular exponentiation .....1448
35.6CCB interrupts .....1450
35.7CCB registers .....1451
35.7.1CCB control register (CCB_CR) .....1451
35.7.2CCB status register (CCB_SR) .....1452
35.7.3CCB reference tag register (CCB_REFTAGRx) .....1454
35.7.4CCB register map .....1455
36True random number generator (RNG) .....1456
36.1RNG introduction1456
36.2RNG main features1456
36.3RNG functional description1457
36.3.1RNG block diagram1457
36.3.2RNG internal signals1457
36.3.3Random number generation1457
36.3.4RNG initialization1460
36.3.5RNG operation1461
36.3.6RNG clocking1463
36.3.7Error management1463
36.3.8RNG low-power use1464
36.4RNG interrupts1465
36.5RNG processing time1465
36.6RNG entropy source validation1466
36.6.1Introduction1466
36.6.2Validation conditions1466
36.7RNG registers1467
36.7.1RNG control register (RNG_CR)1467
36.7.2RNG status register (RNG_SR)1469
36.7.3RNG data register (RNG_DR)1470
36.7.4RNG noise source control register (RNG_NSCR)1471
36.7.5RNG health test control register (RNG_HTCR)1472
36.7.6RNG register map1472
37True random number generator (RNG)1473
37.1RNG introduction1473
37.2RNG main features1473
37.3RNG functional description1474
37.3.1RNG block diagram1474
37.3.2RNG internal signals1474
37.3.3Random number generation1475
37.3.4RNG initialization1477
37.3.5RNG operation1478
37.3.6RNG clocking1480
37.3.7Error management1480
37.3.8RNG low-power use1482
37.4RNG interrupts1482
37.5RNG processing time1483
37.6RNG entropy source validation1483
37.6.1Introduction1483
37.6.2Validation conditions1483
37.7RNG registers1485
37.7.1RNG control register (RNG_CR)1485
37.7.2RNG status register (RNG_SR)1487
37.7.3RNG data register (RNG_DR)1488
37.7.4RNG noise source control register (RNG_NSCR)1489
37.7.5RNG health test control register x (RNG_HTCRx)1489
37.7.6RNG health test status register 0 (RNG_HTSR0)1490
37.7.7RNG health test status register 1 (RNG_HTSR1)1490
37.7.8RNG noise source mask register (RNG_NSMR)1491
37.7.9RNG register map1492
38Secure AES coprocessor (SAES)1493
38.1SAES introduction1493
38.2SAES main features1493
38.3SAES implementation1494
38.4SAES functional description1494
38.4.1SAES block diagram1494
38.4.2SAES internal signals1495
38.4.3SAES reset and clocks1496
38.4.4SAES symmetric cipher implementation1496
38.4.5SAES encryption or decryption typical usage1497
38.4.6SAES authenticated encryption, decryption, and cipher-based message authentication1499
38.4.7SAES ciphertext stealing and data padding1500
38.4.8SAES suspend and resume operations1500
38.4.9SAES basic chaining modes (ECB, CBC)1501
38.4.10SAES counter (CTR) mode1505
38.4.11SAES Galois/counter mode (GCM)1507
38.4.12SAES Galois message authentication code (GMAC)1511
38.4.13SAES counter with CBC-MAC (CCM)1513
38.4.14SAES operation with wrapped keys1518
38.4.15SAES operation with shared keys1522
38.4.16SAES data registers and data swapping1523
38.4.17SAES key registers1526
38.4.18SAES initialization vector registers1527
38.4.19SAES error management1528
38.5SAES interrupts1530
38.6SAES DMA requests1530
38.7SAES processing latency1531
38.8SAES registers1533
38.8.1SAES control register (SAES_CR)1533
38.8.2SAES status register (SAES_SR)1536
38.8.3SAES data input register (SAES_DINR)1537
38.8.4SAES data output register (SAES_DOUTR)1538
38.8.5SAES key register 0 (SAES_KEYR0)1538
38.8.6SAES key register 1 (SAES_KEYR1)1539
38.8.7SAES key register 2 (SAES_KEYR2)1539
38.8.8SAES key register 3 (SAES_KEYR3)1539
38.8.9SAES initialization vector register 0 (SAES_IVR0)1540
38.8.10SAES initialization vector register 1 (SAES_IVR1)1540
38.8.11SAES initialization vector register 2 (SAES_IVR2)1540
38.8.12SAES initialization vector register 3 (SAES_IVR3)1541
38.8.13SAES key register 4 (SAES_KEYR4)1541
38.8.14SAES key register 5 (SAES_KEYR5)1541
38.8.15SAES key register 6 (SAES_KEYR6)1542
38.8.16SAES key register 7 (SAES_KEYR7)1542
38.8.17SAES suspend registers (SAES_SUSPRx)1542
38.8.18SAES interrupt enable register (SAES_IER)1543
38.8.19SAES interrupt status register (SAES_ISR)1544
38.8.20SAES interrupt clear register (SAES_ICR)1545
38.8.21SAES register map1546
39AES hardware accelerator (AES)1548
39.1AES introduction1548
39.2AES main features1548
39.3AES implementation1549
39.4AES functional description1549
39.4.1AES block diagram1549
39.4.2AES internal signals . . . . .1550
39.4.3AES reset and clocks . . . . .1550
39.4.4AES symmetric cipher implementation . . . . .1550
39.4.5AES encryption or decryption typical usage . . . . .1551
39.4.6AES authenticated encryption, decryption, and cipher-based message authentication . . . . .1553
39.4.7AES ciphertext stealing and data padding . . . . .1553
39.4.8AES suspend and resume operations . . . . .1554
39.4.9AES basic chaining modes (ECB, CBC) . . . . .1555
39.4.10AES counter (CTR) mode . . . . .1558
39.4.11AES Galois/counter mode (GCM) . . . . .1561
39.4.12AES Galois message authentication code (GMAC) . . . . .1565
39.4.13AES counter with CBC-MAC (CCM) . . . . .1566
39.4.14AES key sharing with secure AES co-processor . . . . .1571
39.4.15AES data registers and data swapping . . . . .1572
39.4.16AES key registers . . . . .1574
39.4.17AES initialization vector registers . . . . .1574
39.4.18AES error management . . . . .1575
39.5AES interrupts . . . . .1576
39.6AES DMA requests . . . . .1576
39.7AES processing latency . . . . .1577
39.8AES registers . . . . .1579
39.8.1AES control register (AES_CR) . . . . .1579
39.8.2AES status register (AES_SR) . . . . .1581
39.8.3AES data input register (AES_DINR) . . . . .1582
39.8.4AES data output register (AES_DOUTR) . . . . .1583
39.8.5AES key register 0 (AES_KEYR0) . . . . .1583
39.8.6AES key register 1 (AES_KEYR1) . . . . .1584
39.8.7AES key register 2 (AES_KEYR2) . . . . .1584
39.8.8AES key register 3 (AES_KEYR3) . . . . .1584
39.8.9AES initialization vector register 0 (AES_IVR0) . . . . .1585
39.8.10AES initialization vector register 1 (AES_IVR1) . . . . .1585
39.8.11AES initialization vector register 2 (AES_IVR2) . . . . .1585
39.8.12AES initialization vector register 3 (AES_IVR3) . . . . .1586
39.8.13AES key register 4 (AES_KEYR4) . . . . .1586
39.8.14AES key register 5 (AES_KEYR5) . . . . .1586
39.8.15AES key register 6 (AES_KEYR6) . . . . .1587
39.8.16AES key register 7 (AES_KEYR7) .....1587
39.8.17AES suspend registers (AES_SUSPRx) .....1587
39.8.18AES interrupt enable register (AES_IER) .....1588
39.8.19AES interrupt status register (AES_ISR) .....1589
39.8.20AES interrupt clear register (AES_ICR) .....1590
39.8.21AES register map .....1590
40Hash processor (HASH) .....1593
40.1HASH introduction .....1593
40.2HASH main features .....1593
40.3HASH implementation .....1594
40.4HASH functional description .....1594
40.4.1HASH block diagram .....1594
40.4.2HASH internal signals .....1595
40.4.3About secure hash algorithms .....1595
40.4.4Message data feeding .....1596
40.4.5Message digest computing .....1597
40.4.6Message padding .....1600
40.4.7HMAC operation .....1601
40.4.8HASH suspend/resume operations .....1603
40.4.9HASH DMA interface .....1605
40.4.10HASH error management .....1606
40.4.11HASH processing time .....1606
40.5HASH interrupts .....1606
40.6HASH registers .....1607
40.6.1HASH control register (HASH_CR) .....1607
40.6.2HASH data input register (HASH_DIN) .....1609
40.6.3HASH start register (HASH_STR) .....1610
40.6.4HASH digest registers .....1611
40.6.5HASH interrupt enable register (HASH_IMR) .....1613
40.6.6HASH status register (HASH_SR) .....1613
40.6.7HASH context swap registers .....1615
40.6.8HASH register map .....1615
41Public key accelerator (PKA) .....1617
41.1PKA introduction .....1617
41.2PKA main features1617
41.3PKA implementation1617
41.4PKA functional description1618
41.4.1PKA block diagram1618
41.4.2PKA internal signals1618
41.4.3PKA reset and clocks1619
41.4.4PKA public key acceleration1619
41.4.5Typical applications for PKA1621
41.4.6PKA procedure to perform an operation1623
41.4.7Private keys protection using CCB1624
41.4.8PKA error management1628
41.5PKA operating modes1628
41.5.1Introduction1628
41.5.2Montgomery parameter computation1630
41.5.3Modular addition1630
41.5.4Modular subtraction1631
41.5.5Modular and Montgomery multiplication1631
41.5.6Modular exponentiation1632
41.5.7Modular inversion1634
41.5.8Modular reduction1634
41.5.9Arithmetic addition1635
41.5.10Arithmetic subtraction1635
41.5.11Arithmetic multiplication1636
41.5.12Arithmetic comparison1636
41.5.13RSA CRT exponentiation1636
41.5.14Point on elliptic curve \(F_p\) check1637
41.5.15ECC \(F_p\) scalar multiplication1638
41.5.16ECDSA sign1639
41.5.17ECDSA verification1641
41.5.18ECC complete addition1642
41.5.19ECC double base ladder1642
41.5.20ECC projective to affine1643
41.6Example of configurations and processing times1644
41.6.1Supported elliptic curves1644
41.6.2Computation times1646
41.7PKA interrupts1648
41.8PKA registers .....1649
41.8.1PKA control register (PKA_CR) .....1649
41.8.2PKA status register (PKA_SR) .....1651
41.8.3PKA clear flag register (PKA_CLRFR) .....1653
41.8.4PKA RAM .....1654
41.8.5PKA register map .....1655
42On-the-fly decryption engine (OTFDEC) .....1656
42.1OTFDEC introduction .....1656
42.2OTFDEC main features .....1656
42.3OTFDEC functional description .....1657
42.3.1OTFDEC block diagram .....1657
42.3.2OTFDEC internal signals .....1657
42.3.3OTFDEC on-the-fly decryption .....1658
42.3.4OTFDEC usage of AES in counter mode decryption .....1659
42.3.5Flow control management .....1660
42.3.6OTFDEC error management .....1660
42.4OTFDEC interrupts .....1661
42.5OTFDEC application information .....1661
42.5.1OTFDEC initialization process .....1661
42.5.2OTFDEC and power management .....1663
42.5.3Encrypting for OTFDEC .....1663
42.5.4OTFDEC key CRC source code .....1664
42.6OTFDEC registers .....1665
42.6.1OTFDEC control register (OTFDEC_CR) .....1665
42.6.2OTFDEC privileged access control configuration register
(OTFDEC_PRIVCFGR) .....
1666
42.6.3OTFDEC region x configuration register (OTFDEC_RxCFGR) ....1666
42.6.4OTFDEC region x start address register
(OTFDEC_RxSTARTADDR) .....
1668
42.6.5OTFDEC region x end address register (OTFDEC_RxENDADDR) ..1668
42.6.6OTFDEC region x nonce register 0 (OTFDEC_RxNONCER0) ....1669
42.6.7OTFDEC region x nonce register 1 (OTFDEC_RxNONCER1) ....1670
42.6.8OTFDEC region x key register 0 (OTFDEC_RxKEYR0) .....1670
42.6.9OTFDEC region x key register 1 (OTFDEC_RxKEYR1) .....1671
42.6.10OTFDEC region x key register 2 (OTFDEC_RxKEYR2) .....1671
42.6.11OTFDEC region x key register 3 (OTFDEC_RxKEYR3) .....1672
42.6.12OTFDEC interrupt status register (OTFDEC_ISR) .....1672
42.6.13OTFDEC interrupt clear register (OTFDEC_ICR) .....1673
42.6.14OTFDEC interrupt enable register (OTFDEC_IER) .....1674
42.6.15OTFDEC register map .....1675
43Advanced-control timers (TIM1/TIM8) .....1679
43.1TIM1/TIM8 introduction .....1679
43.2TIM1/TIM8 main features .....1679
43.3TIM1/TIM8 functional description .....1680
43.3.1Block diagram .....1680
43.3.2TIM1/TIM8 pins and internal signals .....1681
43.3.3Time-base unit .....1686
43.3.4Counter modes .....1688
43.3.5Repetition counter .....1700
43.3.6External trigger input .....1701
43.3.7Clock selection .....1702
43.3.8Capture/compare channels .....1706
43.3.9Input capture mode .....1709
43.3.10PWM input mode .....1710
43.3.11Forced output mode .....1711
43.3.12Output compare mode .....1711
43.3.13PWM mode .....1713
43.3.14Asymmetric PWM mode .....1721
43.3.15Combined PWM mode .....1722
43.3.16Combined 3-phase PWM mode .....1723
43.3.17Complementary outputs and dead-time insertion .....1724
43.3.18Using the break function .....1727
43.3.19Bidirectional break inputs .....1733
43.3.20Clearing the tim_ocxref signal on an external event .....1734
43.3.216-step PWM generation .....1736
43.3.22One-pulse mode .....1737
43.3.23Retriggerable One-pulse mode .....1739
43.3.24Pulse on compare mode .....1740
43.3.25Encoder interface mode .....1742
43.3.26Direction bit output .....1759
43.3.27UIF bit remapping .....1760
43.3.28Timer input XOR function .....1760
43.3.29Interfacing with Hall sensors .....1760
43.3.30Timer synchronization .....1762
43.3.31ADC triggers .....1767
43.3.32DMA burst mode .....1767
43.3.33TIM1/TIM8 DMA requests .....1768
43.3.34Debug mode .....1768
43.4TIM1/TIM8 low-power modes .....1769
43.5TIM1/TIM8 interrupts .....1769
43.6TIM1/TIM8 registers .....1770
43.6.1TIMx control register 1 (TIMx_CR1)(x = 1, 8) .....1770
43.6.2TIMx control register 2 (TIMx_CR2)(x = 1, 8) .....1771
43.6.3TIMx slave mode control register (TIMx_SMCR)(x = 1, 8) .....1775
43.6.4TIMx DMA/interrupt enable register (TIMx_DIER)(x = 1, 8) .....1779
43.6.5TIMx status register (TIMx_SR)(x = 1, 8) .....1780
43.6.6TIMx event generation register (TIMx_EGR)(x = 1, 8) .....1783
43.6.7TIMx capture/compare mode register 1 (TIMx_CCMR1)
(x = 1, 8) .....
1784
43.6.8TIMx capture/compare mode register 1 [alternate]
(TIMx_CCMR1)(x = 1, 8) .....
1786
43.6.9TIMx capture/compare mode register 2 (TIMx_CCMR2)
(x = 1, 8) .....
1789
43.6.10TIMx capture/compare mode register 2 [alternate]
(TIMx_CCMR2)(x = 1, 8) .....
1790
43.6.11TIMx capture/compare enable register (TIMx_CCER)(x = 1, 8) ....1793
43.6.12TIMx counter (TIMx_CNT)(x = 1, 8) .....1797
43.6.13TIMx prescaler (TIMx_PSC)(x = 1, 8) .....1797
43.6.14TIMx autoreload register (TIMx_ARR)(x = 1, 8) .....1798
43.6.15TIMx repetition counter register (TIMx_RCR)(x = 1, 8) .....1798
43.6.16TIMx capture/compare register 1 (TIMx_CCR1)(x = 1, 8) .....1799
43.6.17TIMx capture/compare register 2 (TIMx_CCR2)(x = 1, 8) .....1799
43.6.18TIMx capture/compare register 3 (TIMx_CCR3)(x = 1, 8) .....1800
43.6.19TIMx capture/compare register 4 (TIMx_CCR4)(x = 1, 8) .....1801
43.6.20TIMx break and dead-time register (TIMx_BDTR)(x = 1, 8) .....1802
43.6.21TIMx capture/compare register 5 (TIMx_CCR5)(x = 1, 8) .....1806
43.6.22TIMx capture/compare register 6 (TIMx_CCR6)(x = 1, 8) .....1807
43.6.23TIMx capture/compare mode register 3 (TIMx_CCMR3)
(x = 1, 8) .....
1808
43.6.24TIMx timer deadtime register 2 (TIMx_DTR2)(x = 1, 8) .....1809
43.6.25TIMx timer encoder control register (TIMx_ECR)(x = 1, 8) . . . . .1810
43.6.26TIMx timer input selection register (TIMx_TISEL)(x = 1, 8) . . . . .1811
43.6.27TIMx alternate function option register 1 (TIMx_AF1)(x = 1, 8) . . . . .1812
43.6.28TIMx alternate function register 2 (TIMx_AF2)(x = 1, 8) . . . . .1815
43.6.29TIMx DMA control register (TIMx_DCR)(x = 1, 8) . . . . .1817
43.6.30TIMx DMA address for full transfer (TIMx_DMAR)(x = 1, 8) . . . . .1819
43.6.31TIMx register map . . . . .1819
44General-purpose timers (TIM2/TIM3/TIM4/TIM5) . . . . .1822
44.1TIM2/TIM3/TIM4/TIM5 introduction . . . . .1822
44.2TIM2/TIM3/TIM4/TIM5 main features . . . . .1822
44.3TIM2/TIM3/TIM4/TIM5 implementation . . . . .1823
44.4TIM2/TIM3/TIM4/TIM5 functional description . . . . .1824
44.4.1Block diagram . . . . .1824
44.4.2TIM2/TIM3/TIM4/TIM5 pins and internal signals . . . . .1825
44.4.3Time-base unit . . . . .1829
44.4.4Counter modes . . . . .1831
44.4.5Clock selection . . . . .1842
44.4.6Capture/compare channels . . . . .1846
44.4.7Input capture mode . . . . .1848
44.4.8PWM input mode . . . . .1849
44.4.9Forced output mode . . . . .1850
44.4.10Output compare mode . . . . .1850
44.4.11PWM mode . . . . .1852
44.4.12Asymmetric PWM mode . . . . .1860
44.4.13Combined PWM mode . . . . .1861
44.4.14Clearing the tim_ocxref signal on an external event . . . . .1862
44.4.15One-pulse mode . . . . .1864
44.4.16Retriggerable one-pulse mode . . . . .1865
44.4.17Pulse on compare mode . . . . .1866
44.4.18Encoder interface mode . . . . .1868
44.4.19Direction bit output . . . . .1886
44.4.20UIF bit remapping . . . . .1887
44.4.21Timer input XOR function . . . . .1887
44.4.22Timers and external trigger synchronization . . . . .1887
44.4.23Timer synchronization . . . . .1891
44.4.24ADC triggers . . . . .1896
44.4.25DMA burst mode1897
44.4.26TIM2/TIM3/TIM4/TIM5 DMA requests1898
44.4.27Debug mode1898
44.4.28TIM2/TIM3/TIM4/TIM5 low-power modes1898
44.4.29TIM2/TIM3/TIM4/TIM5 interrupts1899
44.5TIM2/TIM3/TIM4/TIM5 registers1900
44.5.1TIMx control register 1 (TIMx_CR1)(x = 2 to 5)1900
44.5.2TIMx control register 2 (TIMx_CR2)(x = 2 to 5)1901
44.5.3TIMx slave mode control register (TIMx_SMCR)(x = 2 to 5)1903
44.5.4TIMx DMA/Interrupt enable register (TIMx_DIER)(x = 2 to 5)1907
44.5.5TIMx status register (TIMx_SR)(x = 2 to 5)1908
44.5.6TIMx event generation register (TIMx_EGR)(x = 2 to 5)1910
44.5.7TIMx capture/compare mode register 1 (TIMx_CCMR1)(x = 2 to 5)1911
44.5.8TIMx capture/compare mode register 1 [alternate]
(TIMx_CCMR1)(x = 2 to 5)
1913
44.5.9TIMx capture/compare mode register 2 (TIMx_CCMR2)(x = 2 to 5)1915
44.5.10TIMx capture/compare mode register 2 [alternate]
(TIMx_CCMR2)(x = 2 to 5)
1916
44.5.11TIMx capture/compare enable register (TIMx_CCER)(x = 2 to 5)1919
44.5.12TIMx counter (TIMx_CNT)(x = 3, 4)1920
44.5.13TIMx counter (TIMx_CNT)(x = 2, 5)1921
44.5.14TIMx prescaler (TIMx_PSC)(x = 2 to 5)1921
44.5.15TIMx autoreload register (TIMx_ARR)(x = 3, 4)1922
44.5.16TIMx autoreload register (TIMx_ARR)(x = 2, 5)1922
44.5.17TIMx capture/compare register 1 (TIMx_CCR1)(x = 3, 4)1923
44.5.18TIMx capture/compare register 1 (TIMx_CCR1)(x = 2, 5)1924
44.5.19TIMx capture/compare register 2 (TIMx_CCR2)(x = 3, 4)1924
44.5.20TIMx capture/compare register 2 (TIMx_CCR2)(x = 2, 5)1925
44.5.21TIMx capture/compare register 3 (TIMx_CCR3)(x = 3, 4)1926
44.5.22TIMx capture/compare register 3 (TIMx_CCR3)(x = 2, 5)1927
44.5.23TIMx capture/compare register 4 (TIMx_CCR4)(x = 3, 4)1928
44.5.24TIMx capture/compare register 4 (TIMx_CCR4)(x = 2, 5)1929
44.5.25TIMx timer encoder control register (TIMx_ECR)(x = 2 to 5)1930
44.5.26TIMx timer input selection register (TIMx_TISEL)(x = 2 to 5)1931
44.5.27TIMx alternate function register 1 (TIMx_AF1)(x = 2 to 5)1932
44.5.28TIMx alternate function register 2 (TIMx_AF2)(x = 2 to 5)1933
44.5.29TIMx DMA control register (TIMx_DCR)(x = 2 to 5)1934
44.5.30TIMx DMA address for full transfer (TIMx_DMAR)(x = 2 to 5) . . . . .1935
44.5.31TIMx register map . . . . .1936
45Basic timers (TIM6/TIM7) . . . . .1939
45.1TIM6/TIM7 introduction . . . . .1939
45.2TIM6/TIM7 main features . . . . .1939
45.3TIM6/TIM7 functional description . . . . .1940
45.3.1TIM6/TIM7 block diagram . . . . .1940
45.3.2TIM6/TIM7 internal signals . . . . .1940
45.3.3TIM6/TIM7 clocks . . . . .1941
45.3.4Time-base unit . . . . .1941
45.3.5Counting mode . . . . .1943
45.3.6UIF bit remapping . . . . .1950
45.3.7ADC triggers . . . . .1951
45.3.8TIM6/TIM7 DMA requests . . . . .1951
45.3.9Debug mode . . . . .1951
45.3.10TIM6/TIM7 low-power modes . . . . .1951
45.3.11TIM6/TIM7 interrupts . . . . .1951
45.4TIM6/TIM7 registers . . . . .1952
45.4.1TIMx control register 1 (TIMx_CR1)(x = 6 to 7) . . . . .1952
45.4.2TIMx control register 2 (TIMx_CR2)(x = 6 to 7) . . . . .1954
45.4.3TIMx DMA/Interrupt enable register (TIMx_DIER)(x = 6 to 7) . . . . .1954
45.4.4TIMx status register (TIMx_SR)(x = 6 to 7) . . . . .1955
45.4.5TIMx event generation register (TIMx_EGR)(x = 6 to 7) . . . . .1955
45.4.6TIMx counter (TIMx_CNT)(x = 6 to 7) . . . . .1955
45.4.7TIMx prescaler (TIMx_PSC)(x = 6 to 7) . . . . .1956
45.4.8TIMx autoreload register (TIMx_ARR)(x = 6 to 7) . . . . .1956
45.4.9TIMx register map . . . . .1957
46General-purpose timers (TIM12/TIM13/TIM14) . . . . .1958
46.1TIM12/TIM13/TIM14 introduction . . . . .1958
46.2TIM12 main features . . . . .1958
46.3TIM13/TIM14 main features . . . . .1959
46.4TIM12/TIM13/TIM14 functional description . . . . .1960
46.4.1Block diagram . . . . .1960
46.4.2TIM12/TIM13/TIM14 pins and internal signals . . . . .1961
46.4.3Time-base unit .....1964
46.4.4Counter modes .....1966
46.4.5Clock selection .....1969
46.4.6Capture/compare channels .....1971
46.4.7Input capture mode .....1973
46.4.8PWM input mode (TIM12 only) .....1974
46.4.9Forced output mode .....1975
46.4.10Output compare mode .....1976
46.4.11PWM mode .....1977
46.4.12Combined PWM mode (TIM12 only) .....1982
46.4.13One-pulse mode .....1983
46.4.14Retriggerable one pulse mode (TIM12 only) .....1985
46.4.15UIF bit remapping .....1986
46.4.16Timer input XOR function .....1986
46.4.17TIM12 external trigger synchronization .....1986
46.4.18Slave mode – combined reset + trigger mode .....1989
46.4.19Slave mode – combined reset + gated mode .....1989
46.4.20Timer synchronization (TIM12 only) .....1989
46.4.21Using timer output as trigger for other timers
(TIM13/TIM14 only) .....
1989
46.4.22ADC triggers (TIM12 only) .....1989
46.4.23Debug mode .....1989
46.5TIM12/TIM13/TIM14 low-power modes .....1990
46.6TIM12/TIM13/TIM14 interrupts .....1990
46.7TIM12 registers .....1990
46.7.1TIM12 control register 1 (TIM12_CR1) .....1990
46.7.2TIM12 control register 2 (TIM12_CR2) .....1992
46.7.3TIM12 slave mode control register (TIM12_SMCR) .....1992
46.7.4TIM12 interrupt enable register (TIM12_DIER) .....1994
46.7.5TIM12 status register (TIM12_SR) .....1995
46.7.6TIM12 event generation register (TIM12_EGR) .....1996
46.7.7TIM12 capture/compare mode register 1 (TIM12_CCMR1) .....1997
46.7.8TIM12 capture/compare mode register 1 [alternate]
(TIM12_CCMR1) .....
1998
46.7.9TIM12 capture/compare enable register (TIM12_CCER) .....2001
46.7.10TIM12 counter (TIM12_CNT) .....2002
46.7.11TIM12 prescaler (TIM12_PSC) .....2003
46.7.12TIM12 autoreload register (TIM12_ARR) .....2003
46.7.13TIM12 capture/compare register 1 (TIM12_CCR1) .....2004
46.7.14TIM12 capture/compare register 2 (TIM12_CCR2) .....2004
46.7.15TIM12 timer input selection register (TIM12_TISEL) .....2005
46.7.16TIM12 register map .....2006
46.8TIM13/TIM14 registers .....2008
46.8.1TIMx control register 1 (TIMx_CR1)(x = 13, 14) .....2008
46.8.2TIMx interrupt enable register (TIMx_DIER)(x = 13, 14) .....2009
46.8.3TIMx status register (TIMx_SR)(x = 13, 14) .....2009
46.8.4TIMx event generation register (TIMx_EGR)(x = 13, 14) .....2010
46.8.5TIMx capture/compare mode register 1
(TIMx_CCMR1)(x = 13, 14) .....
2011
46.8.6TIMx capture/compare mode register 1 [alternate]
(TIMx_CCMR1)(x = 13, 14) .....
2012
46.8.7TIMx capture/compare enable register
(TIMx_CCER)(x = 13, 14) .....
2014
46.8.8TIMx counter (TIMx_CNT)(x = 13, 14) .....2015
46.8.9TIMx prescaler (TIMx_PSC)(x = 13, 14) .....2016
46.8.10TIMx autoreload register (TIMx_ARR)(x = 13, 14) .....2016
46.8.11TIMx capture/compare register 1 (TIMx_CCR1)(x = 13, 14) .....2017
46.8.12TIMx timer input selection register (TIMx_TISEL)(x = 13, 14) .....2017
46.8.13TIM13/TIM14 register map .....2018
47General purpose timers (TIM15/TIM16/TIM17) .....2020
47.1TIM15/TIM16/TIM17 introduction .....2020
47.2TIM15 main features .....2020
47.3TIM16/TIM17 main features .....2021
47.4TIM15/TIM16/TIM17 functional description .....2022
47.4.1Block diagram .....2022
47.4.2TIM15/TIM16/TIM17 pins and internal signals .....2023
47.4.3Time-base unit .....2027
47.4.4Counter modes .....2029
47.4.5Repetition counter .....2033
47.4.6Clock selection .....2034
47.4.7Capture/compare channels .....2036
47.4.8Input capture mode .....2038
47.4.9PWM input mode (only for TIM15) .....2040
47.4.10Forced output mode .....2041
47.4.11Output compare mode .....2041
47.4.12PWM mode .....2043
47.4.13Combined PWM mode (TIM15 only) .....2048
47.4.14Complementary outputs and dead-time insertion .....2049
47.4.15Using the break function .....2052
47.4.16Bidirectional break input .....2056
47.4.17Clearing the tim_ocxref signal on an external event .....2057
47.4.186-step PWM generation .....2058
47.4.19One-pulse mode .....2060
47.4.20Retriggerable one pulse mode (TIM15 only) .....2061
47.4.21UIF bit remapping .....2062
47.4.22Timer input XOR function (TIM15 only) .....2062
47.4.23External trigger synchronization (TIM15 only) .....2062
47.4.24Slave mode – combined reset + trigger mode (TIM15 only) .....2065
47.4.25Slave mode – combined reset + gated mode (TIM15 only) .....2065
47.4.26Timer synchronization (TIM15 only) .....2066
47.4.27Using timer output as trigger for other timers (TIM16/TIM17 only) ..2066
47.4.28ADC triggers (TIM15 only) .....2066
47.4.29DMA burst mode .....2066
47.4.30TIM15/TIM16/TIM17 DMA requests .....2067
47.4.31Debug mode .....2067
47.5TIM15/TIM16/TIM17 low-power modes .....2068
47.6TIM15/TIM16/TIM17 interrupts .....2068
47.7TIM15 registers .....2068
47.7.1TIM15 control register 1 (TIM15_CR1) .....2069
47.7.2TIM15 control register 2 (TIM15_CR2) .....2070
47.7.3TIM15 slave mode control register (TIM15_SMCR) .....2072
47.7.4TIM15 DMA/interrupt enable register (TIM15_DIER) .....2074
47.7.5TIM15 status register (TIM15_SR) .....2075
47.7.6TIM15 event generation register (TIM15_EGR) .....2077
47.7.7TIM15 capture/compare mode register 1 (TIM15_CCMR1) .....2078
47.7.8TIM15 capture/compare mode register 1 [alternate]
(TIM15_CCMR1) .....
2079
47.7.9TIM15 capture/compare enable register (TIM15_CCER) .....2082
47.7.10TIM15 counter (TIM15_CNT) .....2085
47.7.11TIM15 prescaler (TIM15_PSC) .....2085
47.7.12TIM15 autoreload register (TIM15_ARR) .....2086
47.7.13TIM15 repetition counter register (TIM15_RCR) .....2086
47.7.14TIM15 capture/compare register 1 (TIM15_CCR1) .....2087
47.7.15TIM15 capture/compare register 2 (TIM15_CCR2) .....2088
47.7.16TIM15 break and dead-time register (TIM15_BDTR) .....2088
47.7.17TIM15 timer deadtime register 2 (TIM15_DTR2) .....2091
47.7.18TIM15 input selection register (TIM15_TISEL) .....2092
47.7.19TIM15 alternate function register 1 (TIM15_AF1) .....2093
47.7.20TIM15 alternate function register 2 (TIM15_AF2) .....2095
47.7.21TIM15 DMA control register (TIM15_DCR) .....2096
47.7.22TIM15 DMA address for full transfer (TIM15_DMAR) .....2097
47.7.23TIM15 register map .....2097
47.8TIM16/TIM17 registers .....2100
47.8.1TIMx control register 1 (TIMx_CR1)(x = 16 to 17) .....2100
47.8.2TIMx control register 2 (TIMx_CR2)(x = 16 to 17) .....2101
47.8.3TIMx DMA/interrupt enable register (TIMx_DIER)(x = 16 to 17) ....2102
47.8.4TIMx status register (TIMx_SR)(x = 16 to 17) .....2103
47.8.5TIMx event generation register (TIMx_EGR)(x = 16 to 17) .....2104
47.8.6TIMx capture/compare mode register 1 (TIMx_CCMR1)
(x = 16 to 17) .....
2105
47.8.7TIMx capture/compare mode register 1 [alternate]
(TIMx_CCMR1)(x = 16 to 17) .....
2106
47.8.8TIMx capture/compare enable register (TIMx_CCER)(x = 16 to 17) .2108
47.8.9TIMx counter (TIMx_CNT)(x = 16 to 17) .....2111
47.8.10TIMx prescaler (TIMx_PSC)(x = 16 to 17) .....2111
47.8.11TIMx auto-reautoreload register (TIMx_ARR)(x = 16 to 17) .....2112
47.8.12TIMx repetition counter register (TIMx_RCR)(x = 16 to 17) .....2112
47.8.13TIMx capture/compare register 1 (TIMx_CCR1)(x = 16 to 17) ....2113
47.8.14TIMx break and dead-time register (TIMx_BDTR)(x = 16 to 17) ....2114
47.8.15TIMx timer deadtime register 2 (TIMx_DTR2)(x = 16 to 17) .....2117
47.8.16TIMx input selection register (TIMx_TISEL)(x = 16 to 17) .....2118
47.8.17TIMx alternate function register 1 (TIMx_AF1)(x = 16 to 17) .....2118
47.8.18TIMx alternate function register 2 (TIMx_AF2)(x = 16 to 17) .....2121
47.8.19TIM17 option register 1 (TIM17_OR1) .....2121
47.8.20TIMx DMA control register (TIMx_DCR)(x = 16 to 17) .....2122
47.8.21TIM16/TIM17 DMA address for full transfer
(TIMx_DMAR)(x = 16 to 17) .....
2123
47.8.22TIM16/TIM17 register map .....2124
48Low-power timer (LPTIM)2127
48.1LPTIM introduction2127
48.2LPTIM main features2127
48.3LPTIM implementation2127
48.4LPTIM functional description2129
48.4.1LPTIM block diagram2129
48.4.2LPTIM pins and internal signals2130
48.4.3LPTIM input and trigger mapping2132
48.4.4LPTIM reset and clocks2133
48.4.5Glitch filter2134
48.4.6Prescaler2135
48.4.7Trigger multiplexer2135
48.4.8Operating mode2136
48.4.9Timeout function2138
48.4.10Waveform generation2138
48.4.11Register update2139
48.4.12Counter mode2140
48.4.13Timer enable2140
48.4.14Timer counter reset2141
48.4.15Encoder mode2141
48.4.16Repetition counter2143
48.4.17Capture/compare channels2144
48.4.18Input capture mode2145
48.4.19PWM mode2147
48.4.20DMA requests2149
48.4.21Debug mode2150
48.5LPTIM low-power modes2150
48.6LPTIM interrupts2150
48.7LPTIM registers2151
48.7.1LPTIM4 interrupt and status register (LPTIM4_ISR)2152
48.7.2LPTIMx interrupt and status register [alternate] (LPTIMx_ISR)
(x = 1 to 3, 5, 6)
2153
48.7.3LPTIMx interrupt and status register [alternate] (LPTIMx_ISR)
(x = 1 to 3, 5, 6)
2155
48.7.4LPTIM4 interrupt clear register (LPTIM4_ICR)2157
48.7.5LPTIMx interrupt clear register [alternate] (LPTIMx_ICR)
(x = 1 to 3, 5, 6)
2158
48.7.6LPTIMx interrupt clear register [alternate] (LPTIMx_ICR)
(x = 1 to 3, 5, 6) .....
2159
48.7.7LPTIM4 interrupt enable register (LPTIM4_DIER) .....2160
48.7.8LPTIMx interrupt enable register [alternate] (LPTIMx_DIER)
(x = 1 to 3, 5, 6) .....
2162
48.7.9LPTIMx interrupt enable register [alternate] (LPTIMx_DIER)
(x = 1 to 3, 5, 6) .....
2163
48.7.10LPTIM configuration register (LPTIM_CFGR) .....2165
48.7.11LPTIM control register (LPTIM_CR) .....2168
48.7.12LPTIM compare register 1 (LPTIM_CCR1) .....2169
48.7.13LPTIM autoreload register (LPTIM_ARR) .....2170
48.7.14LPTIM counter register (LPTIM_CNT) .....2170
48.7.15LPTIM configuration register 2 (LPTIM_CFGR2) .....2171
48.7.16LPTIM repetition register (LPTIM_RCR) .....2172
48.7.17LPTIM capture/compare mode register 1 (LPTIM_CCMR1) .....2172
48.7.18LPTIM compare register 2 (LPTIM_CCR2) .....2175
48.7.19LPTIM register map .....2175
49Independent watchdog (IWDG) .....2178
49.1IWDG introduction .....2178
49.2IWDG main features .....2178
49.3IWDG implementation .....2178
49.4IWDG functional description .....2179
49.4.1IWDG block diagram .....2179
49.4.2IWDG internal signals .....2180
49.4.3Software and hardware watchdog modes .....2180
49.4.4Window option .....2181
49.4.5Debug .....2184
49.4.6Register access protection .....2184
49.5IWDG low power modes .....2185
49.6IWDG interrupts .....2185
49.7IWDG registers .....2187
49.7.1IWDG key register (IWDG_KR) .....2188
49.7.2IWDG prescaler register (IWDG_PR) .....2188
49.7.3IWDG reload register (IWDG_RLR) .....2189
49.7.4IWDG status register (IWDG_SR) .....2189
49.7.5IWDG window register (IWDG_WINR) .....2191
49.7.6IWDG early wake-up interrupt register (IWDG_EWCR) .....2191
49.7.7IWDG register map .....2193
50System window watchdog (WWDG) .....2194
50.1WWDG introduction .....2194
50.2WWDG main features .....2194
50.3WWDG implementation .....2194
50.4WWDG functional description .....2195
50.4.1WWDG block diagram .....2195
50.4.2WWDG internal signals .....2195
50.4.3Enabling the watchdog .....2196
50.4.4Controlling the down-counter .....2196
50.4.5How to program the watchdog timeout .....2196
50.4.6Debug mode .....2197
50.5WWDG interrupts .....2198
50.6WWDG registers .....2198
50.6.1WWDG control register (WWDG_CR) .....2198
50.6.2WWDG configuration register (WWDG_CFR) .....2199
50.6.3WWDG status register (WWDG_SR) .....2200
50.6.4WWDG register map .....2200
51Real-time clock (RTC) .....2201
51.1RTC introduction .....2201
51.2RTC main features .....2201
51.3RTC functional description .....2202
51.3.1RTC block diagram .....2202
51.3.2RTC pins and internal signals .....2204
51.3.3GPIOs controlled by the RTC and TAMP .....2205
51.3.4RTC secure protection modes .....2209
51.3.5RTC privilege protection modes .....2211
51.3.6Clock and prescalers .....2212
51.3.7Real-time clock and calendar .....2213
51.3.8Calendar ultra-low power mode .....2213
51.3.9Programmable alarms .....2214
51.3.10Periodic auto-wake-up .....2214
51.3.11RTC initialization and configuration .....2215
51.3.12Reading the calendar2218
51.3.13Resetting the RTC2219
51.3.14RTC synchronization2219
51.3.15RTC reference clock detection2219
51.3.16RTC smooth digital calibration2220
51.3.17Timestamp function2222
51.3.18Calibration clock output2223
51.3.19Tamper and alarm output2224
51.4RTC low-power modes2224
51.5RTC interrupts2225
51.6RTC registers2226
51.6.1RTC time register (RTC_TR)2226
51.6.2RTC date register (RTC_DR)2227
51.6.3RTC subsecond register (RTC_SSR)2228
51.6.4RTC initialization control and status register (RTC_ICSR)2229
51.6.5RTC prescaler register (RTC_PRER)2231
51.6.6RTC wake-up timer register (RTC_WUTR)2232
51.6.7RTC control register (RTC_CR)2232
51.6.8RTC privilege mode control register (RTC_PRIVCFGR)2236
51.6.9RTC secure configuration register (RTC_SECCFGR)2238
51.6.10RTC write protection register (RTC_WPR)2239
51.6.11RTC calibration register (RTC_CALR)2240
51.6.12RTC shift control register (RTC_SHIFTR)2241
51.6.13RTC timestamp time register (RTC_TSTR)2242
51.6.14RTC timestamp date register (RTC_TSDR)2243
51.6.15RTC timestamp subsecond register (RTC_TSSSR)2244
51.6.16RTC alarm A register (RTC_ALRMAR)2244
51.6.17RTC alarm A subsecond register (RTC_ALRMASSR)2246
51.6.18RTC alarm B register (RTC_ALRMBR)2247
51.6.19RTC alarm B subsecond register (RTC_ALRMBSSR)2248
51.6.20RTC status register (RTC_SR)2249
51.6.21RTC nonsecure masked interrupt status register (RTC_MISR)2251
51.6.22RTC secure masked interrupt status register (RTC_SMISR)2252
51.6.23RTC status clear register (RTC_SCR)2253
51.6.24RTC option register (RTC_OR)2254
51.6.25RTC alarm A binary mode register (RTC_ALRABINR)2254
51.6.26RTC alarm B binary mode register (RTC_ALRBBINR)2255
51.6.27RTC register map2256
52Tamper and backup registers (TAMP)2259
52.1TAMP introduction2259
52.2TAMP main features2260
52.3TAMP implementation2260
52.4TAMP functional description2261
52.4.1TAMP block diagram2261
52.4.2TAMP pins and internal signals2262
52.4.3GPIOs controlled by the RTC and TAMP2265
52.4.4TAMP register write protection2265
52.4.5TAMP secure protection modes2265
52.4.6Backup registers protection zones2266
52.4.7TAMP privilege protection modes2266
52.4.8Boot hardware key (BHK)2267
52.4.9Tamper detection2267
52.4.10TAMP backup registers and other device secrets erase2267
52.4.11Tamper detection configuration and initialization2269
52.5TAMP low-power modes2276
52.6TAMP interrupts2277
52.7TAMP registers2277
52.7.1TAMP control register 1 (TAMP_CR1)2277
52.7.2TAMP control register 2 (TAMP_CR2)2279
52.7.3TAMP control register 3 (TAMP_CR3)2282
52.7.4TAMP filter control register (TAMP_FLTCR)2283
52.7.5TAMP active tamper control register 1 (TAMP_ATCR1)2284
52.7.6TAMP active tamper seed register (TAMP_ATSEEDR)2287
52.7.7TAMP active tamper output register (TAMP_ATOM)2287
52.7.8TAMP active tamper control register 2 (TAMP_ATCR2)2288
52.7.9TAMP secure configuration register (TAMP_SECCFGR)2291
52.7.10TAMP privilege configuration register (TAMP_PRIVCFGR)2293
52.7.11TAMP interrupt enable register (TAMP_IER)2294
52.7.12TAMP status register (TAMP_SR)2296
52.7.13TAMP nonsecure masked interrupt status register (TAMP_MISR)2298
52.7.14TAMP secure masked interrupt status register (TAMP_SMISR)2299
52.7.15TAMP status clear register (TAMP_SCR)2301
52.7.16TAMP monotonic counter 1 register (TAMP_COUNT1R) . . . . .2303
52.7.17TAMP option register (TAMP_OR) . . . . .2303
52.7.18TAMP resources protection configuration register (TAMP_RPCFGR) . . . . .2304
52.7.19TAMP backup x register (TAMP_BKPxR) . . . . .2305
52.7.20TAMP register map . . . . .2306
53Inter-integrated circuit interface (I2C) . . . . .2308
53.1I2C introduction . . . . .2308
53.2I2C main features . . . . .2308
53.3I2C implementation . . . . .2309
53.4I2C functional description . . . . .2309
53.4.1I2C block diagram . . . . .2310
53.4.2I2C pins and internal signals . . . . .2310
53.4.3I2C clock requirements . . . . .2311
53.4.4I2C mode selection . . . . .2311
53.4.5I2C initialization . . . . .2312
53.4.6I2C reset . . . . .2316
53.4.7I2C data transfer . . . . .2317
53.4.8I2C target mode . . . . .2319
53.4.9I2C controller mode . . . . .2328
53.4.10I2C_TIMINGR register configuration examples . . . . .2339
53.4.11SMBus specific features . . . . .2341
53.4.12SMBus initialization . . . . .2343
53.4.13SMBus I2C_TIMEOUTR register configuration examples . . . . .2345
53.4.14SMBus target mode . . . . .2346
53.4.15SMBus controller mode . . . . .2349
53.4.16Wake-up from Stop mode on address match . . . . .2352
53.4.17Error conditions . . . . .2353
53.5I2C in low-power modes . . . . .2355
53.6I2C interrupts . . . . .2355
53.7I2C DMA requests . . . . .2356
53.7.1Transmission using DMA . . . . .2356
53.7.2Reception using DMA . . . . .2356
53.8I2C debug modes . . . . .2356
53.9I2C registers . . . . .2357
53.9.1I2C control register 1 (I2C_CR1) . . . . .2357
53.9.2I2C control register 2 (I2C_CR2) .....2360
53.9.3I2C own address 1 register (I2C_OAR1) .....2362
53.9.4I2C own address 2 register (I2C_OAR2) .....2362
53.9.5I2C timing register (I2C_TIMINGR) .....2363
53.9.6I2C timeout register (I2C_TIMEOUTR) .....2364
53.9.7I2C interrupt and status register (I2C_ISR) .....2365
53.9.8I2C interrupt clear register (I2C_ICR) .....2368
53.9.9I2C PEC register (I2C_PECR) .....2369
53.9.10I2C receive data register (I2C_RXDR) .....2369
53.9.11I2C transmit data register (I2C_TXDR) .....2370
53.9.12I2C register map .....2371
54Improved inter-integrated circuit (I3C) .....2372
54.1I3C introduction .....2372
54.2I3C main features .....2372
54.3I3C implementation .....2374
54.3.1I3C instantiation .....2374
54.3.2I3C wake-up from low-power mode(s) .....2374
54.3.3I3C FIFOs .....2374
54.3.4I3C triggers .....2374
54.3.5I3C interrupt(s) .....2374
54.3.6I3C MIPI® support .....2375
54.4I3C block diagram .....2376
54.5I3C pins and internal signals .....2376
54.6I3C reset and clocks .....2377
54.6.1I3C reset .....2377
54.6.2I3C clocks and requirements .....2377
54.7I3C peripheral state and programming .....2379
54.7.1I3C peripheral state .....2379
54.7.2I3C controller state and programming sequence .....2380
54.7.3I3C target state and programming sequence .....2385
54.8I3C registers and programming .....2392
54.8.1I3C register set, as controller/target .....2392
54.8.2I3C registers and fields use versus peripheral state, as controller ..2393
54.8.3I3C registers and fields usage versus peripheral state, as target ...2395
54.9I3C bus transfers and programming .....2397
54.9.1I3C command set (CCCs), as controller/target2397
54.9.2I3C broadcast/direct CCC transfer (except ENTDA, RSTACT),
as controller
2401
54.9.3I3C broadcast ENTDA CCC transfer, as controller2403
54.9.4I3C broadcast/direct RSTACT CCC transfer, as controller2403
54.9.5I3C broadcast/direct CCC transfer
(except ENTDA, DEFTGTS, DEFGRPA), as target
2405
54.9.6I3C broadcast ENTDA CCC transfer, as target2407
54.9.7I3C broadcast DEFTGTS CCC transfer, as target2408
54.9.8I3C broadcast DEFGRPA CCC transfer, as target2409
54.9.9I3C direct GETSTATUS CCC response, as target2410
54.9.10I3C private read/write transfer, as controller2411
54.9.11I3C private read/write transfer, as target2412
54.9.12Legacy I2C read/write transfer, as controller2413
54.9.13Legacy I2C read/write transfer, as target2414
54.9.14I3C IBI transfer, as controller/target2414
54.9.15I3C hot-join request transfer, as controller/target2416
54.9.16I3C controller-role request transfer, as controller/target2417
54.10I3C FIFOs management, as controller2418
54.10.1C-FIFO management, as controller2418
54.10.2TX-FIFO management, as controller2419
54.10.3RX-FIFO management, as controller2422
54.10.4S-FIFO management, as controller2424
54.11I3C FIFOs management, as target2426
54.11.1RX-FIFO management, as target2426
54.11.2TX-FIFO management, as target2429
54.12I3C error management2433
54.12.1Controller error management2433
54.12.2Target error management2435
54.13I3C in low-power modes2436
54.14I3C interrupts2438
54.15I3C registers2438
54.15.1I3C message control register (I3C_CR)2438
54.15.2I3C message control register [alternate] (I3C_CR)2440
54.15.3I3C configuration register (I3C_CFGR)2442
54.15.4I3C receive data byte register (I3C_RDR)2447
54.15.5I3C receive data word register (I3C_RDWR)2448
54.15.6I3C transmit data byte register (I3C_TDR) . . . . .2449
54.15.7I3C transmit data word register (I3C_TDWR) . . . . .2450
54.15.8I3C IBI payload data register (I3C_IBIDR) . . . . .2451
54.15.9I3C target transmit configuration register (I3C_TGTTDR) . . . . .2452
54.15.10I3C status register (I3C_SR) . . . . .2453
54.15.11I3C status error register (I3C_SER) . . . . .2454
54.15.12I3C received message register (I3C_RMR) . . . . .2456
54.15.13I3C event register (I3C_EVR) . . . . .2457
54.15.14I3C interrupt enable register (I3C_IER) . . . . .2461
54.15.15I3C clear event register (I3C_CEV) . . . . .2463
54.15.16I3C masked interrupt status register (I3C_MISR) . . . . .2465
54.15.17I3C own device characteristics register (I3C_DEVR0) . . . . .2466
54.15.18I3C device x characteristics register (I3C_DEVRx) . . . . .2468
54.15.19I3C maximum read length register (I3C_MAXRLR) . . . . .2470
54.15.20I3C maximum write length register (I3C_MAXWLR) . . . . .2471
54.15.21I3C I2C target configuration register (I3C_I2CCFGR) . . . . .2472
54.15.22I3C timing register 0 (I3C_TIMINGR0) . . . . .2473
54.15.23I3C timing register 1 (I3C_TIMINGR1) . . . . .2474
54.15.24I3C timing register 2 (I3C_TIMINGR2) . . . . .2476
54.15.25I3C bus characteristics register (I3C_BCR) . . . . .2478
54.15.26I3C device characteristics register (I3C_DCR) . . . . .2479
54.15.27I3C get capability register (I3C_GETCAPR) . . . . .2480
54.15.28I3C controller-role capability register (I3C_CRCAPR) . . . . .2481
54.15.29I3C get max data speed register (I3C_GETMXDSR) . . . . .2482
54.15.30I3C extended provisioned ID register (I3C_EPIDR) . . . . .2484
54.15.31I3C register map . . . . .2485
55Improved inter-integrated circuit (I3C) . . . . .2488
55.1I3C introduction . . . . .2488
55.2I3C main features . . . . .2488
55.3I3C implementation . . . . .2490
55.3.1I3C instantiation . . . . .2490
55.3.2I3C wake-up from low-power mode(s) . . . . .2490
55.3.3I3C autonomous mode with DMA in Stop mode(s) . . . . .2490
55.3.4I3C FIFOs . . . . .2490
55.3.5I3C triggers . . . . .2490
55.3.6I3C interrupt(s) . . . . .2490
55.3.7I3C MIPI® support .....2491
55.4I3C block diagram .....2492
55.5I3C pins and internal signals .....2492
55.6I3C reset and clocks .....2493
55.6.1I3C reset .....2493
55.6.2I3C clocks and requirements .....2493
55.7I3C peripheral state and programming .....2495
55.7.1I3C peripheral state .....2495
55.7.2I3C controller state and programming sequence .....2496
55.7.3I3C target state and programming sequence .....2501
55.8I3C registers and programming .....2505
55.8.1I3C register set, as controller/target .....2505
55.8.2I3C registers and fields use versus peripheral state, as controller ..2506
55.8.3I3C registers and fields usage versus peripheral state, as target ...2509
55.9I3C bus transfers and programming .....2511
55.9.1I3C command set (CCCs), as controller/target .....2511
55.9.2I3C broadcast/direct CCC transfer (except ENTDA, RSTACT),
as controller .....
2515
55.9.3I3C broadcast ENTDA CCC transfer, as controller .....2517
55.9.4I3C broadcast/direct RSTACT CCC transfer, as controller .....2517
55.9.5I3C broadcast/direct CCC transfer
(except ENTDA, DEFTGTS, DEFGRPA), as target .....
2519
55.9.6I3C broadcast ENTDA CCC transfer, as target .....2521
55.9.7I3C broadcast DEFTGTS CCC transfer, as target .....2522
55.9.8I3C broadcast DEFGRPA CCC transfer, as target .....2523
55.9.9I3C direct GETSTATUS CCC response, as target .....2524
55.9.10I3C private read/write transfer, as controller .....2525
55.9.11I3C private read/write transfer, as target .....2526
55.9.12Legacy I2C read/write transfer, as controller .....2527
55.9.13I3C IBI transfer, as controller/target .....2528
55.9.14I3C hot-join request transfer, as controller/target .....2529
55.9.15I3C controller-role request transfer, as controller/target .....2530
55.10I3C FIFOs management, as controller .....2531
55.10.1C-FIFO management, as controller .....2531
55.10.2TX-FIFO management, as controller .....2532
55.10.3RX-FIFO management, as controller .....2535
55.10.4S-FIFO management, as controller .....2537
55.11I3C FIFOs management, as target2539
55.11.1RX-FIFO management, as target2539
55.11.2TX-FIFO management, as target2540
55.12I3C error management2543
55.12.1Controller error management2543
55.12.2Target error management2545
55.13I3C in low-power modes2546
55.14I3C interrupts2547
55.15I3C registers2547
55.15.1I3C message control register (I3C_CR)2547
55.15.2I3C message control register [alternate] (I3C_CR)2550
55.15.3I3C configuration register (I3C_CFGR)2552
55.15.4I3C receive data byte register (I3C_RDR)2557
55.15.5I3C receive data word register (I3C_RDWR)2558
55.15.6I3C transmit data byte register (I3C_TDR)2559
55.15.7I3C transmit data word register (I3C_TDWR)2560
55.15.8I3C IBI payload data register (I3C_IBIDR)2561
55.15.9I3C target transmit configuration register (I3C_TGTTDR)2562
55.15.10I3C status register (I3C_SR)2563
55.15.11I3C status error register (I3C_SER)2564
55.15.12I3C received message register (I3C_RMR)2566
55.15.13I3C event register (I3C_EVR)2567
55.15.14I3C interrupt enable register (I3C_IER)2571
55.15.15I3C clear event register (I3C_CEV)2573
55.15.16I3C masked interrupt status register (I3C_MISR)2575
55.15.17I3C own device characteristics register (I3C_DEVR0)2576
55.15.18I3C device x characteristics register (I3C_DEVRx)2578
55.15.19I3C maximum read length register (I3C_MAXRLR)2580
55.15.20I3C maximum write length register (I3C_MAXWLR)2581
55.15.21I3C timing register 0 (I3C_TIMINGR0)2582
55.15.22I3C timing register 1 (I3C_TIMINGR1)2583
55.15.23I3C timing register 2 (I3C_TIMINGR2)2585
55.15.24I3C bus characteristics register (I3C_BCR)2586
55.15.25I3C device characteristics register (I3C_DCR)2587
55.15.26I3C get capability register (I3C_GETCAPR)2588
55.15.27I3C controller-role capability register (I3C_CRCAPR)2589
55.15.28I3C get max data speed register (I3C_GETMXDSR) .....2590
55.15.29I3C extended provisioned ID register (I3C_EPIDR) .....2592
55.15.30I3C register map .....2593
56Universal synchronous/asynchronous receiver
transmitter (USART/UART) .....
2596
56.1USART introduction .....2596
56.2USART main features .....2596
56.3USART extended features .....2597
56.4USART implementation .....2597
56.5USART functional description .....2599
56.5.1USART block diagram .....2599
56.5.2USART pins and internal signals .....2599
56.5.3USART clocks .....2601
56.5.4USART character description .....2601
56.5.5USART FIFOs and thresholds .....2604
56.5.6USART transmitter .....2604
56.5.7USART receiver .....2607
56.5.8USART baud rate generation .....2614
56.5.9Tolerance of the USART receiver to clock deviation .....2616
56.5.10USART auto baud rate detection .....2617
56.5.11USART multiprocessor communication .....2619
56.5.12USART Modbus communication .....2621
56.5.13USART parity control .....2622
56.5.14USART LIN (local interconnection network) mode .....2623
56.5.15USART synchronous mode .....2625
56.5.16USART single-wire half-duplex communication .....2629
56.5.17USART receiver timeout .....2629
56.5.18USART smartcard mode .....2630
56.5.19USART IrDA SIR ENDEC block .....2634
56.5.20Continuous communication using USART and DMA .....2637
56.5.21RS232 hardware flow control and RS485 driver enable .....2639
56.5.22USART low-power management .....2642
56.6USART in low-power modes .....2645
56.7USART interrupts .....2645
56.8USART registers .....2648
56.8.1USART control register 1 (USART_CR1) .....2648
56.8.2USART control register 1 [alternate] (USART_CR1) .....2652
56.8.3USART control register 2 (USART_CR2) .....2655
56.8.4USART control register 3 (USART_CR3) .....2659
56.8.5USART control register 3 [alternate] (USART_CR3) .....2663
56.8.6USART baud rate register (USART_BRR) .....2666
56.8.7USART guard time and prescaler register (USART_GTPR) .....2667
56.8.8USART receiver timeout register (USART_RTOR) .....2668
56.8.9USART request register (USART_RQR) .....2669
56.8.10USART interrupt and status register (USART_ISR) .....2670
56.8.11USART interrupt and status register [alternate] (USART_ISR) ....2676
56.8.12USART interrupt flag clear register (USART_ICR) .....2681
56.8.13USART receive data register (USART_RDR) .....2682
56.8.14USART transmit data register (USART_TDR) .....2683
56.8.15USART prescaler register (USART_PRESC) .....2683
56.8.16USART register map .....2684
57Low-power universal asynchronous receiver
transmitter (LPUART) .....
2686
57.1LPUART introduction .....2686
57.2LPUART main features .....2686
57.3LPUART implementation .....2687
57.4LPUART functional description .....2689
57.4.1LPUART block diagram .....2689
57.4.2LPUART pins and internal signals .....2690
57.4.3LPUART clocks .....2691
57.4.4LPUART character description .....2691
57.4.5LPUART FIFOs and thresholds .....2693
57.4.6LPUART transmitter .....2693
57.4.7LPUART receiver .....2697
57.4.8LPUART baud rate generation .....2701
57.4.9Tolerance of the LPUART receiver to clock deviation .....2702
57.4.10LPUART multiprocessor communication .....2703
57.4.11LPUART parity control .....2705
57.4.12LPUART single-wire half-duplex communication .....2706
57.4.13Continuous communication using DMA and LPUART .....2706
57.4.14RS232 hardware flow control and RS485 driver enable .....2709
57.4.15LPUART low-power management .....2711
57.5LPUART in low-power modes .....2714
57.6LPUART interrupts .....2715
57.7LPUART registers .....2716
57.7.1LPUART control register 1 (LPUART_CR1) .....2716
57.7.2LPUART control register 1 [alternate] (LPUART_CR1) .....2719
57.7.3LPUART control register 2 (LPUART_CR2) .....2722
57.7.4LPUART control register 3 (LPUART_CR3) .....2724
57.7.5LPUART control register 3 [alternate] (LPUART_CR3) .....2727
57.7.6LPUART baud rate register (LPUART_BRR) .....2729
57.7.7LPUART request register (LPUART_RQR) .....2729
57.7.8LPUART interrupt and status register (LPUART_ISR) .....2730
57.7.9LPUART interrupt and status register [alternate] (LPUART_ISR) .....2735
57.7.10LPUART interrupt flag clear register (LPUART_ICR) .....2738
57.7.11LPUART receive data register (LPUART_RDR) .....2739
57.7.12LPUART transmit data register (LPUART_TDR) .....2739
57.7.13LPUART prescaler register (LPUART_PRESC) .....2740
57.7.14LPUART register map .....2741
58Serial peripheral interface (SPI) .....2743
58.1SPI introduction .....2743
58.2SPI main features .....2743
58.3SPI implementation .....2744
58.4SPI functional description .....2745
58.4.1SPI block diagram .....2745
58.4.2SPI pins and internal signals .....2746
58.4.3SPI communication general aspects .....2747
58.4.4Communications between one master and one slave .....2747
58.4.5Standard multislave communication .....2750
58.4.6Multimaster communication .....2753
58.4.7Slave select (NSS pin) management .....2754
58.4.8Ready pin (RDY) management .....2758
58.4.9Communication formats .....2758
58.4.10Configuring the SPI .....2760
58.4.11Enabling the SPI .....2761
58.4.12SPI data transmission and reception procedures .....2762
58.4.13Disabling the SPI .....2766
58.4.14Communication using DMA (direct memory addressing) .....2767
58.5SPI specific modes and control .....2769
58.5.1TI mode .....2769
58.5.2SPI error flags .....2769
58.5.3CRC computation .....2773
58.6SPI in low-power modes .....2774
58.7SPI interrupts .....2774
58.8I2S main features .....2776
58.9I2S functional description .....2776
58.9.1I2S general description .....2776
58.9.2Pin sharing with SPI function .....2777
58.9.3Bitfields usable in I2S/PCM mode .....2777
58.9.4Slave and master modes .....2778
58.9.5Supported audio protocols .....2778
58.9.6Additional serial interface flexibility .....2784
58.9.7Startup sequence .....2786
58.9.8Stop sequence .....2788
58.9.9Clock generator .....2789
58.9.10Internal FIFOs .....2791
58.9.11FIFO status flags .....2792
58.9.12Handling of underrun situation .....2792
58.9.13Handling of overrun situation .....2793
58.9.14Frame error detection .....2794
58.9.15DMA interface .....2796
58.9.16Programing examples .....2796
58.10I2S interrupts .....2798
58.11SPI/I2S registers .....2799
58.11.1SPI/I2S control register 1 (SPI_CR1) .....2799
58.11.2SPI/I2S control register 2 (SPI_CR2) .....2801
58.11.3SPI/I2S configuration register 1 (SPI_CFG1) .....2801
58.11.4SPI/I2S configuration register 2 (SPI_CFG2) .....2805
58.11.5SPI/I2S interrupt enable register (SPI_IER) .....2807
58.11.6SPI/I2S status register (SPI_SR) .....2808
58.11.7SPI/I2S interrupt/status flags clear register (SPI_IFCR) .....2811
58.11.8SPI/I2S transmit data register (SPI_TXDR) .....2812
58.11.9SPI/I2S receive data register (SPI_RXDR) .....2812
58.11.10SPI/I2S polynomial register (SPI_CRCPOLY) .....2813
58.11.11SPI/I2S transmitter CRC register (SPI_TXCRC) .....2813
58.11.12SPI/I2S receiver CRC register (SPI_RXCRC) .....2814
58.11.13SPI/I2S underrun data register (SPI_UDRDR) .....2815
58.11.14SPI/I2S configuration register (SPI_I2SCFGR) .....2815
58.11.15SPI/I2S register map .....2817
59Serial audio interface (SAI) .....2819
59.1SAI introduction .....2819
59.2SAI main features .....2819
59.3SAI implementation .....2820
59.4SAI functional description .....2820
59.4.1SAI block diagram .....2820
59.4.2SAI pins and internal signals .....2822
59.4.3Main SAI modes .....2823
59.4.4SAI synchronization mode .....2824
59.4.5Audio data size .....2825
59.4.6Frame synchronization .....2825
59.4.7Slot configuration .....2828
59.4.8SAI clock generator .....2830
59.4.9Internal FIFOs .....2833
59.4.10PDM interface .....2835
59.4.11AC'97 link controller .....2843
59.4.12SPDIF output .....2845
59.4.13Specific features .....2848
59.4.14Error flags .....2852
59.4.15Disabling the SAI .....2855
59.4.16SAI DMA interface .....2855
59.5SAI interrupts .....2856
59.6SAI registers .....2858
59.6.1SAI global configuration register (SAI_GCR) .....2858
59.6.2SAI configuration register 1 (SAI_ACR1) .....2858
59.6.3SAI configuration register 2 (SAI_ACR2) .....2861
59.6.4SAI frame configuration register (SAI_AFRCR) .....2863
59.6.5SAI slot register (SAI_ASLOTR) .....2864
59.6.6SAI interrupt mask register (SAI_AIM) . . . . .2865
59.6.7SAI status register (SAI_ASR) . . . . .2867
59.6.8SAI clear flag register (SAI_ACLRFR) . . . . .2869
59.6.9SAI data register (SAI_ADR) . . . . .2870
59.6.10SAI configuration register 1 (SAI_BCR1) . . . . .2870
59.6.11SAI configuration register 2 (SAI_BCR2) . . . . .2873
59.6.12SAI frame configuration register (SAI_BFRCR) . . . . .2875
59.6.13SAI slot register (SAI_BSLOTR) . . . . .2876
59.6.14SAI interrupt mask register (SAI_BIM) . . . . .2877
59.6.15SAI status register (SAI_BSR) . . . . .2878
59.6.16SAI clear flag register (SAI_BCLRFR) . . . . .2880
59.6.17SAI data register (SAI_BDR) . . . . .2881
59.6.18SAI PDM control register (SAI_PDMCR) . . . . .2882
59.6.19SAI PDM delay register (SAI_PDMDLY) . . . . .2883
59.6.20SAI register map . . . . .2885
60FD controller area network (FDCAN) . . . . .2887
60.1FDCAN introduction . . . . .2887
60.2FDCAN main features . . . . .2889
60.3FDCAN functional description . . . . .2890
60.3.1FDCAN block diagram . . . . .2890
60.3.2FDCAN pins and internal signals . . . . .2891
60.3.3Bit timing . . . . .2892
60.3.4Operating modes . . . . .2893
60.3.5Error management . . . . .2902
60.3.6Message RAM . . . . .2903
60.3.7FIFO acknowledge handling . . . . .2912
60.3.8FDCAN Rx FIFO element . . . . .2912
60.3.9FDCAN Tx buffer element . . . . .2914
60.3.10FDCAN Tx event FIFO element . . . . .2916
60.3.11FDCAN standard message ID filter element . . . . .2917
60.3.12FDCAN extended message ID filter element . . . . .2918
60.4FDCAN registers . . . . .2920
60.4.1FDCAN core release register (FDCAN_CREL) . . . . .2920
60.4.2FDCAN endian register (FDCAN_ENDN) . . . . .2920
60.4.3FDCAN data bit timing and prescaler register (FDCAN_DBTP) . . . . .2920
60.4.4FDCAN test register (FDCAN_TEST) . . . . .2921
60.4.5FDCAN RAM watchdog register (FDCAN_RWD) . . . . .2922
60.4.6FDCAN CC control register (FDCAN_CCCR) . . . . .2923
60.4.7FDCAN nominal bit timing and prescaler register (FDCAN_NBTP) . . . . .2924
60.4.8FDCAN timestamp counter configuration register (FDCAN_TSCC) . . . . .2926
60.4.9FDCAN timestamp counter value register (FDCAN_TSCV) . . . . .2926
60.4.10FDCAN timeout counter configuration register (FDCAN_TOCC) . . . . .2927
60.4.11FDCAN timeout counter value register (FDCAN_TOCV) . . . . .2928
60.4.12FDCAN error counter register (FDCAN_ECR) . . . . .2928
60.4.13FDCAN protocol status register (FDCAN_PSR) . . . . .2929
60.4.14FDCAN transmitter delay compensation register (FDCAN_TDCR) . . . . .2931
60.4.15FDCAN interrupt register (FDCAN_IR) . . . . .2931
60.4.16FDCAN interrupt enable register (FDCAN_IE) . . . . .2934
60.4.17FDCAN interrupt line select register (FDCAN_ILS) . . . . .2936
60.4.18FDCAN interrupt line enable register (FDCAN_ILE) . . . . .2937
60.4.19FDCAN global filter configuration register (FDCAN_RXGFC) . . . . .2937
60.4.20FDCAN extended ID and mask register (FDCAN_XIDAM) . . . . .2939
60.4.21FDCAN high-priority message status register (FDCAN_HPMS) . . . . .2939
60.4.22FDCAN Rx FIFO 0 status register (FDCAN_RXF0S) . . . . .2940
60.4.23CAN Rx FIFO 0 acknowledge register (FDCAN_RXF0A) . . . . .2941
60.4.24FDCAN Rx FIFO 1 status register (FDCAN_RXF1S) . . . . .2941
60.4.25FDCAN Rx FIFO 1 acknowledge register (FDCAN_RXF1A) . . . . .2942
60.4.26FDCAN Tx buffer configuration register (FDCAN_TXBC) . . . . .2942
60.4.27FDCAN Tx FIFO/queue status register (FDCAN_TXFQS) . . . . .2943
60.4.28FDCAN Tx buffer request pending register (FDCAN_TXBRP) . . . . .2943
60.4.29FDCAN Tx buffer add request register (FDCAN_TXBAR) . . . . .2944
60.4.30FDCAN Tx buffer cancellation request register (FDCAN_TXBCR) . . . . .2945
60.4.31FDCAN Tx buffer transmission occurred register (FDCAN_TXBTO) . . . . .2945
60.4.32FDCAN Tx buffer cancellation finished register (FDCAN_TXBCF) . . . . .2946
60.4.33FDCAN Tx buffer transmission interrupt enable register
(FDCAN_TXBTIE) . . . . .
2946
60.4.34FDCAN Tx buffer cancellation finished interrupt enable register
(FDCAN_TXBCIE) . . . . .
2947
60.4.35FDCAN Tx event FIFO status register (FDCAN_TXEFS) . . . . .2947
60.4.36FDCAN Tx event FIFO acknowledge register (FDCAN_TXEFA) . . . . .2948
60.4.37FDCAN CFG clock divider register (FDCAN_CKDIV) . . . . .2948
60.4.38FDCAN register map . . . . .2949

Chapters