14. System configuration controller (SYSCFG) 1085

14.1I/O compensation cell .....1085
14.2Ethernet clock source .....1087
14.3SYSCFG registers .....1088
14.3.1SYSCFG boot pins control register (SYSCFG_BOOTR) .....1088
14.3.2SYSCFG peripheral mode configuration set register
(SYSCFG_PMCSETR) .....
1089
14.3.3SYSCFG peripheral mode configuration clear register
(SYSCFG_PMCCLRR) .....
1091
14.3.4SYSCFG IO control set register (SYSCFG_IOCTRLSETR) .....1094
14.3.5SYSCFG IO control clear register (SYSCFG_IOCTRLCLRR) ....1095
14.3.6SYSCFG interconnect control register (SYSCFG_ICNR) .....1097
14.3.7SYSCFG compensation cell control register (SYSCFG_CMPCR) ..1099
14.3.8SYSCFG compensation cell enable set register
(SYSCFG_CMPENSETR) .....
1100
14.3.9SYSCFG compensation cell enable clear register
(SYSCFG_CMPENCLRR) .....
1101
14.3.10SYSCFG control timer break register (SYSCFG_CBR) .....1102
14.3.11SYSCFG version register (SYSCFG_VERR) .....1103
14.3.12SYSCFG identification register (SYSCFG_IPIDR) .....1103
14.3.13SYSCFG size identification register (SYSCFG_SIDR) .....1104
14.3.14SYSCFG interface register map .....1105
15Extended TrustZone® protection controller (ETZPC) .....1107
15.1ETZPC introduction .....1107
15.2ETZPC features .....1107
15.3Extended TrustZone architecture and ETZPC .....1107
15.4ETZPC functional description .....1109
15.5STM32MP153 security architecture .....1109
15.6STM32MP153 MCU resource isolation .....1112
15.7ETZPC registers .....1119
15.7.1ETZPC ROM secure size definition (ETZPC_TZMA0_SIZE) .....1120
15.7.2ETZPC RAM secure size definition (ETZPC_TZMA1_SIZE) .....1121
15.7.3ETZPC securable peripheral control register x
(ETZPC_DECPROTx) .....
1122
15.7.4ETZPC decprot lock x register (ETZPC_DECPROT_LOCKx) ....1123
15.7.5ETZPC HW configuration register (ETZPC_HWCFGR) .....1127
15.7.6ETZPC version register (ETZPC_VERR) .....1127
15.7.7ETZPC identification register (ETZPC_IDR) .....1128
15.7.8ETZPC size identification register (ETZPC_SIDR) .....1128
15.7.9ETZPC register map .....1129
16Block interconnects .....1131
16.1Peripheral interconnects .....1131
16.1.1Introduction .....1131
16.1.2Connection overview .....1131
16.2MDMA .....1150
17MDMA controller (MDMA) .....1152
17.1MDMA introduction .....1152
17.2MDMA main features .....1152
17.3MDMA functional description .....1154
17.3.1MDMA block diagram .....1154
17.3.2MDMA internal signals .....1154
17.3.3MDMA overview .....1154
17.3.4MDMA channel .....1156
17.3.5Source, destination and transfer modes .....1156
17.3.6Pointer update .....1156
17.3.7MDMA buffer transfer .....1157
17.3.8Request arbitration .....1158
17.3.9FIFO .....1158
17.3.10Block transfer .....1158
17.3.11Block repeat mode .....1159
17.3.12Linked-list mode .....1159
17.3.13MDMA transfer completion .....1159
17.3.14MDMA transfer suspension .....1159
17.3.15Error management .....1160
17.4MDMA interrupts .....1160
17.5MDMA registers .....1161
17.5.1MDMA global interrupt status register (MDMA_GISR0) .....1161
17.5.2MDMA secure global interrupt status register (MDMA_SGISR0) .....1161
17.5.3MDMA channel x interrupt status register (MDMA_CxISR) .....1162
17.5.4MDMA channel x interrupt flag clear register (MDMA_CxIFCR) .....1163
17.5.5MDMA channel x error status register (MDMA_CxESR) .....1164
17.5.6MDMA channel x control register (MDMA_CxCR) . . . . .1165
17.5.7MDMA channel x transfer configuration register (MDMA_CxTCR) . .1167
17.5.8MDMA channel x block number of data register (MDMA_CxBNDTR) . . . . .1170
17.5.9MDMA channel x source address register (MDMA_CxSAR) . . . . .1171
17.5.10MDMA channel x destination address register (MDMA_CxDAR) . . . . .1172
17.5.11MDMA channel x block repeat address update register
(MDMA_CxBRUR) . . . . .
1172
17.5.12MDMA channel x link address register (MDMA_CxLAR) . . . . .1173
17.5.13MDMA channel x trigger and bus selection register
(MDMA_CxTBR) . . . . .
1174
17.5.14MDMA channel x mask address register (MDMA_CxMAR) . . . . .1174
17.5.15MDMA channel x mask data register (MDMA_CxMDR) . . . . .1175
17.5.16MDMA register map . . . . .1175
18Direct memory access controller (DMA) . . . . .1177
18.1DMA introduction . . . . .1177
18.2DMA main features . . . . .1177
18.3DMA functional description . . . . .1179
18.3.1DMA block diagram . . . . .1179
18.3.2DMA overview . . . . .1179
18.3.3DMA transactions . . . . .1180
18.3.4DMA request mapping . . . . .1180
18.3.5Arbiter . . . . .1180
18.3.6DMA streams . . . . .1181
18.3.7Source, destination and transfer modes . . . . .1181
18.3.8Pointer incrementation . . . . .1184
18.3.9Circular mode . . . . .1185
18.3.10Double-buffer mode . . . . .1185
18.3.11Programmable data width, packing/unpacking, endianness . . . . .1186
18.3.12Single and burst transfers . . . . .1187
18.3.13FIFO . . . . .1188
18.3.14DMA transfer completion . . . . .1191
18.3.15DMA transfer suspension . . . . .1192
18.3.16Flow controller . . . . .1193
18.3.17Summary of the possible DMA configurations . . . . .1194
18.3.18Stream configuration procedure . . . . .1194
18.3.19Error management . . . . .1195
18.4DMA interrupts1196
18.5DMA registers1197
18.5.1DMA low interrupt status register (DMA_LISR)1197
18.5.2DMA high interrupt status register (DMA_HISR)1198
18.5.3DMA low interrupt flag clear register (DMA_LIFCR)1199
18.5.4DMA high interrupt flag clear register (DMA_HIFCR)1199
18.5.5DMA stream x configuration register (DMA_SxCR)1200
18.5.6DMA stream x number of data register (DMA_SxNDTR)1203
18.5.7DMA stream x peripheral address register (DMA_SxPAR)1203
18.5.8DMA stream x memory 0 address register (DMA_SxM0AR)1204
18.5.9DMA stream x memory 1 address register (DMA_SxM1AR)1204
18.5.10DMA stream x FIFO control register (DMA_SxFCR)1205
18.5.11DMA hardware configuration 2 register (DMA_HWCFGR2)1206
18.5.12DMA hardware configuration 1 register (DMA_HWCFGR1)1207
18.5.13DMA version register (DMA_VERR)1208
18.5.14DMA identification register (DMA_IPDR)1208
18.5.15DMA size identification register (DMA_SIDR)1209
18.5.16DMA register map1209
19DMA request multiplexer (DMAMUX)1214
19.1Introduction1214
19.2DMAMUX main features1215
19.3DMAMUX implementation1215
19.3.1DMAMUX instantiation1215
19.3.2DMAMUX mapping1215
19.4DMAMUX functional description1218
19.4.1DMAMUX block diagram1218
19.4.2DMAMUX signals1219
19.4.3DMAMUX channels1219
19.4.4DMAMUX request line multiplexer1219
19.4.5DMAMUX request generator1222
19.5DMAMUX interrupts1223
19.6DMAMUX registers1224
19.6.1DMAMUX request line multiplexer channel x configuration register (DMAMUX_CxCR)1224
19.6.2DMAMUX request line multiplexer interrupt channel status register (DMAMUX_CSR) .....1225
19.6.3DMAMUX request line multiplexer interrupt clear flag register (DMAMUX_CFR) .....1225
19.6.4DMAMUX request generator channel x configuration register (DMAMUX_RGxCR) .....1226
19.6.5DMAMUX request generator interrupt status register (DMAMUX_RGSR) .....1227
19.6.6DMAMUX request generator interrupt clear flag register (DMAMUX_RGCFR) .....1227
19.6.7DMAMUX size identification register (DMAMUX_SIDR) .....1228
19.6.8DMAMUX IP identification register (DMAMUX_IPIDR) .....1228
19.6.9DMAMUX version register (DMAMUX_VERR) .....1228
19.6.10DMAMUX hardware configuration 1 register (DMAMUX_HWCFGR1) .....1229
19.6.11DMAMUX hardware configuration 2 register (DMAMUX_HWCFGR2) .....1229
19.6.12DMAMUX register map .....1230
20Interrupt list .....1233
20.1NVIC interrupts .....1233
20.2GIC Interrupts .....1238
20.3EXTI events .....1245
21Nested Vectored Interrupt Controllers (NVIC) .....1249
21.1NVIC features .....1249
21.2SysTick calibration value register .....1249
21.3Interrupt and exception vectors .....1249
22Global interrupt controller (GIC) .....1250
22.1Introduction .....1250
22.2GIC main features .....1250
22.3GIC functional description .....1250
22.4Interrupt sources .....1251
22.4.1Software generated interrupts (SGI) .....1251
22.4.2Private peripheral interrupts (PPI) .....1252
22.4.3Shared peripheral interrupts (SPI) .....1253
22.4.4Interrupt priority formats .....1253
22.5GIC distributor (GICD) . . . . .1253
22.5.1GICD control register (GICD_CTLR) . . . . .1253
22.5.2GICD control non-secure access register (GICD_CTLRNS) . . . . .1254
22.5.3GICD interrupt controller type register (GICD_TYPER) . . . . .1254
22.5.4GICD implementer identification register (GICD_IIDR) . . . . .1255
22.5.5GICD interrupt group register x (GICD_IGROUPRx) . . . . .1255
22.5.6GICD interrupt set-enable register (GICD_ISENABLER0) . . . . .1256
22.5.7GICD interrupt set-enable register x (GICD_ISENABLERx) . . . . .1256
22.5.8GICD interrupt clear-enable register (GICD_ICENABLER0) . . . . .1256
22.5.9GICD interrupt clear-enable register x (GICD_ICENABLERx) . . . . .1257
22.5.10GICD interrupt set-pending register x (GICD_ISPENDRx) . . . . .1257
22.5.11GICD interrupt clear-pending register x (GICD_ICPENDRx) . . . . .1257
22.5.12GICD interrupt set-active register x (GICD_ISACTIVERx) . . . . .1258
22.5.13GICD interrupt clear-active register x (GICD_ICACTIVERx) . . . . .1258
22.5.14GICD interrupt priority register x (GICD_IPRIORITYRx) . . . . .1258
22.5.15GICD interrupt processor target register x (GICD_ITARGETSRx) . . . . .1259
22.5.16GICD interrupt processor target register x (GICD_ITARGETSRx) . . . . .1260
22.5.17GICD interrupt configuration register (GICD_ICFGR0) . . . . .1260
22.5.18GICD interrupt configuration register (GICD_ICFGR1) . . . . .1261
22.5.19GICD interrupt configuration register x (GICD_ICFGRx) . . . . .1262
22.5.20GICD private peripheral interrupt status register (GICD_PPISR) . . . . .1263
22.5.21GICD shared peripheral interrupt register x (GICD_SPISRx) . . . . .1264
22.5.22GICD software generated interrupt register (GICD_SGIR) . . . . .1264
22.5.23GICD SGI clear-pending register x (GICD_CPENDSGIRx) . . . . .1265
22.5.24GICD SGI set-pending register x (GICD_SPENDSGIRx) . . . . .1267
22.5.25GICD peripheral ID4 register (GICD_PIDR4) . . . . .1268
22.5.26GICD peripheral ID5 to ID7 register x (GICD_PIDRx) . . . . .1268
22.5.27GICD peripheral ID0 register (GICD_PIDR0) . . . . .1269
22.5.28GICD peripheral ID1 register (GICD_PIDR1) . . . . .1269
22.5.29GICD peripheral ID2 register (GICD_PIDR2) . . . . .1269
22.5.30GICD peripheral ID3 register (GICD_PIDR3) . . . . .1270
22.5.31GICD component ID0 register (GICD_CIDR0) . . . . .1270
22.5.32GICD component ID1 register (GICD_CIDR1) . . . . .1270
22.5.33GICD component ID2 register (GICD_CIDR2) . . . . .1271
22.5.34GICD component ID3 register (GICD_CIDR3) . . . . .1271
22.5.35GICD register map . . . . .1271
22.6GIC CPU Interface (GICC) . . . . .1275
22.6.1GICC control register (GICC_CTLR)1275
22.6.2GICC control non-secure access register (GICC_CTLRNS)1276
22.6.3GICC input priority mask register (GICC_PMR)1277
22.6.4GICC binary point register (GICC_BPR)1277
22.6.5GICC binary point non-secure access register (GICC_BPRNS)1278
22.6.6GICC interrupt acknowledge register (GICC_IAR)1278
22.6.7GICC end of interrupt register (GICC_EOIR)1279
22.6.8GICC running priority register (GICC_RPR)1279
22.6.9GICC highest priority pending interrupt register (GICC_HPPIR)1280
22.6.10GICC aliased binary point register (GICC_ABPR)1280
22.6.11GICC aliased interrupt acknowledge register (GICC_AIAR)1281
22.6.12GICC aliased end of interrupt register (GICC_AEOIR)1281
22.6.13GICC aliased highest priority pending interrupt register (GICC_AHPPIR)1282
22.6.14GICC active priority register (GICC_APR0)1282
22.6.15GICC non-secure active priority register (GICC_NSAPR0)1283
22.6.16GICC interface identification register (GICC_IIDR)1283
22.6.17GICC deactivate interrupt register (GICC_DIR)1283
22.6.18GICC register map1284
22.7GIC virtual interface control, common (GICH)1286
22.7.1GICH hypervisor control register (GICH_HCR)1286
22.7.2GICH VGIC type register (GICH_VTR)1287
22.7.3GICH virtual machine control register (GICH_VMCR)1287
22.7.4GICH maintenance interrupt status register (GICH_MISR)1288
22.7.5GICH end of interrupt status register (GICH_EISR0)1289
22.7.6GICH empty list status register (GICH_ELSR0)1289
22.7.7GICH active priority register (GICH_APR0)1290
22.7.8GICH list register x (GICH_LRx)1290
22.7.9GICH register map1291
22.8GIC virtual CPU interface (GICV)1292
22.8.1GICV virtual machine control register (GICV_CTLR)1292
22.8.2GICV VM priority mask register (GICV_PMR)1293
22.8.3GICV VM binary point register (GICV_BPR)1294
22.8.4GICV VM interrupt acknowledge register (GICV_IAR)1294
22.8.5GICV VM end of interrupt register (GICV_EOIR)1294
22.8.6GICV VM running priority register (GICV_RPR)1295
22.8.7GICV VM highest priority pending interrupt register (GICV_HPPIR)1295
22.8.8GICV VM aliased binary point register (GICV_ABPR) . . . . .1296
22.8.9GICV VM aliased interrupt register (GICV_AIAR) . . . . .1296
22.8.10GICV VM aliased end of interrupt register (GICV_AEOIR) . . . . .1297
22.8.11GICV VM aliased highest priority pending interrupt register
(GICV_AHPPIR) . . . . .
1297
22.8.12GICV VM active priority register (GICV_APR0) . . . . .1298
22.8.13GICV VM CPU interface identification register (GICV_IIDR) . . . . .1298
22.8.14GICV VM deactivate interrupt register (GICV_DIR) . . . . .1298
22.8.15GICV register map . . . . .1299
23Extended interrupt and event controller (EXTI) . . . . .1301
23.1EXTI main features . . . . .1301
23.2EXTI block diagram . . . . .1302
23.2.1EXTI connections between peripherals and CPU . . . . .1303
23.3EXTI functional description . . . . .1304
23.3.1EXTI configurable event input wakeup . . . . .1305
23.3.2EXTI direct event input wakeup . . . . .1306
23.3.3EXTI mux selection . . . . .1306
23.4EXTI functional behavior . . . . .1307
23.5EXTI TrustZone security . . . . .1308
23.6EXTI registers . . . . .1310
23.6.1EXTI rising trigger selection register (EXTI_RTSR1) . . . . .1310
23.6.2EXTI falling trigger selection register (EXTI_FTSR1) . . . . .1311
23.6.3EXTI software interrupt event register (EXTI_SWIER1) . . . . .1311
23.6.4EXTI rising edge pending register (EXTI_RPR1) . . . . .1312
23.6.5EXTI falling edge pending register (EXTI_FPR1) . . . . .1312
23.6.6EXTI TrustZone enable register (EXTI_TZENR1) . . . . .1313
23.6.7EXTI rising trigger selection register (EXTI_RTSR2) . . . . .1313
23.6.8EXTI falling trigger selection register (EXTI_FTSR2) . . . . .1314
23.6.9EXTI software interrupt event register (EXTI_SWIER2) . . . . .1314
23.6.10EXTI rising edge pending register (EXTI_RPR2) . . . . .1314
23.6.11EXTI falling edge pending register (EXTI_FPR2) . . . . .1315
23.6.12EXTI TrustZone enable register (EXTI_TZENR2) . . . . .1315
23.6.13EXTI rising trigger selection register (EXTI_RTSR3) . . . . .1316
23.6.14EXTI falling trigger selection register (EXTI_FTSR3) . . . . .1317
23.6.15EXTI software interrupt event register (EXTI_SWIER3) . . . . .1318
23.6.16EXTI rising edge pending register (EXTI_RPR3) . . . . .1320
23.6.17EXTI falling edge pending register (EXTI_FPR3)1322
23.6.18EXTI TrustZone enable register (EXTI_TZENR3)1323
23.6.19EXTI external interrupt selection register 1 (EXTI_EXTICR1)1323
23.6.20EXTI external interrupt selection register 2 (EXTI_EXTICR2)1325
23.6.21EXTI external interrupt selection register 3 (EXTI_EXTICR3)1327
23.6.22EXTI external interrupt selection register 4 (EXTI_EXTICR4)1329
23.6.23EXTI CPU wakeup with interrupt mask register (EXTI_C1IMR1)1331
23.6.24EXTI CPU2 wakeup with interrupt mask register (EXTI_C2IMR1)1332
23.6.25EXTI CPU2 wakeup with event mask register (EXTI_C2EMR1)1332
23.6.26EXTI CPU wakeup with interrupt mask register (EXTI_C1IMR2)1333
23.6.27EXTI CPU2 wakeup with interrupt mask register (EXTI_C2IMR2)1334
23.6.28EXTI CPU2 wakeup with event mask register (EXTI_C2EMR2)1334
23.6.29EXTI CPU wakeup with interrupt mask register (EXTI_C1IMR3)1334
23.6.30EXTI CPU2 wakeup with interrupt mask register (EXTI_C2IMR3)1335
23.6.31EXTI CPU2 wakeup with event mask register (EXTI_C2EMR3)1335
23.6.32EXTI hardware configuration register x (EXTI_HWCFGRx)1336
23.6.33EXTI hardware configuration register x (EXTI_HWCFGRx)1336
23.6.34EXTI hardware configuration register x (EXTI_HWCFGRx)1337
23.6.35EXTI hardware configuration register x (EXTI_HWCFGRx)1337
23.6.36EXTI hardware configuration register 1 (EXTI_HWCFGR1)1337
23.6.37EXTI IP version register (EXTI_VERR)1338
23.6.38EXTI identification register (EXTI_IPIDR)1338
23.6.39EXTI size ID register (EXTI_SIDR)1339
23.6.40EXTI register map1340
24Cyclic redundancy check calculation unit (CRC)1344
24.1Introduction1344
24.2CRC main features1344
24.3CRC functional description1345
24.3.1CRC block diagram1345
24.3.2CRC internal signals1345
24.3.3CRC operation1345
24.4CRC registers1347
24.4.1CRC data register (CRC_DR)1347
24.4.2CRC independent data register (CRC_IDR)1347
24.4.3CRC control register (CRC_CR)1348
24.4.4CRC initial value (CRC_INIT)1349
24.4.5CRC polynomial (CRC_POL) .....1349
24.4.6CRC hardware configuration register (CRC_HWCFGR) .....1349
24.4.7CRC version register (CRC_VERR) .....1350
24.4.8CRC identification register (CRC_IPIDR) .....1350
24.4.9CRC size identification register (CRC_SIDR) .....1351
24.4.10CRC register map .....1351
25Flexible memory controller (FMC) .....1353
25.1FMC main features .....1353
25.2FMC implementation .....1354
25.3FMC block diagram .....1354
25.4FMC internal signals .....1355
25.5AHB interface .....1355
25.6AXI interface .....1356
25.6.1Supported memories and transactions .....1356
25.7External device address mapping .....1357
25.7.1NOR/PSRAM address mapping .....1358
25.7.2NAND flash memory address mapping .....1358
25.8NOR flash/PSRAM controller .....1360
25.8.1External memory interface signals .....1361
25.8.2Supported memories and transactions .....1363
25.8.3General timing rules .....1365
25.8.4NOR flash/PSRAM controller asynchronous transactions .....1365
25.8.5Synchronous transactions .....1385
25.8.6NOR/PSRAM controller registers .....1391
25.9NAND flash controller .....1403
25.9.1External memory interface signals .....1404
25.9.2NAND flash supported memories and transactions .....1405
25.9.3Timing diagrams for NAND flash memory .....1406
25.9.4NAND flash operations .....1407
25.9.5NAND flash prewait function .....1408
25.9.6NAND ECC controller .....1408
25.9.7FMC command sequencer .....1411
25.9.8NAND flash controller interrupt .....1418
25.9.9NAND flash controller registers .....1419
25.10FMC register map .....1443
26Quad-SPI interface (QUADSPI)1447
26.1Introduction1447
26.2QUADSPI main features1447
26.3QUADSPI functional description1447
26.3.1QUADSPI block diagram1447
26.3.2QUADSPI pins and internal signals1448
26.3.3QUADSPI command sequence1449
26.3.4QUADSPI signal interface protocol modes1451
26.3.5QUADSPI indirect mode1453
26.3.6QUADSPI automatic status-polling mode1455
26.3.7QUADSPI memory-mapped mode1455
26.3.8QUADSPI free-running clock mode1456
26.3.9QUADSPI flash memory configuration1456
26.3.10QUADSPI delayed data sampling1457
26.3.11QUADSPI configuration1457
26.3.12QUADSPI use1458
26.3.13Sending the instruction only once1459
26.3.14QUADSPI error management1460
26.3.15QUADSPI busy bit and abort functionality1460
26.3.16NCS behavior1460
26.4QUADSPI interrupts1462
26.5QUADSPI registers1463
26.5.1QUADSPI control register (QUADSPI_CR)1463
26.5.2QUADSPI device configuration register (QUADSPI_DCR)1466
26.5.3QUADSPI status register (QUADSPI_SR)1467
26.5.4QUADSPI flag clear register (QUADSPI_FCR)1468
26.5.5QUADSPI data length register (QUADSPI_DLR)1468
26.5.6QUADSPI communication configuration register (QUADSPI_CCR)1469
26.5.7QUADSPI address register (QUADSPI_AR)1471
26.5.8QUADSPI alternate-byte register (QUADSPI_ABR)1471
26.5.9QUADSPI data register (QUADSPI_DR)1472
26.5.10QUADSPI polling status mask register (QUADSPI_PSMKR)1472
26.5.11QUADSPI polling status match register (QUADSPI_PSMAR)1473
26.5.12QUADSPI polling interval register (QUADSPI_PIR)1473
26.5.13QUADSPI low-power timeout register (QUADSPI_LPTR)1474
26.5.14QUADSPI hardware configuration register (QUADSPI_HWCFGR)1474
26.5.15QUADSPI version register (QUADSPI_VERR) .....1474
26.5.16QUADSPI identification register (QUADSPI_IPIDR) .....1475
26.5.17QUADSPI size identification register (QUADSPI_SIDR) .....1475
26.5.18QUADSPI register map .....1476
27Delay block (DLYB) .....1478
27.1Introduction .....1478
27.2DLYB main features .....1478
27.3DLYB functional description .....1478
27.3.1DLYB diagram .....1478
27.3.2DLYB pins and internal signals .....1479
27.3.3General description .....1479
27.3.4Delay line length configuration procedure .....1480
27.3.5Output clock phase configuration procedure .....1480
27.4DLYB registers .....1481
27.4.1DLYB control register (DLYB_CR) .....1481
27.4.2DLYB configuration register (DLYB_CFGR) .....1482
27.4.3DLYB register map .....1482
28Analog-to-digital converters (ADC) .....1483
28.1Introduction .....1483
28.2ADC main features .....1484
28.3ADC implementation .....1485
28.4ADC functional description .....1486
28.4.1ADC block diagram .....1486
28.4.2ADC pins and internal signals .....1487
28.4.3ADC clocks .....1488
28.4.4ADC1/2 connectivity .....1490
28.4.5Slave AHB interface .....1492
28.4.6ADC deep-power-down mode (DEEPPWD) and ADC voltage regulator (ADVREGEN) .....1492
28.4.7Single-ended and differential input channels .....1493
28.4.8Calibration (ADCAL, ADCALDIF, ADCALLIN, ADC_CALFACT) ....1493
28.4.9ADC on-off control (ADEN, ADDIS, ADRDY) .....1499
28.4.10Constraints when writing the ADC control bits .....1500
28.4.11Channel selection (SQRx, JSQRx) .....1501
28.4.12Channel preselection register (ADC_PCSEL) .....1501
28.4.13Channel-wise programmable sampling time (SMPR1, SMPR2) . . . .1502
28.4.14Single conversion mode (CONT=0) . . . . .1503
28.4.15Continuous conversion mode (CONT=1) . . . . .1503
28.4.16Starting conversions (ADSTART, JADSTART) . . . . .1504
28.4.17Timing . . . . .1505
28.4.18Stopping an ongoing conversion (ADSTP, JADSTP) . . . . .1505
28.4.19Conversion on external trigger and trigger polarity (EXTSEL, EXTEN,
JEXTSEL, JEXTEN) . . . . .
1507
28.4.20Injected channel management . . . . .1510
28.4.21Discontinuous mode (DISCEN, DISCNUM, JDISCEN) . . . . .1512
28.4.22Queue of context for injected conversions . . . . .1513
28.4.23Programmable resolution (RES) - fast conversion mode . . . . .1521
28.4.24End of conversion, end of sampling phase (EOC, JEOC, EOSMP) .1521
28.4.25End of conversion sequence (EOS, JEOS) . . . . .1521
28.4.26Timing diagrams example (single/continuous modes,
hardware/software triggers) . . . . .
1522
28.4.27Data management . . . . .1523
28.4.28Managing conversions using the DFSDM . . . . .1531
28.4.29Dynamic low-power features . . . . .1531
28.4.30Analog window watchdog (AWD1EN, JAWD1EN, AWD1SGL,
AWD1CH, AWD2CH, AWD3CH, AWD_HTRy, AWD_LTRy, AWDy) .
1536
28.4.31Oversampler . . . . .1539
28.4.32Dual ADC modes . . . . .1545
28.4.33Temperature sensor . . . . .1560
28.4.34VBAT supply monitoring . . . . .1561
28.4.35Monitoring the internal voltage reference . . . . .1562
28.4.36VDDCORE supply voltage monitoring . . . . .1563
28.5ADC interrupts . . . . .1564
28.6ADC registers (for each ADC) . . . . .1566
28.6.1ADC interrupt and status register (ADC_ISR) . . . . .1566
28.6.2ADC interrupt enable register (ADC_IER) . . . . .1569
28.6.3ADC control register (ADC_CR) . . . . .1571
28.6.4ADC configuration register (ADC_CFGR) . . . . .1576
28.6.5ADC configuration register 2 (ADC_CFGR2) . . . . .1580
28.6.6ADC sample time register 1 (ADC_SMPR1) . . . . .1582
28.6.7ADC sample time register 2 (ADC_SMPR2) . . . . .1583
28.6.8ADC channel preselection register (ADC_PCSEL) . . . . .1584
28.6.9ADC watchdog threshold register 1 (ADC_LTR1) . . . . .1584
28.6.10ADC watchdog threshold register 1 (ADC_HTR1)1585
28.6.11ADC regular sequence register 1 (ADC_SQR1)1586
28.6.12ADC regular sequence register 2 (ADC_SQR2)1587
28.6.13ADC regular sequence register 3 (ADC_SQR3)1588
28.6.14ADC regular sequence register 4 (ADC_SQR4)1589
28.6.15ADC regular Data Register (ADC_DR)1590
28.6.16ADC injected sequence register (ADC_JSQR)1591
28.6.17ADC injected channel y offset register (ADC_OFRy)1593
28.6.18ADC injected channel y data register (ADC_JDRy)1594
28.6.19ADC analog watchdog 2 configuration register
(ADC_AWD2CR)
1594
28.6.20ADC analog watchdog 3 configuration register
(ADC_AWD3CR)
1595
28.6.21ADC watchdog lower threshold register 2 (ADC_LTR2)1595
28.6.22ADC watchdog higher threshold register 2 (ADC_HTR2)1596
28.6.23ADC watchdog lower threshold register 3 (ADC_LTR3)1596
28.6.24ADC watchdog higher threshold register 3 (ADC_HTR3)1597
28.6.25ADC differential mode selection register (ADC_DIFSEL)1597
28.6.26ADC calibration factors register (ADC_CALFACT)1598
28.6.27ADC calibration factor register 2 (ADC_CALFACT2)1598
28.6.28ADC2 option register (ADC2_OR)1599
28.7ADC common registers1599
28.7.1ADC common status register (ADC_CSR)1599
28.7.2ADC common control register (ADC_CCR)1602
28.7.3ADC common regular data register for dual mode
(ADC_CDR)
1605
28.7.4ADC common regular data register for 32-bit dual mode
(ADC_CDR2)
1605
28.7.5ADC hardware configuration register (ADC_HWCFGR0)1606
28.7.6ADC version register (ADC_VERR)1606
28.7.7ADC identification register (ADC_IPIDR)1606
28.7.8ADC size identification register (ADC_SIDR)1607
28.8ADC register map1607
29Digital temperature sensor (DTS)1612
29.1Introduction1612
29.2DTS main features1612
29.3DTS functional description1613
29.3.1DTS block diagram1613
29.3.2DTS internal signals1613
29.3.3DTS block operation1614
29.3.4Operating modes1614
29.3.5Calibration1614
29.3.6Prescaler1614
29.3.7Temperature measurement principles1615
29.3.8Sampling time1616
29.3.9Quick measurement mode1616
29.3.10Trigger input1617
29.3.11On-off control and ready flag1617
29.3.12Temperature measurement sequence1618
29.4DTS low-power modes1619
29.5DTS interrupts1619
29.5.1Temperature window comparator1619
29.5.2Synchronous interrupt1619
29.5.3Asynchronous wakeup1619
29.6DTS registers1620
29.6.1Temperature sensor configuration register 1 (DTS_CFGR1)1620
29.6.2Temperature sensor T0 value register 1 (DTS_T0VALR1)1622
29.6.3Temperature sensor ramp value register (DTS_RAMPVALR)1622
29.6.4Temperature sensor interrupt threshold register 1 (DTS_ITR1)1623
29.6.5Temperature sensor data register (DTS_DR)1623
29.6.6Temperature sensor status register (DTS_SR)1624
29.6.7Temperature sensor interrupt enable register (DTS_ITENR)1625
29.6.8Temperature sensor clear interrupt flag register (DTS_ICIFR)1626
29.6.9Temperature sensor option register (DTS_OR)1627
29.6.10DTS register map1628
30Digital-to-analog converter (DAC)1629
30.1Introduction1629
30.2DAC main features1629
30.3DAC implementation1630
30.4DAC functional description1631
30.4.1DAC block diagram1631
30.4.2DAC pins and internal signals1632
30.4.3DAC channel enable .....1633
30.4.4DAC data format .....1633
30.4.5DAC conversion .....1635
30.4.6DAC output voltage .....1635
30.4.7DAC trigger selection .....1636
30.4.8DMA requests .....1636
30.4.9Noise generation .....1637
30.4.10Triangle-wave generation .....1638
30.4.11DAC channel modes .....1639
30.4.12DAC channel buffer calibration .....1642
30.4.13DAC channel conversion modes .....1643
30.4.14Dual DAC channel conversion modes (if dual channels are available) .....1644
30.5DAC in low-power modes .....1648
30.6DAC interrupts .....1649
30.7DAC registers .....1649
30.7.1DAC control register (DAC_CR) .....1649
30.7.2DAC software trigger register (DAC_SWTRGR) .....1653
30.7.3DAC channel1 12-bit right-aligned data holding register (DAC_DHR12R1) .....1653
30.7.4DAC channel1 12-bit left aligned data holding register (DAC_DHR12L1) .....1654
30.7.5DAC channel1 8-bit right aligned data holding register (DAC_DHR8R1) .....1654
30.7.6DAC channel2 12-bit right aligned data holding register (DAC_DHR12R2) .....1655
30.7.7DAC channel2 12-bit left aligned data holding register (DAC_DHR12L2) .....1655
30.7.8DAC channel2 8-bit right-aligned data holding register (DAC_DHR8R2) .....1656
30.7.9Dual DAC 12-bit right-aligned data holding register (DAC_DHR12RD) .....1656
30.7.10Dual DAC 12-bit left aligned data holding register (DAC_DHR12LD) .....1657
30.7.11Dual DAC 8-bit right aligned data holding register (DAC_DHR8RD) .....1657
30.7.12DAC channel1 data output register (DAC_DOR1) .....1658
30.7.13DAC channel2 data output register (DAC_DOR2) .....1658
30.7.14DAC status register (DAC_SR) .....1658
30.7.15DAC calibration control register (DAC_CCR) .....1660
30.7.16DAC mode control register (DAC_MCR)1660
30.7.17DAC channel1 sample and hold sample time register (DAC_SHSR1)1662
30.7.18DAC channel2 sample and hold sample time register (DAC_SHSR2)1662
30.7.19DAC sample and hold time register (DAC_SHHR)1662
30.7.20DAC sample and hold refresh time register (DAC_SHRR)1663
30.7.21DAC hardware configuration register (DAC_HWCGR0)1664
30.7.22DAC version register (DAC_VERR)1665
30.7.23DAC identification register (DAC_IPIDR)1665
30.7.24DAC size identification register (DAC_SIDR)1665
30.7.25DAC register map1666
31Voltage reference buffer (VREFBUF)1669
31.1Introduction1669
31.2VREFBUF functional description1669
31.3VREFBUF registers1670
31.3.1VREFBUF control and status register (VREFBUF_CSR)1670
31.3.2VREFBUF calibration control register (VREFBUF_CCR)1671
31.3.3VREFBUF register map1671
32Digital filter for sigma delta modulators (DFSDM)1672
32.1Introduction1672
32.2DFSDM main features1673
32.3DFSDM implementation1674
32.4DFSDM functional description1675
32.4.1DFSDM block diagram1675
32.4.2DFSDM pins and internal signals1676
32.4.3DFSDM reset and clocks1677
32.4.4Serial channel transceivers1678
32.4.5Configuring the input serial interface1688
32.4.6Parallel data inputs1688
32.4.7Channel selection1691
32.4.8Digital filter configuration1691
32.4.9Integrator unit1692
32.4.10Analog watchdog1693
32.4.11Short-circuit detector1695
32.4.12Extreme detector .....1696
32.4.13Data unit block .....1696
32.4.14Signed data format .....1697
32.4.15Launching conversions .....1698
32.4.16Continuous and fast continuous modes .....1698
32.4.17Request precedence .....1699
32.4.18Power optimization in run mode .....1700
32.5DFSDM interrupts .....1700
32.6DFSDM DMA transfer .....1702
32.7DFSDM channel y registers (y=0..7) .....1702
32.7.1DFSDM channel y configuration register (DFSDM_CHyCFGR1) ...1702
32.7.2DFSDM channel y configuration register (DFSDM_CHyCFGR2) ...1704
32.7.3DFSDM channel y analog watchdog and short-circuit detector register
(DFSDM_CHyAWSCDR) .....
1705
32.7.4DFSDM channel y watchdog filter data register
(DFSDM_CHyWDATR) .....
1706
32.7.5DFSDM channel y data input register (DFSDM_CHyDATINR) ....1706
32.7.6DFSDM channel y delay register (DFSDM_CHyDLYR) .....1707
32.8DFSDM filter x module registers (x=0..5) .....1708
32.8.1DFSDM filter x control register 1 (DFSDM_FLTxCR1) .....1708
32.8.2DFSDM filter x control register 2 (DFSDM_FLTxCR2) .....1711
32.8.3DFSDM filter x interrupt and status register (DFSDM_FLTxISR) ....1712
32.8.4DFSDM filter x interrupt flag clear register (DFSDM_FLTxICR) ....1714
32.8.5DFSDM filter x injected channel group selection register
(DFSDM_FLTxJCHGR) .....
1715
32.8.6DFSDM filter x control register (DFSDM_FLTxFCR) .....1715
32.8.7DFSDM filter x data register for injected group
(DFSDM_FLTxJDATAR) .....
1716
32.8.8DFSDM filter x data register for the regular channel
(DFSDM_FLTxRDATAR) .....
1717
32.8.9DFSDM filter x analog watchdog high threshold register
(DFSDM_FLTxAWHTR) .....
1718
32.8.10DFSDM filter x analog watchdog low threshold register
(DFSDM_FLTxAWLTR) .....
1718
32.8.11DFSDM filter x analog watchdog status register
(DFSDM_FLTxAWSR) .....
1719
32.8.12DFSDM filter x analog watchdog clear flag register
(DFSDM_FLTxAWCFR) .....
1720
32.8.13DFSDM filter x extremes detector maximum register (DFSDM_FLTxEXMAX) . . . . .1720
32.8.14DFSDM filter x extremes detector minimum register (DFSDM_FLTxEXMIN) . . . . .1721
32.8.15DFSDM filter x conversion timer register (DFSDM_FLTxCNVTIMR) .1721
32.9DFSDM version registers . . . . .1723
32.9.1DFSDM hardware configuration register (DFSDM_HWCFGR) . . . . .1723
32.9.2DFSDM version register (DFSDM_VERR) . . . . .1723
32.9.3DFSDM identification register (DFSDM_IPIDR) . . . . .1724
32.9.4DFSDM size identification register (DFSDM_SIDR) . . . . .1724
32.9.5DFSDM register map . . . . .1725
33Digital camera interface (DCMI) . . . . .1738
33.1Introduction . . . . .1738
33.2DCMI main features . . . . .1738
33.3DCMI functional description . . . . .1738
33.3.1DCMI block diagram . . . . .1739
33.3.2DCMI pins and internal signals . . . . .1739
33.3.3DCMI clocks . . . . .1740
33.3.4DCMI DMA interface . . . . .1740
33.3.5DCMI physical interface . . . . .1740
33.3.6DCMI synchronization . . . . .1742
33.3.7DCMI capture modes . . . . .1744
33.3.8DCMI crop feature . . . . .1745
33.3.9DCMI JPEG format . . . . .1746
33.3.10DCMI FIFO . . . . .1746
33.3.11DCMI data format description . . . . .1747
33.4DCMI interrupts . . . . .1749
33.5DCMI registers . . . . .1749
33.5.1DCMI control register (DCMI_CR) . . . . .1749
33.5.2DCMI status register (DCMI_SR) . . . . .1752
33.5.3DCMI raw interrupt status register (DCMI_RIS) . . . . .1752
33.5.4DCMI interrupt enable register (DCMI_IER) . . . . .1753
33.5.5DCMI masked interrupt status register (DCMI_MIS) . . . . .1754
33.5.6DCMI interrupt clear register (DCMI_ICR) . . . . .1755
33.5.7DCMI embedded synchronization code register (DCMI_ESCR) . . . . .1756
33.5.8DCMI embedded synchronization unmask register (DCMI_ESUR) .1756
33.5.9DCMI crop window start (DCMI_CWSTRT) .....1757
33.5.10DCMI crop window size (DCMI_CWSIZE) .....1758
33.5.11DCMI data register (DCMI_DR) .....1758
33.5.12DCMI register map .....1759
34LCD-TFT display controller (LTDC) .....1760
34.1Introduction .....1760
34.2LTDC main features .....1760
34.3LTDC functional description .....1761
34.3.1LTDC block diagram .....1761
34.3.2LTDC pins and internal signals .....1761
34.3.3LTDC reset and clocks .....1762
34.4LTDC programmable parameters .....1764
34.4.1LTDC global configuration parameters .....1764
34.4.2Layer programmable parameters .....1766
34.5LTDC interrupts .....1770
34.6LTDC programming procedure .....1771
34.7LTDC registers .....1772
34.7.1LTDC identification register (LTDC_IDR) .....1772
34.7.2LTDC layer count register (LTDC_LCR) .....1772
34.7.3LTDC synchronization size configuration register (LTDC_SSCR) .....1773
34.7.4LTDC back porch configuration register (LTDC_BPCR) .....1773
34.7.5LTDC active width configuration register (LTDC_AWCR) .....1774
34.7.6LTDC total width configuration register (LTDC_TWCR) .....1775
34.7.7LTDC global control register (LTDC_GCR) .....1775
34.7.8LTDC global configuration 1 register (LTDC_GC1R) .....1776
34.7.9LTDC global configuration 2 register (LTDC_GC2R) .....1777
34.7.10LTDC shadow reload configuration register (LTDC_SRCR) .....1778
34.7.11LTDC background color configuration register (LTDC_BCCR) .....1778
34.7.12LTDC interrupt enable register (LTDC_IER) .....1779
34.7.13LTDC interrupt status register (LTDC_ISR) .....1780
34.7.14LTDC interrupt clear register (LTDC_ICR) .....1780
34.7.15LTDC line interrupt position configuration register (LTDC_LIPCR) .....1781
34.7.16LTDC current position status register (LTDC_CPSR) .....1781
34.7.17LTDC current display status register (LTDC_CDSR) .....1782
34.7.18LTDC layer x control register (LTDC_LxCR) .....1782
34.7.19LTDC layer x window horizontal position configuration register
(LTDC_LxWHPCR) .....
1783
34.7.20LTDC layer x window vertical position configuration register
(LTDC_LxWVPCR) .....
1784
34.7.21LTDC layer x color keying configuration register
(LTDC_LxCKCR) .....
1785
34.7.22LTDC layer x pixel format configuration register
(LTDC_LxPFCR) .....
1785
34.7.23LTDC layer x constant alpha configuration register
(LTDC_LxCACR) .....
1786
34.7.24LTDC layer x default color configuration register
(LTDC_LxDCCR) .....
1786
34.7.25LTDC layer x blending factors configuration register
(LTDC_LxBFCR) .....
1787
34.7.26LTDC layer x color frame buffer address register
(LTDC_LxCFBAR) .....
1788
34.7.27LTDC layer x color frame buffer length register
(LTDC_LxCFBLR) .....
1788
34.7.28LTDC layer x color frame buffer line number register
(LTDC_LxCFBLNR) .....
1789
34.7.29LTDC layer x CLUT write register (LTDC_LxCLUTWR) .....1789
34.7.30LTDC register map .....1790
35True random number generator (RNG) .....1794
35.1Introduction .....1794
35.2RNG main features .....1794
35.3RNG functional description .....1795
35.3.1RNG block diagram .....1795
35.3.2RNG internal signals .....1795
35.3.3Random number generation .....1796
35.3.4RNG initialization .....1798
35.3.5RNG operation .....1799
35.3.6RNG clocking .....1800
35.3.7Error management .....1800
35.3.8RNG low-power use .....1801
35.4RNG interrupts .....1801
35.5RNG processing time .....1801
35.6RNG entropy source validation .....1802
35.6.1Introduction .....1802
35.6.2Validation conditions .....1802
35.6.3Data collection .....1802
35.7RNG registers .....1803
35.7.1RNG control register (RNG_CR) .....1803
35.7.2RNG status register (RNG_SR) .....1803
35.7.3RNG data register (RNG_DR) .....1804
35.7.4RNG hardware configuration register (RNG_HWCFGR) .....1805
35.7.5RNG version register (RNG_VERR) .....1805
35.7.6RNG identification register (RNG_IPIDR) .....1806
35.7.7RNG size identification register (RNG_SIDR) .....1806
35.7.8RNG register map .....1806
36Cryptographic processor (CRYP) .....1808
36.1Introduction .....1808
36.2CRYP main features .....1808
36.3CRYP implementation .....1809
36.4CRYP functional description .....1810
36.4.1CRYP block diagram .....1810
36.4.2CRYP internal signals .....1811
36.4.3CRYP DES/TDES cryptographic core .....1811
36.4.4CRYP AES cryptographic core .....1812
36.4.5CRYP procedure to perform a cipher operation .....1818
36.4.6CRYP busy state .....1820
36.4.7Preparing the CRYP AES key for decryption .....1821
36.4.8CRYP stealing and data padding .....1821
36.4.9CRYP suspend/resume operations .....1822
36.4.10CRYP DES/TDES basic chaining modes (ECB, CBC) .....1823
36.4.11CRYP AES basic chaining modes (ECB, CBC) .....1828
36.4.12CRYP AES counter mode (AES-CTR) .....1833
36.4.13CRYP AES Galois/counter mode (GCM) .....1837
36.4.14CRYP AES Galois message authentication code (GMAC) .....1842
36.4.15CRYP AES Counter with CBC-MAC (CCM) .....1843
36.4.16CRYP data registers and data swapping .....1848
36.4.17CRYP key registers .....1852
36.4.18CRYP initialization vector registers .....1853
36.4.19CRYP DMA interface .....1854
36.4.20CRYP error management .....1856
36.5CRYP interrupts1857
36.6CRYP processing time1858
36.7CRYP registers1859
36.7.1CRYP control register (CRYP_CR)1859
36.7.2CRYP status register (CRYP_SR)1861
36.7.3CRYP data input register (CRYP_DIN)1862
36.7.4CRYP data output register (CRYP_DOUT)1862
36.7.5CRYP DMA control register (CRYP_DMACR)1863
36.7.6CRYP interrupt mask set/clear register (CRYP_IMSCR)1864
36.7.7CRYP raw interrupt status register (CRYP_RISR)1864
36.7.8CRYP masked interrupt status register (CRYP_MISR)1865
36.7.9CRYP key register 0L (CRYP_K0LR)1866
36.7.10CRYP key register 0R (CRYP_K0RR)1866
36.7.11CRYP key register 1L (CRYP_K1LR)1867
36.7.12CRYP key register 1R (CRYP_K1RR)1867
36.7.13CRYP key register 2L (CRYP_K2LR)1868
36.7.14CRYP key register 2R (CRYP_K2RR)1868
36.7.15CRYP key register 3L (CRYP_K3LR)1869
36.7.16CRYP key register 3R (CRYP_K3RR)1869
36.7.17CRYP initialization vector register 0L (CRYP_IV0LR)1870
36.7.18CRYP initialization vector register 0R (CRYP_IV0RR)1870
36.7.19CRYP initialization vector register 1L (CRYP_IV1LR)1871
36.7.20CRYP initialization vector register 1R (CRYP_IV1RR)1871
36.7.21CRYP context swap GCM-CCM registers (CRYP_CSGCMCCMxR)1871
36.7.22CRYP context swap GCM registers (CRYP_CSGCMxR)1872
36.7.23CRYP hardware configuration register (CRYP_HWCFGR)1872
36.7.24CRYP version register (CRYP_VERR)1873
36.7.25CRYP identification (CRYP_IPIDR)1873
36.7.26CRYP size identification register (CRYP_SIDR)1874
36.7.27CRYP register map1874
37Hash processor (HASH)1877
37.1Introduction1877
37.2HASH main features1877
37.3HASH implementation1878
37.4HASH functional description1878
37.4.1HASH block diagram1878
37.4.2HASH internal signals1879
37.4.3About secure hash algorithms1879
37.4.4Message data feeding1879
37.4.5Message digest computing1881
37.4.6Message padding1882
37.4.7HMAC operation1884
37.4.8HASH suspend/resume operations1886
37.4.9HASH DMA interface1888
37.4.10HASH error management1888
37.4.11HASH processing time1889
37.5HASH interrupts1889
37.6HASH registers1890
37.6.1HASH control register (HASH_CR)1890
37.6.2HASH data input register (HASH_DIN)1892
37.6.3HASH start register (HASH_STR)1893
37.6.4HASH digest registers1894
37.6.5HASH interrupt enable register (HASH_IMR)1895
37.6.6HASH status register (HASH_SR)1896
37.6.7HASH context swap registers1896
37.6.8HASH hardware configuration register (HASH_HWCFGR)1897
37.6.9HASH version register (HASH_VERR)1897
37.6.10HASH identification register (HASH_IPIDR)1898
37.6.11HASH size identification register (HASH_SIDR)1898
37.6.12HASH register map1898
38Advanced-control timers (TIM1/TIM8)1901
38.1TIM1/TIM8 introduction1901
38.2TIM1/TIM8 main features1901
38.3TIM1/TIM8 functional description1903
38.3.1Time-base unit1903
38.3.2Counter modes1905
38.3.3Repetition counter1916
38.3.4External trigger input1918
38.3.5Clock selection1919
38.3.6Capture/compare channels1923
38.3.7Input capture mode1925
38.3.8PWM input mode1926
38.3.9Forced output mode1927
38.3.10Output compare mode1928
38.3.11PWM mode1929
38.3.12Asymmetric PWM mode1932
38.3.13Combined PWM mode1933
38.3.14Combined 3-phase PWM mode1934
38.3.15Complementary outputs and dead-time insertion1935
38.3.16Using the break function1937
38.3.17Bidirectional break inputs1943
38.3.18Clearing the OCxREF signal on an external event1944
38.3.196-step PWM generation1946
38.3.20One-pulse mode1947
38.3.21Retriggerable one pulse mode1948
38.3.22Encoder interface mode1949
38.3.23UIF bit remapping1951
38.3.24Timer input XOR function1952
38.3.25Interfacing with Hall sensors1952
38.3.26Timer synchronization1955
38.3.27ADC synchronization1959
38.3.28DMA burst mode1959
38.3.29Debug mode1960
38.4TIM1/TIM8 registers1961
38.4.1TIMx control register 1 (TIMx_CR1)(x = 1, 8)1961
38.4.2TIMx control register 2 (TIMx_CR2)(x = 1, 8)1962
38.4.3TIMx slave mode control register
(TIMx_SMCR)(x = 1, 8)
1965
38.4.4TIMx DMA/interrupt enable register
(TIMx_DIER)(x = 1, 8)
1967
38.4.5TIMx status register (TIMx_SR)(x = 1, 8)1969
38.4.6TIMx event generation register (TIMx_EGR)(x = 1, 8)1971
38.4.7TIMx capture/compare mode register 1 (TIMx_CCMR1)(x = 1, 8)1972
38.4.8TIMx capture/compare mode register 1 [alternate]
(TIMx_CCMR1)(x = 1, 8)
1973
38.4.9TIMx capture/compare mode register 2 (TIMx_CCMR2)(x = 1, 8)1976
38.4.10TIMx capture/compare mode register 2 [alternate]
(TIMx_CCMR2)(x = 1, 8)
1977
38.4.11TIMx capture/compare enable register
(TIMx_CCER)(x = 1, 8) .....
1978
38.4.12TIMx counter (TIMx_CNT)(x = 1, 8) .....1982
38.4.13TIMx prescaler (TIMx_PSC)(x = 1, 8) .....1982
38.4.14TIMx auto-reload register (TIMx_ARR)(x = 1, 8) .....1982
38.4.15TIMx repetition counter register (TIMx_RCR)(x = 1, 8) .....1983
38.4.16TIMx capture/compare register 1
(TIMx_CCR1)(x = 1, 8) .....
1983
38.4.17TIMx capture/compare register 2
(TIMx_CCR2)(x = 1, 8) .....
1984
38.4.18TIMx capture/compare register 3
(TIMx_CCR3)(x = 1, 8) .....
1984
38.4.19TIMx capture/compare register 4
(TIMx_CCR4)(x = 1, 8) .....
1985
38.4.20TIMx break and dead-time register
(TIMx_BDTR)(x = 1, 8) .....
1985
38.4.21TIMx DMA control register
(TIMx_DCR)(x = 1, 8) .....
1989
38.4.22TIMx DMA address for full transfer
(TIMx_DMAR)(x = 1, 8) .....
1990
38.4.23TIMx capture/compare mode register 3
(TIMx_CCMR3)(x = 1, 8) .....
1991
38.4.24TIMx capture/compare register 5
(TIMx_CCR5)(x = 1, 8) .....
1992
38.4.25TIMx capture/compare register 6
(TIMx_CCR6)(x = 1, 8) .....
1993
38.4.26TIM1 alternate function option register 1 (TIM1_AF1) .....1993
38.4.27TIM1 Alternate function register 2 (TIM1_AF2) .....1994
38.4.28TIM8 Alternate function option register 1 (TIM8_AF1) .....1995
38.4.29TIM8 Alternate function option register 2 (TIM8_AF2) .....1996
38.4.30TIM1 timer input selection register (TIM1_TISEL) .....1997
38.4.31TIM8 timer input selection register (TIM8_TISEL) .....1998
38.4.32TIM1 register map .....1999
38.4.33TIM8 register map .....2001
39General-purpose timers (TIM2/TIM3/TIM4/TIM5) .....2004
39.1TIM2/TIM3/TIM4/TIM5 introduction .....2004
39.2TIM2/TIM3/TIM4/TIM5 main features .....2004
39.3TIM2/TIM3/TIM4/TIM5 functional description .....2006
39.3.1Time-base unit .....2006
39.3.2Counter modes .....2008
39.3.3Clock selection .....2018
39.3.4Capture/Compare channels .....2022
39.3.5Input capture mode .....2023
39.3.6PWM input mode .....2024
39.3.7Forced output mode .....2025
39.3.8Output compare mode .....2026
39.3.9PWM mode .....2027
39.3.10Asymmetric PWM mode .....2030
39.3.11Combined PWM mode .....2031
39.3.12Clearing the OCxREF signal on an external event .....2032
39.3.13One-pulse mode .....2034
39.3.14Retriggerable one pulse mode .....2035
39.3.15Encoder interface mode .....2036
39.3.16UIF bit remapping .....2038
39.3.17Timer input XOR function .....2038
39.3.18Timers and external trigger synchronization .....2039
39.3.19Timer synchronization .....2042
39.3.20DMA burst mode .....2047
39.3.21Debug mode .....2048
39.4TIM2/TIM3/TIM4/TIM5 registers .....2049
39.4.1TIMx control register 1 (TIMx_CR1)(x = 2 to 5) .....2049
39.4.2TIMx control register 2 (TIMx_CR2)(x = 2 to 5) .....2050
39.4.3TIMx slave mode control register (TIMx_SMCR)(x = 2 to 5) .....2052
39.4.4TIMx DMA/Interrupt enable register (TIMx_DIER)(x = 2 to 5) .....2055
39.4.5TIMx status register (TIMx_SR)(x = 2 to 5) .....2056
39.4.6TIMx event generation register (TIMx_EGR)(x = 2 to 5) .....2057
39.4.7TIMx capture/compare mode register 1 (TIMx_CCMR1)(x = 2 to 5) .....2058
39.4.8TIMx capture/compare mode register 1 [alternate] (TIMx_CCMR1)
(x = 2 to 5) .....
2060
39.4.9TIMx capture/compare mode register 2 (TIMx_CCMR2)(x = 2 to 5) .....2062
39.4.10TIMx capture/compare mode register 2 [alternate] (TIMx_CCMR2)
(x = 2 to 5) .....
2063
39.4.11TIMx capture/compare enable register
(TIMx_CCER)(x = 2 to 5) .....
2064
39.4.12TIMx counter (TIMx_CNT)(x = 2 to 5) .....2065
39.4.13TIMx counter [alternate] (TIMx_CNT)(x = 2 to 5) .....2066
39.4.14TIMx prescaler (TIMx_PSC)(x = 2 to 5) .....2066
39.4.15TIMx auto-reload register (TIMx_ARR)(x = 2 to 5) . . . . .2067
39.4.16TIMx capture/compare register 1 (TIMx_CCR1)(x = 2 to 5) . . . . .2067
39.4.17TIMx capture/compare register 2 (TIMx_CCR2)(x = 2 to 5) . . . . .2067
39.4.18TIMx capture/compare register 3 (TIMx_CCR3)(x = 2 to 5) . . . . .2068
39.4.19TIMx capture/compare register 4 (TIMx_CCR4)(x = 2 to 5) . . . . .2068
39.4.20TIMx DMA control register (TIMx_DCR)(x = 2 to 5) . . . . .2069
39.4.21TIMx DMA address for full transfer (TIMx_DMAR)(x = 2 to 5) . . . . .2070
39.4.22TIM2 alternate function option register 1 (TIM2_AF1) . . . . .2070
39.4.23TIM3 alternate function option register 1 (TIM3_AF1) . . . . .2070
39.4.24TIM4 alternate function option register 1 (TIM4_AF1) . . . . .2071
39.4.25TIM5 alternate function option register 1 (TIM5_AF1) . . . . .2071
39.4.26TIM2 timer input selection register (TIM2_TISEL) . . . . .2072
39.4.27TIM3 timer input selection register (TIM3_TISEL) . . . . .2073
39.4.28TIM4 timer input selection register (TIM4_TISEL) . . . . .2073
39.4.29TIM5 timer input selection register (TIM5_TISEL) . . . . .2074
39.4.30TIMx register map . . . . .2076
40General-purpose timers (TIM12/TIM13/TIM14) . . . . .2079
40.1TIM12/TIM13/TIM14 introduction . . . . .2079
40.2TIM12/TIM13/TIM14 main features . . . . .2079
40.2.1TIM12 main features . . . . .2079
40.2.2TIM13/TIM14 main features . . . . .2080
40.3TIM12/TIM13/TIM14 functional description . . . . .2082
40.3.1Time-base unit . . . . .2082
40.3.2Counter modes . . . . .2084
40.3.3Clock selection . . . . .2087
40.3.4Capture/compare channels . . . . .2089
40.3.5Input capture mode . . . . .2091
40.3.6PWM input mode (only for TIM12) . . . . .2092
40.3.7Forced output mode . . . . .2093
40.3.8Output compare mode . . . . .2094
40.3.9PWM mode . . . . .2095
40.3.10Combined PWM mode (TIM12 only) . . . . .2096
40.3.11One-pulse mode . . . . .2097
40.3.12Retriggerable one pulse mode (TIM12 only) . . . . .2099
40.3.13UIF bit remapping . . . . .2099
40.3.14Timer input XOR function . . . . .2100
40.3.15TIM12 external trigger synchronization2100
40.3.16Slave mode – combined reset + trigger mode2103
40.3.17Timer synchronization (TIM12)2104
40.3.18Using timer output as trigger for other timers (TIM13/TIM14)2104
40.3.19Debug mode2104
40.4TIM12 registers2104
40.4.1TIM12 control register 1 (TIM12_CR1)2104
40.4.2TIM12 control register 2 (TIM12_CR2)2105
40.4.3TIM12 slave mode control register (TIM12_SMCR)2106
40.4.4TIM12 Interrupt enable register (TIM12_DIER)2108
40.4.5TIM12 status register (TIM12_SR)2108
40.4.6TIM12 event generation register (TIM12_EGR)2109
40.4.7TIM12 capture/compare mode register 1 (TIM12_CCMR1)2110
40.4.8TIM12 capture/compare mode register 1 [alternate]
(TIM12_CCMR1)
2111
40.4.9TIM12 capture/compare enable register (TIM12_CCER)2114
40.4.10TIM12 counter (TIM12_CNT)2115
40.4.11TIM12 prescaler (TIM12_PSC)2116
40.4.12TIM12 auto-reload register (TIM12_ARR)2116
40.4.13TIM12 capture/compare register 1 (TIM12_CCR1)2116
40.4.14TIM12 capture/compare register 2 (TIM12_CCR2)2117
40.4.15TIM12 timer input selection register (TIM12_TISEL)2117
40.4.16TIM12 register map2118
40.5TIM13/TIM14 registers2120
40.5.1TIMx control register 1 (TIMx_CR1)(x = 13 to 14)2120
40.5.2TIMx Interrupt enable register (TIMx_DIER)(x = 13 to 14)2121
40.5.3TIMx status register (TIMx_SR)(x = 13 to 14)2121
40.5.4TIMx event generation register (TIMx_EGR)(x = 13 to 14)2122
40.5.5TIMx capture/compare mode register 1
(TIMx_CCMR1)(x = 13 to 14)
2123
40.5.6TIMx capture/compare mode register 1 [alternate]
(TIMx_CCMR1)(x = 13 to 14)
2124
40.5.7TIMx capture/compare enable register
(TIMx_CCER)(x = 13 to 14)
2126
40.5.8TIMx counter (TIMx_CNT)(x = 13 to 14)2127
40.5.9TIMx prescaler (TIMx_PSC)(x = 13 to 14)2128
40.5.10TIMx auto-reload register (TIMx_ARR)(x = 13 to 14)2128
40.5.11TIMx capture/compare register 1 (TIMx_CCR1)(x = 13 to 14)2128
40.5.12TIM13 timer input selection register (TIM13_TISEL) . . . . .2129
40.5.13TIM14 timer input selection register (TIM14_TISEL) . . . . .2129
40.5.14TIM13/TIM14 register map . . . . .2130
41General-purpose timers (TIM15/TIM16/TIM17) . . . . .2132
41.1TIM15/TIM16/TIM17 introduction . . . . .2132
41.2TIM15 main features . . . . .2132
41.3TIM16/TIM17 main features . . . . .2133
41.4TIM15/TIM16/TIM17 functional description . . . . .2136
41.4.1Time-base unit . . . . .2136
41.4.2Counter modes . . . . .2138
41.4.3Repetition counter . . . . .2142
41.4.4Clock selection . . . . .2143
41.4.5Capture/compare channels . . . . .2145
41.4.6Input capture mode . . . . .2147
41.4.7PWM input mode (only for TIM15) . . . . .2148
41.4.8Forced output mode . . . . .2149
41.4.9Output compare mode . . . . .2150
41.4.10PWM mode . . . . .2151
41.4.11Combined PWM mode (TIM15 only) . . . . .2152
41.4.12Complementary outputs and dead-time insertion . . . . .2153
41.4.13Using the break function . . . . .2155
41.4.14Bidirectional break inputs . . . . .2160
41.4.156-step PWM generation . . . . .2161
41.4.16One-pulse mode . . . . .2163
41.4.17Retriggerable one pulse mode (TIM15 only) . . . . .2164
41.4.18UIF bit remapping . . . . .2165
41.4.19Timer input XOR function (TIM15 only) . . . . .2166
41.4.20External trigger synchronization (TIM15 only) . . . . .2167
41.4.21Slave mode – combined reset + trigger mode . . . . .2169
41.4.22DMA burst mode . . . . .2169
41.4.23Timer synchronization (TIM15) . . . . .2171
41.4.24Using timer output as trigger for other timers (TIM16/TIM17) . . . . .2171
41.4.25Debug mode . . . . .2171
41.5TIM15 registers . . . . .2172
41.5.1TIM15 control register 1 (TIM15_CR1) . . . . .2172
41.5.2TIM15 control register 2 (TIM15_CR2) . . . . .2173
41.5.3TIM15 slave mode control register (TIM15_SMCR) .....2175
41.5.4TIM15 DMA/interrupt enable register (TIM15_DIER) .....2176
41.5.5TIM15 status register (TIM15_SR) .....2177
41.5.6TIM15 event generation register (TIM15_EGR) .....2179
41.5.7TIM15 capture/compare mode register 1 (TIM15_CCMR1) .....2180
41.5.8TIM15 capture/compare mode register 1 [alternate]
(TIM15_CCMR1) .....
2181
41.5.9TIM15 capture/compare enable register (TIM15_CCER) .....2184
41.5.10TIM15 counter (TIM15_CNT) .....2187
41.5.11TIM15 prescaler (TIM15_PSC) .....2187
41.5.12TIM15 auto-reload register (TIM15_ARR) .....2187
41.5.13TIM15 repetition counter register (TIM15_RCR) .....2188
41.5.14TIM15 capture/compare register 1 (TIM15_CCR1) .....2188
41.5.15TIM15 capture/compare register 2 (TIM15_CCR2) .....2189
41.5.16TIM15 break and dead-time register (TIM15_BDTR) .....2189
41.5.17TIM15 DMA control register (TIM15_DCR) .....2192
41.5.18TIM15 DMA address for full transfer (TIM15_DMAR) .....2192
41.5.19TIM15 alternate register 1 (TIM15_AF1) .....2193
41.5.20TIM15 input selection register (TIM15_TISEL) .....2194
41.5.21TIM15 register map .....2194
41.6TIM16/TIM17 registers .....2197
41.6.1TIMx control register 1 (TIMx_CR1)(x = 16 to 17) .....2197
41.6.2TIMx control register 2 (TIMx_CR2)(x = 16 to 17) .....2198
41.6.3TIMx DMA/interrupt enable register (TIMx_DIER)(x = 16 to 17) ....2199
41.6.4TIMx status register (TIMx_SR)(x = 16 to 17) .....2200
41.6.5TIMx event generation register (TIMx_EGR)(x = 16 to 17) .....2201
41.6.6TIMx capture/compare mode register 1
(TIMx_CCMR1)(x = 16 to 17) .....
2202
41.6.7TIMx capture/compare mode register 1 [alternate]
(TIMx_CCMR1)(x = 16 to 17) .....
2203
41.6.8TIMx capture/compare enable register (TIMx_CCER)(x = 16 to 17) ..2205
41.6.9TIMx counter (TIMx_CNT)(x = 16 to 17) .....2207
41.6.10TIMx prescaler (TIMx_PSC)(x = 16 to 17) .....2208
41.6.11TIMx auto-reload register (TIMx_ARR)(x = 16 to 17) .....2208
41.6.12TIMx repetition counter register (TIMx_RCR)(x = 16 to 17) .....2209
41.6.13TIMx capture/compare register 1 (TIMx_CCR1)(x = 16 to 17) ....2209
41.6.14TIMx break and dead-time register (TIMx_BDTR)(x = 16 to 17) ....2210
41.6.15TIMx DMA control register (TIMx_DCR)(x = 16 to 17) .....2213
41.6.16TIMx DMA address for full transfer (TIMx_DMAR)(x = 16 to 17) . . . . .2213
41.6.17TIM16 alternate function register 1 (TIM16_AF1) . . . . .2214
41.6.18TIM16 input selection register (TIM16_TISEL) . . . . .2214
41.6.19TIM17 alternate function register 1 (TIM17_AF1) . . . . .2215
41.6.20TIM17 input selection register (TIM17_TISEL) . . . . .2216
41.6.21TIM16/TIM17 register map . . . . .2217
42Basic timers (TIM6/TIM7) . . . . .2219
42.1TIM6/TIM7 introduction . . . . .2219
42.2TIM6/TIM7 main features . . . . .2219
42.3TIM6/TIM7 functional description . . . . .2220
42.3.1Time-base unit . . . . .2220
42.3.2Counting mode . . . . .2222
42.3.3UIF bit remapping . . . . .2225
42.3.4Clock source . . . . .2225
42.3.5Debug mode . . . . .2226
42.4TIM6/TIM7 registers . . . . .2226
42.4.1TIMx control register 1 (TIMx_CR1)(x = 6 to 7) . . . . .2226
42.4.2TIMx control register 2 (TIMx_CR2)(x = 6 to 7) . . . . .2228
42.4.3TIMx DMA/Interrupt enable register (TIMx_DIER)(x = 6 to 7) . . . . .2228
42.4.4TIMx status register (TIMx_SR)(x = 6 to 7) . . . . .2229
42.4.5TIMx event generation register (TIMx_EGR)(x = 6 to 7) . . . . .2229
42.4.6TIMx counter (TIMx_CNT)(x = 6 to 7) . . . . .2229
42.4.7TIMx prescaler (TIMx_PSC)(x = 6 to 7) . . . . .2230
42.4.8TIMx auto-reload register (TIMx_ARR)(x = 6 to 7) . . . . .2230
42.4.9TIMx register map . . . . .2231
43Low-power timer (LPTIM) . . . . .2232
43.1Introduction . . . . .2232
43.2LPTIM main features . . . . .2232
43.3LPTIM implementation . . . . .2233
43.4LPTIM functional description . . . . .2233
43.4.1LPTIM block diagram . . . . .2233
43.4.2LPTIM pins and internal signals . . . . .2235
43.4.3LPTIM input and trigger mapping . . . . .2235
43.4.4LPTIM reset and clocks . . . . .2238
43.4.5Glitch filter2238
43.4.6Prescaler2239
43.4.7Trigger multiplexer2240
43.4.8Operating mode2240
43.4.9Timeout function2242
43.4.10Waveform generation2242
43.4.11Register update2243
43.4.12Counter mode2244
43.4.13Timer enable2244
43.4.14Timer counter reset2245
43.4.15Encoder mode2245
43.4.16Debug mode2247
43.5LPTIM low-power modes2247
43.6LPTIM interrupts2248
43.7LPTIM registers2248
43.7.1LPTIM interrupt and status register (LPTIM_ISR)2249
43.7.2LPTIM interrupt clear register (LPTIM_ICR)2250
43.7.3LPTIM interrupt enable register (LPTIM_IER)2250
43.7.4LPTIM configuration register (LPTIM_CFGR)2251
43.7.5LPTIM control register (LPTIM_CR)2254
43.7.6LPTIM compare register (LPTIM_CMP)2256
43.7.7LPTIM autoreload register (LPTIM_ARR)2256
43.7.8LPTIM counter register (LPTIM_CNT)2257
43.7.9LPTIM configuration register 2 (LPTIM_CFGR2)2257
43.7.10LPTIM x peripheral hardware configuration register
(LPTIMx_HWCFGR)(x = 1 to 5)
2258
43.7.11LPTIM peripheral version identification register (LPTIM_VERR)2259
43.7.12LPTIM peripheral type identification register (LPTIM_PIDR)2259
43.7.13LPTIM registers map size identification register (LPTIM_SIDR)2259
43.7.14LPTIM register map2261
44System timer generator (STGEN)2263
44.1STGEN introduction2263
44.2STGEN main features2263
44.3STGEN functional description2263
44.3.1STGEN block diagram2264
44.4STGEN registers2265
44.4.1STGENC control register (STGENC_CNTCR) .....2265
44.4.2STGENC status register (STGENC_CNTSR) .....2265
44.4.3STGENC value lower register (STGENC_CNTCVL) .....2266
44.4.4STGENC value upper register (STGENC_CNTCVU) .....2266
44.4.5STGENC base frequency register (STGENC_CNTFID0) .....2267
44.4.6STGENC peripheral ID4 register (STGENC_PIDR4) .....2267
44.4.7STGENC peripheral ID5 register (STGENC_PIDR5) .....2268
44.4.8STGENC peripheral ID6 register (STGENC_PIDR6) .....2268
44.4.9STGENC peripheral ID7 register (STGENC_PIDR7) .....2268
44.4.10STGENC peripheral ID0 register (STGENC_PIDR0) .....2269
44.4.11STGENC peripheral ID1 register (STGENC_PIDR1) .....2269
44.4.12STGENC peripheral ID2 register (STGENC_PIDR2) .....2269
44.4.13STGENC peripheral ID3 register (STGENC_PIDR3) .....2270
44.4.14STGENC component ID0 register (STGENC_CIDR0) .....2270
44.4.15STGENC component ID1 register (STGENC_CIDR1) .....2271
44.4.16STGENC component ID2 register (STGENC_CIDR2) .....2271
44.4.17STGENC component ID3 register (STGENC_CIDR3) .....2272
44.4.18STGENR value lower register (STGENR_CNTCVL) .....2272
44.4.19STGENR value upper register (STGENR_CNTCVU) .....2272
44.4.20STGENR peripheral ID4 register (STGENR_PIDR4) .....2273
44.4.21STGENR peripheral ID5 register (STGENR_PIDR5) .....2273
44.4.22STGENR peripheral ID6 register (STGENR_PIDR6) .....2273
44.4.23STGENR peripheral ID7 register (STGENR_PIDR7) .....2274
44.4.24STGENR peripheral ID0 register (STGENR_PIDR0) .....2274
44.4.25STGENR peripheral ID1 register (STGENR_PIDR1) .....2274
44.4.26STGENR peripheral ID2 register (STGENR_PIDR2) .....2275
44.4.27STGENR peripheral ID3 register (STGENR_PIDR3) .....2275
44.4.28STGENR component ID0 register (STGENR_CIDR0) .....2276
44.4.29STGENR component ID1 register (STGENR_CIDR1) .....2276
44.4.30STGENR component ID2 register (STGENR_CIDR2) .....2276
44.4.31STGENR component ID3 register (STGENR_CIDR3) .....2277
44.4.32STGEN register map .....2277
45Watchdogs overview .....2280
45.1Watchdog main features .....2280
45.2Watchdog brief functional description .....2280
46Independent watchdog (IWDG) . . . . .2282
46.1Introduction . . . . .2282
46.2IWDG main features . . . . .2282
46.3IWDG implementation . . . . .2282
46.4IWDG functional description . . . . .2283
46.4.1IWDG block diagram . . . . .2283
46.4.2IWDG internal signals . . . . .2284
46.4.3Software and hardware watchdog modes . . . . .2284
46.4.4Window option . . . . .2285
46.4.5Debug . . . . .2288
46.4.6Register access protection . . . . .2288
46.5IWDG low power modes . . . . .2288
46.6IWDG interrupts . . . . .2289
46.7IWDG registers . . . . .2290
46.7.1IWDG key register (IWDG_KR) . . . . .2290
46.7.2IWDG prescaler register (IWDG_PR) . . . . .2291
46.7.3IWDG reload register (IWDG_RLR) . . . . .2292
46.7.4IWDG status register (IWDG_SR) . . . . .2292
46.7.5IWDG window register (IWDG_WINR) . . . . .2293
46.7.6IWDG early wake-up interrupt register (IWDG_EWCR) . . . . .2294
46.7.7IWDG hardware configuration register (IWDG_HWCFGR) . . . . .2294
46.7.8IWDG version register (IWDG_VERR) . . . . .2295
46.7.9IWDG identification register (IWDG_IDR) . . . . .2296
46.7.10IWDG size identification register (IWDG_SIDR) . . . . .2296
46.7.11IWDG register map . . . . .2297
47System window watchdog (WWDG) . . . . .2298
47.1Introduction . . . . .2298
47.2WWDG main features . . . . .2298
47.3WWDG functional description . . . . .2298
47.3.1WWDG block diagram . . . . .2299
47.3.2WWDG internal signals . . . . .2299
47.3.3Enabling the watchdog . . . . .2299
47.3.4Controlling the down-counter . . . . .2299
47.3.5How to program the watchdog timeout . . . . .2300
47.3.6Debug mode . . . . .2301
47.4WWDG interrupts2301
47.5WWDG registers2301
47.5.1WWDG control register (WWDG_CR)2302
47.5.2WWDG configuration register (WWDG_CFR)2302
47.5.3WWDG status register (WWDG_SR)2303
47.5.4WWDG hardware configuration register (WWDG_HWCFGR)2303
47.5.5WWDG version register (WWDG_VERR)2304
47.5.6WWDG identification register (WWDG_IPIDR)2304
47.5.7WWDG size identification register (WWDG_SIDR)2304
47.5.8WWDG register map2305
48Real-time clock (RTC)2306
48.1Introduction2306
48.2RTC main features2306
48.3RTC functional description2308
48.3.1RTC block diagram2308
48.3.2RTC pins and internal signals2310
48.3.3GPIOs controlled by the RTC and TAMP2311
48.3.4RTC secure protection modes2315
48.3.5Clock and prescalers2316
48.3.6Real-time clock and calendar2317
48.3.7Programmable alarms2317
48.3.8Periodic auto-wakeup2318
48.3.9RTC initialization and configuration2319
48.3.10Reading the calendar2320
48.3.11Resetting the RTC2321
48.3.12RTC synchronization2322
48.3.13RTC reference clock detection2322
48.3.14RTC smooth digital calibration2323
48.3.15Timestamp function2325
48.3.16Calibration clock output2326
48.3.17Tamper and alarm output2326
48.4RTC low-power modes2327
48.5RTC interrupts2327
48.6RTC registers2328
48.6.1RTC time register (RTC_TR)2329
48.6.2RTC date register (RTC_DR) . . . . .2330
48.6.3RTC sub second register (RTC_SSR) . . . . .2331
48.6.4RTC initialization control and status register (RTC_ICSR) . . . . .2331
48.6.5RTC prescaler register (RTC_PRER) . . . . .2333
48.6.6RTC wakeup timer register (RTC_WUTR) . . . . .2334
48.6.7RTC control register (RTC_CR) . . . . .2334
48.6.8RTC secure mode control register (RTC_SMCR) . . . . .2338
48.6.9RTC write protection register (RTC_WPR) . . . . .2339
48.6.10RTC calibration register (RTC_CALR) . . . . .2340
48.6.11RTC shift control register (RTC_SHIFTR) . . . . .2341
48.6.12RTC timestamp time register (RTC_TSTR) . . . . .2342
48.6.13RTC timestamp date register (RTC_TSDR) . . . . .2343
48.6.14RTC timestamp sub second register (RTC_TSSSR) . . . . .2343
48.6.15RTC alarm A register (RTC_ALRMAR) . . . . .2344
48.6.16RTC alarm A sub second register (RTC_ALRMASSR) . . . . .2345
48.6.17RTC alarm B register (RTC_ALRMBR) . . . . .2346
48.6.18RTC alarm B sub second register (RTC_ALRMBSSR) . . . . .2347
48.6.19RTC status register (RTC_SR) . . . . .2348
48.6.20RTC non-secure masked interrupt status register (RTC_MISR) . . . . .2349
48.6.21RTC secure masked interrupt status register (RTC_SMISR) . . . . .2350
48.6.22RTC status clear register (RTC_SCR) . . . . .2351
48.6.23RTC configuration register (RTC_CFGR) . . . . .2352
48.6.24RTC hardware configuration register (RTC_HWCFGR) . . . . .2352
48.6.25RTC version register (RTC_VERR) . . . . .2353
48.6.26RTC identification register (RTC_IPIDR) . . . . .2354
48.6.27RTC size identification register (RTC_SIDR) . . . . .2354
48.6.28RTC register map . . . . .2355
49Tamper and backup registers (TAMP) . . . . .2358
49.1Introduction . . . . .2358
49.2TAMP main features . . . . .2358
49.3TAMP functional description . . . . .2359
49.3.1TAMP block diagram . . . . .2359
49.3.2TAMP pins and internal signals . . . . .2360
49.3.3TAMP register write protection . . . . .2361
49.3.4TAMP secure protection modes . . . . .2361
49.3.5Tamper detection . . . . .2361
49.4TAMP low-power modes .....2365
49.5TAMP interrupts .....2365
49.6TAMP registers .....2366
49.6.1TAMP control register 1 (TAMP_CR1) .....2366
49.6.2TAMP control register 2 (TAMP_CR2) .....2368
49.6.3TAMP filter control register (TAMP_FLTCR) .....2369
49.6.4TAMP active tamper control register 1 (TAMP_ATCR1) .....2371
49.6.5TAMP active tamper seed register (TAMP_ATSEEDR) .....2372
49.6.6TAMP active tamper output register (TAMP_ATOR) .....2373
49.6.7TAMP secure mode register (TAMP_SMCR) .....2374
49.6.8TAMP interrupt enable register (TAMP_IER) .....2374
49.6.9TAMP status register (TAMP_SR) .....2376
49.6.10TAMP non-secure masked interrupt status register (TAMP_MISR) ..2377
49.6.11TAMP secure masked interrupt status register (TAMP_SMISR) ....2378
49.6.12TAMP status clear register (TAMP_SCR) .....2379
49.6.13TAMP monotonic counter register (TAMP_COUNTR) .....2380
49.6.14TAMP configuration register (TAMP_CFGR) .....2380
49.6.15TAMP backup x register (TAMP_BKPxR) .....2381
49.6.16TAMP hardware configuration register 2 (TAMP_HWCFGR2) ....2381
49.6.17TAMP hardware configuration register 1 (TAMP_HWCFGR1) ....2382
49.6.18TAMP version register (TAMP_VERR) .....2382
49.6.19TAMP identification register (TAMP_IPIDR) .....2383
49.6.20TAMP size identification register (TAMP_SIDR) .....2383
49.6.21TAMP register map .....2384
50Inter-integrated circuit interface (I2C) .....2386
50.1I2C introduction .....2386
50.2I2C main features .....2386
50.3I2C implementation .....2387
50.4I2C functional description .....2387
50.4.1I2C block diagram .....2388
50.4.2I2C pins and internal signals .....2388
50.4.3I2C clock requirements .....2389
50.4.4I2C mode selection .....2389
50.4.5I2C initialization .....2390
50.4.6I2C reset .....2394
50.4.7I2C data transfer2395
50.4.8I2C target mode2397
50.4.9I2C controller mode2406
50.4.10I2C_TIMINGR register configuration examples2417
50.4.11SMBus specific features2419
50.4.12SMBus initialization2422
50.4.13SMBus I2C_TIMEOUTR register configuration examples2424
50.4.14SMBus target mode2424
50.4.15SMBus controller mode2428
50.4.16Wake-up from Stop mode on address match2431
50.4.17Error conditions2432
50.5I2C in low-power modes2434
50.6I2C interrupts2434
50.7I2C DMA requests2435
50.7.1Transmission using DMA2435
50.7.2Reception using DMA2435
50.8I2C debug modes2435
50.9I2C registers2436
50.9.1I2C control register 1 (I2C_CR1)2436
50.9.2I2C control register 2 (I2C_CR2)2438
50.9.3I2C own address 1 register (I2C_OAR1)2440
50.9.4I2C own address 2 register (I2C_OAR2)2441
50.9.5I2C timing register (I2C_TIMINGR)2442
50.9.6I2C timeout register (I2C_TIMEOUTR)2443
50.9.7I2C interrupt and status register (I2C_ISR)2444
50.9.8I2C interrupt clear register (I2C_ICR)2446
50.9.9I2C PEC register (I2C_PECR)2447
50.9.10I2C receive data register (I2C_RXDR)2447
50.9.11I2C transmit data register (I2C_TXDR)2448
50.9.12I2C hardware configuration register (I2C_HWCFGR)2448
50.9.13I2C version register (I2C_VERR)2449
50.9.14I2C identification register (I2C_IPIDR)2449
50.9.15I2C size identification register (I2C_SIDR)2449
50.9.16I2C register map2450