RM0492-STM32H503

This reference manual targets application developers. It provides complete information on how to use the STM32H503xx microcontrollers memory and peripherals.

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

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

STM32H5 series microcontrollers include ST state-of-the-art patented technology.

Contents

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

Chapters