28. Secure AES coprocessor (SAES) ..... 839

ST logo
ST logo
28.1SAES introduction839
28.2SAES main features839
28.3SAES implementation840
28.4SAES functional description840
28.4.1SAES block diagram840
28.4.2SAES internal signals841
28.4.3SAES reset and clocks842
28.4.4SAES symmetric cipher implementation842
28.4.5SAES encryption or decryption typical usage843
28.4.6SAES authenticated encryption, decryption, and cipher-based message authentication845
28.4.7SAES ciphertext stealing and data padding846
28.4.8SAES suspend and resume operations846
28.4.9SAES basic chaining modes (ECB, CBC)847
28.4.10SAES counter (CTR) mode851
28.4.11SAES Galois/counter mode (GCM)853
28.4.12SAES Galois message authentication code (GMAC)857
28.4.13SAES counter with CBC-MAC (CCM)859
28.4.14SAES operation with wrapped keys864
28.4.15SAES operation with shared keys868
28.4.16SAES data registers and data swapping869
28.4.17SAES key registers872
28.4.18SAES initialization vector registers873
28.4.19SAES error management873
28.5SAES interrupts875
28.6SAES DMA requests876
28.7SAES processing latency876
28.8SAES registers878
28.8.1SAES control register (SAES_CR)878
28.8.2SAES status register (SAES_SR)881
28.8.3SAES data input register (SAES_DINR)882
28.8.4SAES data output register (SAES_DOUTR)882
28.8.5SAES key register 0 (SAES_KEYR0)883
28.8.6SAES key register 1 (SAES_KEYR1)883
28.8.7SAES key register 2 (SAES_KEYR2)884
28.8.8SAES key register 3 (SAES_KEYR3)884
28.8.9SAES initialization vector register 0 (SAES_IVR0) .....884
28.8.10SAES initialization vector register 1 (SAES_IVR1) .....885
28.8.11SAES initialization vector register 2 (SAES_IVR2) .....885
28.8.12SAES initialization vector register 3 (SAES_IVR3) .....885
28.8.13SAES key register 4 (SAES_KEYR4) .....886
28.8.14SAES key register 5 (SAES_KEYR5) .....886
28.8.15SAES key register 6 (SAES_KEYR6) .....886
28.8.16SAES key register 7 (SAES_KEYR7) .....887
28.8.17SAES suspend registers (SAES_SUSPRx) .....887
28.8.18SAES interrupt enable register (SAES_IER) .....887
28.8.19SAES interrupt status register (SAES_ISR) .....888
28.8.20SAES interrupt clear register (SAES_ICR) .....890
28.8.21SAES register map .....890
29Hash processor (HASH) .....893
29.1HASH introduction .....893
29.2HASH main features .....893
29.3HASH implementation .....894
29.4HASH functional description .....894
29.4.1HASH block diagram .....894
29.4.2HASH internal signals .....895
29.4.3About secure hash algorithms .....895
29.4.4Message data feeding .....895
29.4.5Message digest computing .....897
29.4.6Message padding .....899
29.4.7HMAC operation .....901
29.4.8HASH suspend/resume operations .....902
29.4.9HASH DMA interface .....904
29.4.10HASH error management .....905
29.4.11HASH processing time .....905
29.5HASH interrupts .....906
29.6HASH registers .....906
29.6.1HASH control register (HASH_CR) .....906
29.6.2HASH data input register (HASH_DIN) .....908
29.6.3HASH start register (HASH_STR) .....909
29.6.4HASH digest registers .....910
29.6.5HASH interrupt enable register (HASH_IMR) . . . . .912
29.6.6HASH status register (HASH_SR) . . . . .912
29.6.7HASH context swap registers . . . . .913
29.6.8HASH register map . . . . .914
30Public key accelerator (PKA) . . . . .916
30.1PKA introduction . . . . .916
30.2PKA main features . . . . .916
30.3PKA functional description . . . . .917
30.3.1PKA block diagram . . . . .917
30.3.2PKA internal signals . . . . .917
30.3.3PKA reset and clocks . . . . .918
30.3.4PKA public key acceleration . . . . .918
30.3.5Typical applications for PKA . . . . .920
30.3.6PKA procedure to perform an operation . . . . .922
30.3.7Private keys protection using CCB . . . . .923
30.3.8PKA error management . . . . .927
30.4PKA operating modes . . . . .927
30.4.1Introduction . . . . .927
30.4.2Montgomery parameter computation . . . . .929
30.4.3Modular addition . . . . .929
30.4.4Modular subtraction . . . . .930
30.4.5Modular and Montgomery multiplication . . . . .930
30.4.6Modular exponentiation . . . . .931
30.4.7Modular inversion . . . . .933
30.4.8Modular reduction . . . . .933
30.4.9Arithmetic addition . . . . .934
30.4.10Arithmetic subtraction . . . . .934
30.4.11Arithmetic multiplication . . . . .935
30.4.12Arithmetic comparison . . . . .935
30.4.13RSA CRT exponentiation . . . . .935
30.4.14Point on elliptic curve \(F_p\) check . . . . .936
30.4.15ECC \(F_p\) scalar multiplication . . . . .937
30.4.16ECDSA sign . . . . .938
30.4.17ECDSA verification . . . . .940
30.4.18ECC complete addition . . . . .941
30.4.19ECC double base ladder . . . . .941
30.4.20ECC projective to affine .....942
30.5Example of configurations and processing times .....943
30.5.1Supported elliptic curves .....943
30.5.2Computation times .....945
30.6PKA interrupts .....947
30.7PKA registers .....948
30.7.1PKA control register (PKA_CR) .....948
30.7.2PKA status register (PKA_SR) .....950
30.7.3PKA clear flag register (PKA_CLRFR) .....952
30.7.4PKA RAM .....953
30.7.5PKA register map .....954
31Advanced-control timers (TIM1/TIM8) .....955
31.1TIM1/TIM8 introduction .....955
31.2TIM1/TIM8 main features .....955
31.3TIM1/TIM8 functional description .....956
31.3.1Block diagram .....956
31.3.2TIM1/TIM8 pins and internal signals .....957
31.3.3Time-base unit .....961
31.3.4Counter modes .....964
31.3.5Repetition counter .....976
31.3.6External trigger input .....977
31.3.7Clock selection .....978
31.3.8Capture/compare channels .....982
31.3.9Input capture mode .....985
31.3.10PWM input mode .....986
31.3.11Forced output mode .....987
31.3.12Output compare mode .....987
31.3.13PWM mode .....988
31.3.14Asymmetric PWM mode .....997
31.3.15Combined PWM mode .....1000
31.3.16Combined 3-phase PWM mode .....1003
31.3.17Complementary outputs and dead-time insertion .....1004
31.3.18Clock dividers for dead-time generators and digital filters .....1007
31.3.19Using the break function .....1007
31.3.20Delayed break .....1013
31.3.21Bidirectional break inputs .....1015
31.3.22Output idle state override .....1017
31.3.23Clearing the tim_ocxref signal on an external event .....1018
31.3.246-step PWM generation .....1021
31.3.25One-pulse mode .....1022
31.3.26Retriggerable One-pulse mode .....1024
31.3.27Pulse on compare mode .....1025
31.3.28Encoder interface mode .....1027
31.3.29Encoder with built-in debouncer .....1044
31.3.30Direction bit output .....1046
31.3.31Clock drift measurement .....1046
31.3.32UIF bit remapping .....1047
31.3.33Timer input XOR function .....1047
31.3.34Interfacing with Hall sensors .....1049
31.3.35Timer synchronization .....1050
31.3.36ADC triggers .....1055
31.3.37ADC synchronization .....1055
31.3.38DMA burst mode .....1056
31.3.39TIM1/TIM8 DMA requests .....1057
31.3.40Debug mode .....1058
31.4TIM1/TIM8 low-power modes .....1058
31.5TIM1/TIM8 interrupts .....1058
31.6TIM1/TIM8 registers .....1060
31.6.1TIM control register 1 (TIM_CR1) .....1060
31.6.2TIM control register 2 (TIM_CR2) .....1062
31.6.3TIM slave mode control register (TIM_SMCR) .....1067
31.6.4TIM DMA/interrupt enable register (TIM_DIER) .....1071
31.6.5TIM status register (TIM_SR) .....1072
31.6.6TIM event generation register (TIM_EGR) .....1076
31.6.7TIM capture/compare mode register 1 (TIM_CCMR1) .....1077
31.6.8TIM capture/compare mode register 1 [alternate] (TIM_CCMR1) ...1079
31.6.9TIM capture/compare mode register 2 (TIM_CCMR2) .....1083
31.6.10TIM capture/compare mode register 2 [alternate] (TIM_CCMR2) ...1085
31.6.11TIM capture/compare enable register (TIM_CCER) .....1088
31.6.12TIM counter (TIM_CNT) .....1092
31.6.13TIM prescaler (TIM_PSC) .....1092
31.6.14TIM autoreload register (TIM_ARR) .....1093
31.6.15TIM repetition counter register (TIM_RCR) .....1093
31.6.16TIM capture/compare register 1 (TIM_CCR1) .....1094
31.6.17TIM capture/compare register 2 (TIM_CCR2) .....1094
31.6.18TIM capture/compare register 3 (TIM_CCR3) .....1095
31.6.19TIM capture/compare register 4 (TIM_CCR4) .....1096
31.6.20TIM break and dead-time register (TIM_BDTR) .....1097
31.6.21TIM capture/compare register 5 (TIM_CCR5) .....1101
31.6.22TIM capture/compare register 6 (TIM_CCR6) .....1103
31.6.23TIM capture/compare mode register 3 (TIM_CCMR3) .....1104
31.6.24TIM timer deadtime register 2 (TIM_DTR2) .....1107
31.6.25TIM timer encoder control register (TIM_ECR) .....1108
31.6.26TIM timer input selection register (TIM_TISEL) .....1109
31.6.27TIM alternate function option register 1 (TIM_AF1) .....1110
31.6.28TIM alternate function register 2 (TIM_AF2) .....1115
31.6.29TIM capture/compare register 7 (TIM_CCR7) .....1119
31.6.30TIM capture/compare mode register 4 (TIM_CCMR4) .....1120
31.6.31TIM multilevel protection register 1 (TIM_MPR1) .....1122
31.6.32TIM multilevel protection register 2 (TIM_MPR2) .....1124
31.6.33TIM output override register (TIM_OOR) .....1125
31.6.34TIM DMA control register (TIM_DCR) .....1127
31.6.35TIM DMA address for full transfer (TIM_DMAR) .....1128
31.6.36TIM1/TIM8 register map .....1129
32General-purpose timers(TIM2/TIM3/TIM4/TIM5) .....1133
32.1TIM2/TIM3/TIM4/TIM5 introduction .....1133
32.2TIM2/TIM3/TIM4/TIM5 main features .....1133
32.3TIM2/TIM3/TIM4/TIM5 implementation .....1134
32.4TIM2/TIM3/TIM4/TIM5 functional description .....1135
32.4.1Block diagram .....1135
32.4.2TIM2/TIM3/TIM4/TIM5 pins and internal signals .....1136
32.4.3Time-base unit .....1140
32.4.4Counter modes .....1142
32.4.5External trigger input .....1153
32.4.6Clock selection .....1154
32.4.7Capture/compare channels .....1158
32.4.8Input capture mode .....1160
32.4.9PWM input mode .....1161
32.4.10Forced output mode .....1162
32.4.11Output compare mode .....1162
32.4.12PWM mode .....1164
32.4.13Asymmetric PWM mode .....1172
32.4.14Combined PWM mode .....1174
32.4.15Clock dividers for dead-time generators and digital filters .....1175
32.4.16Clearing the tim_ocxref signal on an external event .....1176
32.4.17One-pulse mode .....1179
32.4.18Retriggerable one-pulse mode .....1181
32.4.19Pulse on compare mode .....1182
32.4.20Encoder interface mode .....1184
32.4.21Encoder with built-in debouncer .....1202
32.4.22Direction bit output .....1204
32.4.23Clock drift measurement .....1204
32.4.24UIF bit remapping .....1205
32.4.25Timer input XOR function .....1205
32.4.26Timers and external trigger synchronization .....1207
32.4.27Timer synchronization .....1210
32.4.28ADC triggers .....1215
32.4.29ADC synchronization .....1217
32.4.30DMA burst mode .....1217
32.4.31TIM2/TIM3/TIM4/TIM5 DMA requests .....1218
32.4.32Debug mode .....1219
32.4.33TIM2/TIM3/TIM4/TIM5 low-power modes .....1219
32.4.34TIM2/TIM3/TIM4/TIM5 interrupts .....1220
32.5TIM2/TIM3/TIM4/TIM5 registers .....1221
32.5.1TIM control register 1 (TIM_CR1) .....1221
32.5.2TIM control register 2 (TIM_CR2) .....1223
32.5.3TIM slave mode control register (TIM_SMCR) .....1226
32.5.4TIM DMA/interrupt enable register (TIM_DIER) .....1230
32.5.5TIM status register (TIM_SR) .....1231
32.5.6TIM event generation register (TIM_EGR) .....1234
32.5.7TIM capture/compare mode register 1 (TIM_CCMR1) .....1235
32.5.8TIM capture/compare mode register 1 [alternate] (TIM_CCMR1) ...1237
32.5.9TIM capture/compare mode register 2 (TIM_CCMR2) .....1239
32.5.10TIM capture/compare mode register 2 [alternate] (TIM_CCMR2) ...1240
32.5.11TIM capture/compare enable register (TIM_CCER) .....1243
32.5.12TIM counter (TIM_CNT) .....1245
32.5.13TIM prescaler (TIM_PSC) .....1245
32.5.14TIM autoreload register (TIM_ARR) .....1246
32.5.15TIM capture/compare register 1 (TIM_CCR1) .....1246
32.5.16TIM capture/compare register 2 (TIM_CCR2) .....1247
32.5.17TIM capture/compare register 3 (TIM_CCR3) .....1248
32.5.18TIM capture/compare register 4 (TIM_CCR4) .....1249
32.5.19TIM timer encoder control register (TIM_ECR) .....1250
32.5.20TIM timer input selection register (TIM_TISEL) .....1251
32.5.21TIM alternate function register 1 (TIM_AF1) .....1252
32.5.22TIM alternate function register 2 (TIM_AF2) .....1253
32.5.23TIM DMA control register (TIM_DCR) .....1254
32.5.24TIM DMA address for full transfer (TIM_DMAR) .....1255
32.5.25TIM2/TIM3/TIM4/TIM5 register map .....1256
33Basic timers (TIM6/TIM7) .....1259
33.1TIM6/TIM7 introduction .....1259
33.2TIM6/TIM7 main features .....1259
33.3TIM6/TIM7 functional description .....1260
33.3.1TIM6/TIM7 block diagram .....1260
33.3.2TIM6/TIM7 internal signals .....1260
33.3.3TIM6/TIM7 clocks .....1261
33.3.4Time-base unit .....1261
33.3.5Counting mode .....1263
33.3.6UIF bit remapping .....1270
33.3.7ADC triggers .....1271
33.3.8ADC synchronization .....1271
33.3.9TIM6/TIM7 DMA requests .....1272
33.3.10Debug mode .....1272
33.3.11TIM6/TIM7 low-power modes .....1272
33.3.12TIM6/TIM7 interrupts .....1272
33.4TIM6/TIM7 registers .....1273
33.4.1TIM control register 1 (TIM_CR1) .....1273
33.4.2TIM control register 2 (TIM_CR2) .....1275
33.4.3TIM DMA/interrupt enable register (TIM_DIER) .....1275
33.4.4TIM status register (TIM_SR) .....1277
33.4.5TIM event generation register (TIM_EGR) .....1277
33.4.6TIM counter (TIM_CNT) .....1278
33.4.7TIM prescaler (TIM_PSC) .....1278
33.4.8TIM autoreload register (TIM_ARR) .....1279
33.4.9TIM6/TIM7 register map .....1280
34General-purpose timers (TIM12) .....1281
34.1TIM12 introduction .....1281
34.2TIM12 main features .....1281
34.3TIM12 functional description .....1282
34.3.1Block diagram .....1282
34.3.2TIM12 pins and internal signals .....1282
34.3.3Time-base unit .....1284
34.3.4Counter modes .....1286
34.3.5Clock selection .....1290
34.3.6Capture/compare channels .....1292
34.3.7Input capture mode .....1294
34.3.8PWM input mode .....1295
34.3.9Forced output mode .....1296
34.3.10Output compare mode .....1297
34.3.11PWM mode .....1298
34.3.12Combined PWM mode .....1303
34.3.13Clock dividers for digital filters .....1304
34.3.14One-pulse mode .....1305
34.3.15Retriggerable one pulse mode .....1306
34.3.16UIF bit remapping .....1307
34.3.17Timer input XOR function .....1307
34.3.18TIM12 external trigger synchronization .....1309
34.3.19Slave mode – combined reset + trigger mode .....1312
34.3.20Slave mode – combined reset + gated mode .....1312
34.3.21Timer synchronization .....1312
34.3.22ADC triggers .....1312
34.3.23ADC synchronization .....1313
34.3.24Debug mode .....1314
34.4TIM12 low-power modes .....1314
34.5TIM12 interrupts .....1314
34.6TIM12 registers .....1314
34.6.1TIM control register 1 (TIM_CR1) .....1315
34.6.2TIM control register 2 (TIM_CR2) .....1316
34.6.3TIM slave mode control register (TIM_SMCR) .....1318
34.6.4TIM interrupt enable register (TIM_DIER) .....1320
34.6.5TIM status register (TIM_SR) .....1321
34.6.6TIM event generation register (TIM_EGR) .....1322
34.6.7TIM capture/compare mode register 1 (TIM_CCMR1) .....1323
34.6.8TIM capture/compare mode register 1 [alternate] (TIM_CCMR1) ...1324
34.6.9TIM capture/compare enable register (TIM_CCER) .....1327
34.6.10TIM counter (TIM_CNT) .....1328
34.6.11TIM prescaler (TIM_PSC) .....1329
34.6.12TIM autoreload register (TIM_ARR) .....1329
34.6.13TIM capture/compare register 1 (TIM_CCR1) .....1330
34.6.14TIM capture/compare register 2 (TIM_CCR2) .....1330
34.6.15TIM timer input selection register (TIM_TISEL) .....1331
34.6.16TIM12 register map .....1332
35General purpose timers (TIM15/TIM16/TIM17) .....1334
35.1TIM15/TIM16/TIM17 introduction .....1334
35.2TIM15 main features .....1334
35.3TIM16/TIM17 main features .....1335
35.4TIM15/TIM16/TIM17 implementation .....1335
35.5TIM15/TIM16/TIM17 functional description .....1336
35.5.1Block diagram .....1336
35.5.2TIM15/TIM16/TIM17 pins and internal signals .....1337
35.5.3Time-base unit .....1341
35.5.4Counter modes .....1343
35.5.5Repetition counter .....1355
35.5.6Clock selection .....1357
35.5.7Capture/compare channels .....1359
35.5.8Input capture mode .....1361
35.5.9PWM input mode (only for TIM15) .....1362
35.5.10Forced output mode .....1363
35.5.11Output compare mode .....1364
35.5.12PWM mode .....1365
35.5.13Asymmetric PWM mode (TIM15 only) .....1372
35.5.14Combined PWM mode (TIM15 only) .....1373
35.5.15Complementary outputs and dead-time insertion1374
35.5.16Clock dividers for dead-time generators and digital filters1377
35.5.17Using the break function1377
35.5.18Delayed break1382
35.5.19Bidirectional break input1384
35.5.20Output idle state override1386
35.5.21Clearing the tim_ocxref signal on an external event1386
35.5.226-step PWM generation1388
35.5.23One-pulse mode1390
35.5.24Retriggerable one pulse mode (TIM15 only)1391
35.5.25Encoder interface mode1392
35.5.26Encoder with built-in debouncer (TIM15 only)1399
35.5.27Clock drift measurement1400
35.5.28UIF bit remapping1401
35.5.29Timer input XOR function (TIM15 only)1401
35.5.30External trigger synchronization (TIM15 only)1403
35.5.31Slave mode – combined reset + trigger mode (TIM15 only)1406
35.5.32Slave mode – combined reset + gated mode (TIM15 only)1406
35.5.33Timer synchronization (TIM15 only)1407
35.5.34Using timer output as trigger for other timers (TIM16/TIM17 only)1407
35.5.35ADC triggers (TIM15 only)1407
35.5.36ADC synchronization (TIM15 only)1408
35.5.37DMA burst mode1408
35.5.38TIM15/TIM16/TIM17 DMA requests1409
35.5.39Debug mode1410
35.6TIM15/TIM16/TIM17 low-power modes1410
35.7TIM15/TIM16/TIM17 interrupts1410
35.8TIM15 registers1412
35.8.1TIM control register 1 (TIM_CR1)1412
35.8.2TIM control register 2 (TIM_CR2)1414
35.8.3TIM slave mode control register (TIM_SMCR)1417
35.8.4TIM DMA/interrupt enable register (TIM_DIER)1420
35.8.5TIM status register (TIM_SR)1421
35.8.6TIM event generation register (TIM_EGR)1423
35.8.7TIM capture/compare mode register 1 (TIM_CCMR1)1424
35.8.8TIM capture/compare mode register 1 [alternate] (TIM_CCMR1)1426
35.8.9TIM capture/compare enable register (TIM_CCER)1429
35.8.10TIM counter (TIM_CNT) . . . . .1432
35.8.11TIM prescaler (TIM_PSC) . . . . .1432
35.8.12TIM autoreload register (TIM_ARR) . . . . .1432
35.8.13TIM repetition counter register (TIM_RCR) . . . . .1433
35.8.14TIM capture/compare register 1 (TIM_CCR1) . . . . .1433
35.8.15TIM capture/compare register 2 (TIM_CCR2) . . . . .1435
35.8.16TIM break and dead-time register (TIM_BDTR) . . . . .1435
35.8.17TIM timer deadtime register 2 (TIM_DTR2) . . . . .1438
35.8.18TIM input selection register (TIM_TISEL) . . . . .1439
35.8.19TIM alternate function register 1 (TIM_AF1) . . . . .1440
35.8.20TIM alternate function register 2 (TIM_AF2) . . . . .1444
35.8.21TIM multilevel protection register 1 (TIM_MPR1) . . . . .1445
35.8.22TIM multilevel protection register 2 (TIM_MPR2) . . . . .1445
35.8.23TIM output override register (TIM_OOR) . . . . .1446
35.8.24TIM DMA control register (TIM_DCR) . . . . .1447
35.8.25TIM DMA address for full transfer (TIM_DMAR) . . . . .1448
35.8.26TIM15 register map . . . . .1449
35.9TIM16/TIM17 registers . . . . .1452
35.9.1TIM control register 1 (TIM_CR1) . . . . .1452
35.9.2TIM control register 2 (TIM_CR2) . . . . .1454
35.9.3TIM DMA/interrupt enable register (TIM_DIER) . . . . .1455
35.9.4TIM status register (TIM_SR) . . . . .1456
35.9.5TIM event generation register (TIM_EGR) . . . . .1457
35.9.6TIM capture/compare mode register 1 (TIM_CCMR1) . . . . .1458
35.9.7TIM capture/compare mode register 1 [alternate] (TIM_CCMR1) . . . . .1459
35.9.8TIM capture/compare enable register (TIM_CCER) . . . . .1461
35.9.9TIM counter (TIM_CNT) . . . . .1464
35.9.10TIM prescaler (TIM_PSC) . . . . .1464
35.9.11TIM auto-reautoreload register (TIM_ARR) . . . . .1465
35.9.12TIM repetition counter register (TIM_RCR) . . . . .1465
35.9.13TIM capture/compare register 1 (TIM_CCR1) . . . . .1466
35.9.14TIM break and dead-time register (TIM_BDTR) . . . . .1467
35.9.15TIM timer deadtime register 2 (TIM_DTR2) . . . . .1470
35.9.16TIM input selection register (TIM_TISEL) . . . . .1471
35.9.17TIM alternate function register 1 (TIM_AF1) . . . . .1471
35.9.18TIM alternate function register 2 (TIM_AF2) . . . . .1475
35.9.19TIM multilevel protection register 1 (TIM_MPR1) . . . . .1476
35.9.20TIM multilevel protection register 2 (TIM_MPR2) .....1477
35.9.21TIM output override register (TIM_OOR) .....1477
35.9.22TIM DMA control register (TIM_DCR) .....1478
35.9.23TIM DMA address for full transfer (TIM_DMAR) .....1479
35.9.24TIM16/TIM17 register map .....1480
36Low-power timer (LPTIM) .....1483
36.1LPTIM introduction .....1483
36.2LPTIM main features .....1483
36.3LPTIM implementation .....1483
36.4LPTIM functional description .....1485
36.4.1LPTIM block diagram .....1485
36.4.2LPTIM pins and internal signals .....1485
36.4.3LPTIM input and trigger mapping .....1487
36.4.4LPTIM reset and clocks .....1488
36.4.5Glitch filter .....1488
36.4.6Prescaler .....1489
36.4.7Trigger multiplexer .....1489
36.4.8Operating mode .....1490
36.4.9Timeout function .....1492
36.4.10Waveform generation .....1492
36.4.11Register update .....1493
36.4.12Counter mode .....1494
36.4.13Timer enable .....1495
36.4.14Timer counter reset .....1495
36.4.15Encoder mode .....1496
36.4.16Repetition counter .....1497
36.4.17Capture/compare channels .....1498
36.4.18Input capture mode .....1499
36.4.19PWM mode .....1501
36.4.20DMA requests .....1503
36.4.21Debug mode .....1504
36.5LPTIM low-power modes .....1504
36.6LPTIM interrupts .....1504
36.7LPTIM registers .....1505
36.7.1LPTIM1 interrupt and status register [alternate] (LPTIM1_ISR) ....1506
36.7.2LPTIM1 interrupt and status register [alternate] (LPTIM1_ISR) . . . .1508
36.7.3LPTIM1 interrupt clear register [alternate] (LPTIM1_ICR) . . . . .1510
36.7.4LPTIM1 interrupt clear register [alternate] (LPTIM1_ICR) . . . . .1511
36.7.5LPTIM1 interrupt enable register [alternate] (LPTIM1_DIER) . . . . .1513
36.7.6LPTIM1 interrupt enable register [alternate] (LPTIM1_DIER) . . . . .1514
36.7.7LPTIM configuration register (LPTIM_CFGR) . . . . .1516
36.7.8LPTIM control register (LPTIM_CR) . . . . .1518
36.7.9LPTIM compare register 1 (LPTIM_CCR1) . . . . .1519
36.7.10LPTIM autoreload register (LPTIM_ARR) . . . . .1520
36.7.11LPTIM counter register (LPTIM_CNT) . . . . .1520
36.7.12LPTIM configuration register 2 (LPTIM_CFGR2) . . . . .1521
36.7.13LPTIM repetition register (LPTIM_RCR) . . . . .1522
36.7.14LPTIM capture/compare mode register 1 (LPTIM_CCMR1) . . . . .1523
36.7.15LPTIM compare register 2 (LPTIM_CCR2) . . . . .1525
36.7.16LPTIM register map . . . . .1526
37Independent watchdog (IWDG) . . . . .1528
37.1IWDG introduction . . . . .1528
37.2IWDG main features . . . . .1528
37.3IWDG implementation . . . . .1528
37.4IWDG functional description . . . . .1529
37.4.1IWDG block diagram . . . . .1529
37.4.2IWDG internal signals . . . . .1530
37.4.3Software and hardware watchdog modes . . . . .1530
37.4.4Window option . . . . .1531
37.4.5Debug . . . . .1534
37.4.6Register access protection . . . . .1534
37.5IWDG low power modes . . . . .1535
37.6IWDG interrupts . . . . .1535
37.7IWDG registers . . . . .1537
37.7.1IWDG key register (IWDG_KR) . . . . .1538
37.7.2IWDG prescaler register (IWDG_PR) . . . . .1538
37.7.3IWDG reload register (IWDG_RLR) . . . . .1539
37.7.4IWDG status register (IWDG_SR) . . . . .1539
37.7.5IWDG window register (IWDG_WINR) . . . . .1541
37.7.6IWDG early wake-up interrupt register (IWDG_EWCR) . . . . .1541
37.7.7IWDG interrupt clear register (IWDG_ICR) .....1542
37.7.8IWDG register map .....1543
38System window watchdog (WWDG) .....1544
38.1WWDG introduction .....1544
38.2WWDG main features .....1544
38.3WWDG implementation .....1544
38.4WWDG functional description .....1545
38.4.1WWDG block diagram .....1545
38.4.2WWDG internal signals .....1545
38.4.3Enabling the watchdog .....1546
38.4.4Controlling the down-counter .....1546
38.4.5How to program the watchdog timeout .....1546
38.4.6Debug mode .....1547
38.5WWDG interrupts .....1548
38.6WWDG registers .....1548
38.6.1WWDG control register (WWDG_CR) .....1548
38.6.2WWDG configuration register (WWDG_CFR) .....1549
38.6.3WWDG status register (WWDG_SR) .....1550
38.6.4WWDG register map .....1550
39Real-time clock (RTC) .....1551
39.1RTC introduction .....1551
39.2RTC main features .....1551
39.3RTC functional description .....1551
39.3.1RTC block diagram .....1551
39.3.2RTC pins and internal signals .....1553
39.3.3GPIOs controlled by the RTC and TAMP .....1554
39.3.4RTC privilege protection modes .....1556
39.3.5Clock and prescalers .....1557
39.3.6Real-time clock and calendar .....1558
39.3.7Calendar ultra-low power mode .....1559
39.3.8Programmable alarms .....1559
39.3.9Periodic auto-wake-up .....1559
39.3.10RTC initialization and configuration .....1560
39.3.11Reading the calendar .....1563
39.3.12Resetting the RTC1564
39.3.13RTC synchronization1565
39.3.14RTC reference clock detection1565
39.3.15RTC smooth digital calibration1566
39.3.16Timestamp function1568
39.3.17Calibration clock output1569
39.3.18Tamper and alarm output1569
39.4RTC low-power modes1570
39.5RTC interrupts1570
39.6RTC registers1571
39.6.1RTC time register (RTC_TR)1571
39.6.2RTC date register (RTC_DR)1572
39.6.3RTC subsecond register (RTC_SSR)1573
39.6.4RTC initialization control and status register (RTC_ICSR)1573
39.6.5RTC prescaler register (RTC_PRER)1575
39.6.6RTC wake-up timer register (RTC_WUTR)1576
39.6.7RTC control register (RTC_CR)1576
39.6.8RTC privilege mode control register (RTC_PRIVCFGR)1580
39.6.9RTC write protection register (RTC_WPR)1582
39.6.10RTC calibration register (RTC_CALR)1582
39.6.11RTC shift control register (RTC_SHIFTR)1584
39.6.12RTC timestamp time register (RTC_TSTR)1585
39.6.13RTC timestamp date register (RTC_TSDR)1586
39.6.14RTC timestamp subsecond register (RTC_TSSSR)1586
39.6.15RTC alarm A register (RTC_ALRMAR)1587
39.6.16RTC alarm A subsecond register (RTC_ALRMASSR)1588
39.6.17RTC alarm B register (RTC_ALRMBR)1589
39.6.18RTC alarm B subsecond register (RTC_ALRMBSSR)1590
39.6.19RTC status register (RTC_SR)1591
39.6.20RTC masked interrupt status register (RTC_MISR)1592
39.6.21RTC status clear register (RTC_SCR)1593
39.6.22RTC alarm A binary mode register (RTC_ALRABINR)1594
39.6.23RTC alarm B binary mode register (RTC_ALRBBINR)1594
39.6.24RTC register map1595
40Tamper and backup registers (TAMP)1597
40.1TAMP introduction1597
40.2TAMP main features . . . . .1597
40.3TAMP functional description . . . . .1598
40.3.1TAMP block diagram . . . . .1598
40.3.2TAMP pins and internal signals . . . . .1599
40.3.3GPIOs controlled by the RTC and TAMP . . . . .1600
40.3.4TAMP register write protection . . . . .1600
40.3.5Backup registers protection zones . . . . .1601
40.3.6TAMP privilege protection modes . . . . .1601
40.3.7Tamper detection . . . . .1602
40.3.8TAMP backup registers and other device secrets erase . . . . .1602
40.3.9Tamper detection configuration and initialization . . . . .1603
40.4TAMP low-power modes . . . . .1606
40.5TAMP interrupts . . . . .1606
40.6TAMP registers . . . . .1606
40.6.1TAMP control register 1 (TAMP_CR1) . . . . .1606
40.6.2TAMP control register 2 (TAMP_CR2) . . . . .1608
40.6.3TAMP control register 3 (TAMP_CR3) . . . . .1610
40.6.4TAMP filter control register (TAMP_FLTCR) . . . . .1611
40.6.5TAMP configuration register (TAMP_CFGR) . . . . .1612
40.6.6TAMP privilege configuration register (TAMP_PRIVCFGR) . . . . .1613
40.6.7TAMP interrupt enable register (TAMP_IER) . . . . .1614
40.6.8TAMP status register (TAMP_SR) . . . . .1616
40.6.9TAMP masked interrupt status register (TAMP_MISR) . . . . .1617
40.6.10TAMP status clear register (TAMP_SCR) . . . . .1619
40.6.11TAMP option register (TAMP_OR) . . . . .1620
40.6.12TAMP backup x register (TAMP_BKPxR) . . . . .1621
40.6.13TAMP register map . . . . .1622
41Inter-integrated circuit interface (I2C) . . . . .1624
41.1I2C introduction . . . . .1624
41.2I2C main features . . . . .1624
41.3I2C implementation . . . . .1625
41.4I2C functional description . . . . .1625
41.4.1I2C block diagram . . . . .1626
41.4.2I2C pins and internal signals . . . . .1626
41.4.3I2C clock requirements . . . . .1627
41.4.4I2C mode selection .....1627
41.4.5I2C initialization .....1628
41.4.6I2C reset .....1632
41.4.7I2C data transfer .....1633
41.4.8I2C target mode .....1635
41.4.9I2C controller mode .....1644
41.4.10I2C_TIMINGR register configuration examples .....1655
41.4.11SMBus specific features .....1657
41.4.12SMBus initialization .....1659
41.4.13SMBus I2C_TIMEOUTR register configuration examples .....1661
41.4.14SMBus target mode .....1662
41.4.15SMBus controller mode .....1665
41.4.16Wake-up from Stop mode on address match .....1668
41.4.17Error conditions .....1669
41.5I2C in low-power modes .....1671
41.6I2C interrupts .....1671
41.7I2C DMA requests .....1672
41.7.1Transmission using DMA .....1672
41.7.2Reception using DMA .....1672
41.8I2C debug modes .....1672
41.9I2C registers .....1673
41.9.1I2C control register 1 (I2C_CR1) .....1673
41.9.2I2C control register 2 (I2C_CR2) .....1676
41.9.3I2C own address 1 register (I2C_OAR1) .....1678
41.9.4I2C own address 2 register (I2C_OAR2) .....1678
41.9.5I2C timing register (I2C_TIMINGR) .....1679
41.9.6I2C timeout register (I2C_TIMEOUTR) .....1680
41.9.7I2C interrupt and status register (I2C_ISR) .....1681
41.9.8I2C interrupt clear register (I2C_ICR) .....1684
41.9.9I2C PEC register (I2C_PECR) .....1685
41.9.10I2C receive data register (I2C_RXDR) .....1685
41.9.11I2C transmit data register (I2C_TXDR) .....1686
41.9.12I2C register map .....1687
42Improved inter-integrated circuit (I3C) .....1688
42.1I3C introduction .....1688
42.2I3C main features .....1688
42.3I3C implementation .....1690
42.3.1I3C instantiation .....1690
42.3.2I3C wake-up from low-power mode(s) .....1690
42.3.3I3C FIFOs .....1690
42.3.4I3C triggers .....1690
42.3.5I3C interrupt(s) .....1690
42.3.6I3C MIPI® support .....1691
42.4I3C block diagram .....1692
42.5I3C pins and internal signals .....1692
42.6I3C reset and clocks .....1693
42.6.1I3C reset .....1693
42.6.2I3C clocks and requirements .....1693
42.7I3C peripheral state and programming .....1695
42.7.1I3C peripheral state .....1695
42.7.2I3C controller state and programming sequence .....1696
42.7.3I3C target state and programming sequence .....1701
42.8I3C registers and programming .....1705
42.8.1I3C register set, as controller/target .....1705
42.8.2I3C registers and fields use versus peripheral state, as controller ..1706
42.8.3I3C registers and fields usage versus peripheral state, as target ..1709
42.9I3C bus transfers and programming .....1711
42.9.1I3C command set (CCCs), as controller/target .....1711
42.9.2I3C broadcast/direct CCC transfer (except ENTDA, RSTACT),
as controller .....
1715
42.9.3I3C broadcast ENTDA CCC transfer, as controller .....1717
42.9.4I3C broadcast/direct RSTACT CCC transfer, as controller .....1717
42.9.5I3C broadcast/direct CCC transfer
(except ENTDA, DEFTGTS, DEFGRPA), as target .....
1719
42.9.6I3C broadcast ENTDA CCC transfer, as target .....1721
42.9.7I3C broadcast DEFTGTS CCC transfer, as target .....1722
42.9.8I3C broadcast DEFGRPA CCC transfer, as target .....1723
42.9.9I3C direct GETSTATUS CCC response, as target .....1724
42.9.10I3C private read/write transfer, as controller .....1725
42.9.11I3C private read/write transfer, as target .....1726
42.9.12Legacy I2C read/write transfer, as controller .....1727
42.9.13I3C IBI transfer, as controller/target .....1728
42.9.14I3C hot-join request transfer, as controller/target1729
42.9.15I3C controller-role request transfer, as controller/target1730
42.10I3C FIFOs management, as controller1731
42.10.1C-FIFO management, as controller1731
42.10.2TX-FIFO management, as controller1732
42.10.3RX-FIFO management, as controller1735
42.10.4S-FIFO management, as controller1737
42.11I3C FIFOs management, as target1739
42.11.1RX-FIFO management, as target1739
42.11.2TX-FIFO management, as target1740
42.12I3C error management1743
42.12.1Controller error management1743
42.12.2Target error management1745
42.13I3C wake-up from low-power mode(s)1746
42.13.1Wake-up from Stop1746
42.14I3C in low-power modes1749
42.15I3C interrupts1750
42.16I3C registers1750
42.16.1I3C message control register (I3C_CR)1750
42.16.2I3C message control register [alternate] (I3C_CR)1752
42.16.3I3C configuration register (I3C_CFGR)1754
42.16.4I3C receive data byte register (I3C_RDR)1759
42.16.5I3C receive data word register (I3C_RDWR)1760
42.16.6I3C transmit data byte register (I3C_TDR)1761
42.16.7I3C transmit data word register (I3C_TDWR)1762
42.16.8I3C IBI payload data register (I3C_IBIDR)1763
42.16.9I3C target transmit configuration register (I3C_TGTTDR)1764
42.16.10I3C status register (I3C_SR)1765
42.16.11I3C status error register (I3C_SER)1766
42.16.12I3C received message register (I3C_RMR)1768
42.16.13I3C event register (I3C_EVR)1769
42.16.14I3C interrupt enable register (I3C_IER)1773
42.16.15I3C clear event register (I3C_CEV)1775
42.16.16I3C masked interrupt status register (I3C_MISR)1777
42.16.17I3C own device characteristics register (I3C_DEVR0)1778
42.16.18I3C device x characteristics register (I3C_DEVRx)1780
42.16.19I3C maximum read length register (I3C_MAXRLR) . . . . .1782
42.16.20I3C maximum write length register (I3C_MAXWLR) . . . . .1783
42.16.21I3C timing register 0 (I3C_TIMINGR0) . . . . .1784
42.16.22I3C timing register 1 (I3C_TIMINGR1) . . . . .1785
42.16.23I3C timing register 2 (I3C_TIMINGR2) . . . . .1787
42.16.24I3C bus characteristics register (I3C_BCR) . . . . .1788
42.16.25I3C device characteristics register (I3C_DCR) . . . . .1789
42.16.26I3C get capability register (I3C_GETCAPR) . . . . .1790
42.16.27I3C controller-role capability register (I3C_CRCAPR) . . . . .1791
42.16.28I3C get max data speed register (I3C_GETMXDSR) . . . . .1792
42.16.29I3C extended provisioned ID register (I3C_EPIDR) . . . . .1794
42.16.30I3C register map . . . . .1795
43Universal synchronous/asynchronous receiver
transmitter (USART/UART) . . . . .
1798
43.1USART introduction . . . . .1798
43.2USART main features . . . . .1798
43.3USART extended features . . . . .1799
43.4USART implementation . . . . .1799
43.5USART functional description . . . . .1801
43.5.1USART block diagram . . . . .1801
43.5.2USART pins and internal signals . . . . .1801
43.5.3USART clocks . . . . .1803
43.5.4USART character description . . . . .1803
43.5.5USART FIFOs and thresholds . . . . .1806
43.5.6USART transmitter . . . . .1806
43.5.7USART receiver . . . . .1809
43.5.8USART baud rate generation . . . . .1816
43.5.9Tolerance of the USART receiver to clock deviation . . . . .1818
43.5.10USART auto baud rate detection . . . . .1819
43.5.11USART multiprocessor communication . . . . .1821
43.5.12USART Modbus communication . . . . .1823
43.5.13USART parity control . . . . .1824
43.5.14USART LIN (local interconnection network) mode . . . . .1825
43.5.15USART synchronous mode . . . . .1827
43.5.16USART single-wire half-duplex communication . . . . .1831
43.5.17USART receiver timeout . . . . .1831
43.5.18USART smartcard mode1832
43.5.19USART IrDA SIR ENDEC block1836
43.5.20Continuous communication using USART and DMA1839
43.5.21RS232 hardware flow control and RS485 driver enable1841
43.5.22USART low-power management1844
43.6USART in low-power modes1847
43.7USART interrupts1847
43.8USART registers1850
43.8.1USART control register 1 (USART_CR1)1850
43.8.2USART control register 1 [alternate] (USART_CR1)1854
43.8.3USART control register 2 (USART_CR2)1857
43.8.4USART control register 3 (USART_CR3)1861
43.8.5USART control register 3 [alternate] (USART_CR3)1865
43.8.6USART baud rate register (USART_BRR)1868
43.8.7USART guard time and prescaler register (USART_GTPR)1869
43.8.8USART receiver timeout register (USART_RTOR)1870
43.8.9USART request register (USART_RQR)1871
43.8.10USART interrupt and status register (USART_ISR)1872
43.8.11USART interrupt and status register [alternate] (USART_ISR)1878
43.8.12USART interrupt flag clear register (USART_ICR)1883
43.8.13USART receive data register (USART_RDR)1884
43.8.14USART transmit data register (USART_TDR)1885
43.8.15USART prescaler register (USART_PRESC)1885
43.8.16USART register map1886
44Low-power universal asynchronous receiver transmitter (LPUART)1888
44.1LPUART introduction1888
44.2LPUART main features1888
44.3LPUART implementation1889
44.4LPUART functional description1891
44.4.1LPUART block diagram1891
44.4.2LPUART pins and internal signals1892
44.4.3LPUART clocks1893
44.4.4LPUART character description1893
44.4.5LPUART FIFOs and thresholds1895
44.4.6LPUART transmitter .....1895
44.4.7LPUART receiver .....1899
44.4.8LPUART baud rate generation .....1903
44.4.9Tolerance of the LPUART receiver to clock deviation .....1904
44.4.10LPUART multiprocessor communication .....1905
44.4.11LPUART parity control .....1907
44.4.12LPUART single-wire half-duplex communication .....1908
44.4.13Continuous communication using DMA and LPUART .....1908
44.4.14RS232 hardware flow control and RS485 driver enable .....1911
44.4.15LPUART low-power management .....1913
44.5LPUART in low-power modes .....1916
44.6LPUART interrupts .....1917
44.7LPUART registers .....1918
44.7.1LPUART control register 1 (LPUART_CR1) .....1918
44.7.2LPUART control register 1 [alternate] (LPUART_CR1) .....1921
44.7.3LPUART control register 2 (LPUART_CR2) .....1924
44.7.4LPUART control register 3 (LPUART_CR3) .....1926
44.7.5LPUART control register 3 [alternate] (LPUART_CR3) .....1929
44.7.6LPUART baud rate register (LPUART_BRR) .....1931
44.7.7LPUART request register (LPUART_RQR) .....1931
44.7.8LPUART interrupt and status register (LPUART_ISR) .....1932
44.7.9LPUART interrupt and status register [alternate] (LPUART_ISR) ...1937
44.7.10LPUART interrupt flag clear register (LPUART_ICR) .....1940
44.7.11LPUART receive data register (LPUART_RDR) .....1941
44.7.12LPUART transmit data register (LPUART_TDR) .....1941
44.7.13LPUART prescaler register (LPUART_PRESC) .....1942
44.7.14LPUART register map .....1943
45Serial peripheral interface (SPI) .....1945
45.1SPI introduction .....1945
45.2SPI main features .....1945
45.3SPI implementation .....1946
45.4SPI functional description .....1947
45.4.1SPI block diagram .....1947
45.4.2SPI pins and internal signals .....1948
45.4.3SPI communication general aspects .....1949
45.4.4Communications between one master and one slave .....1949
45.4.5Standard multislave communication .....1952
45.4.6Multimaster communication .....1955
45.4.7Slave select (NSS pin) management .....1956
45.4.8Ready pin (RDY) management .....1960
45.4.9Communication formats .....1960
45.4.10Configuring the SPI .....1962
45.4.11Enabling the SPI .....1963
45.4.12SPI data transmission and reception procedures .....1964
45.4.13Disabling the SPI .....1968
45.4.14Communication using DMA (direct memory addressing) .....1969
45.5SPI specific modes and control .....1971
45.5.1TI mode .....1971
45.5.2SPI error flags .....1971
45.5.3CRC computation .....1975
45.6SPI in low-power modes .....1976
45.7SPI interrupts .....1976
45.8I2S main features .....1978
45.9I2S functional description .....1978
45.9.1I2S general description .....1978
45.9.2Pin sharing with SPI function .....1979
45.9.3Bitfields usable in I2S/PCM mode .....1979
45.9.4Slave and master modes .....1980
45.9.5Supported audio protocols .....1980
45.9.6Additional serial interface flexibility .....1986
45.9.7Startup sequence .....1988
45.9.8Stop sequence .....1990
45.9.9Clock generator .....1991
45.9.10Internal FIFOs .....1993
45.9.11FIFO status flags .....1994
45.9.12Handling of underrun situation .....1994
45.9.13Handling of overrun situation .....1995
45.9.14Frame error detection .....1996
45.9.15DMA interface .....1998
45.9.16Programing examples .....1998
45.10I2S interrupts .....2000
45.11SPI/I2S registers2001
45.11.1SPI/I2S control register 1 (SPI_CR1)2001
45.11.2SPI/I2S control register 2 (SPI_CR2)2003
45.11.3SPI/I2S configuration register 1 (SPI_CFG1)2003
45.11.4SPI/I2S configuration register 2 (SPI_CFG2)2007
45.11.5SPI/I2S interrupt enable register (SPI_IER)2009
45.11.6SPI/I2S status register (SPI_SR)2010
45.11.7SPI/I2S interrupt/status flags clear register (SPI_IFCR)2013
45.11.8SPI/I2S transmit data register (SPI_TXDR)2014
45.11.9SPI/I2S receive data register (SPI_RXDR)2014
45.11.10SPI/I2S polynomial register (SPI_CRCPOLY)2015
45.11.11SPI/I2S transmitter CRC register (SPI_TXCRC)2015
45.11.12SPI/I2S receiver CRC register (SPI_RXCRC)2016
45.11.13SPI/I2S underrun data register (SPI_UDRDR)2017
45.11.14SPI/I2S configuration register (SPI_I2SCFGR)2017
45.11.15SPI/I2S register map2019
46FD controller area network (FDCAN)2021
46.1FDCAN introduction2021
46.2FDCAN main features2023
46.3FDCAN implementation2023
46.4FDCAN functional description2024
46.4.1FDCAN block diagram2024
46.4.2FDCAN pins and internal signals2025
46.4.3Bit timing2026
46.4.4Operating modes2027
46.4.5Error management2036
46.4.6Message RAM2037
46.4.7FIFO acknowledge handling2046
46.4.8FDCAN Rx FIFO element2046
46.4.9FDCAN Tx buffer element2048
46.4.10FDCAN Tx event FIFO element2050
46.4.11FDCAN standard message ID filter element2051
46.4.12FDCAN extended message ID filter element2052
46.5FDCAN registers2054
46.5.1FDCAN core release register (FDCAN_CREL)2054
46.5.2FDCAN endian register (FDCAN_ENDN) .....2054
46.5.3FDCAN data bit timing and prescaler register (FDCAN_DBTP) ....2054
46.5.4FDCAN test register (FDCAN_TEST) .....2055
46.5.5FDCAN RAM watchdog register (FDCAN_RWD) .....2056
46.5.6FDCAN CC control register (FDCAN_CCCR) .....2057
46.5.7FDCAN nominal bit timing and prescaler register (FDCAN_NBTP) ..2058
46.5.8FDCAN timestamp counter configuration register (FDCAN_TSCC) ..2060
46.5.9FDCAN timestamp counter value register (FDCAN_TSCV) .....2060
46.5.10FDCAN timeout counter configuration register (FDCAN_TOCC) ....2061
46.5.11FDCAN timeout counter value register (FDCAN_TOCV) .....2062
46.5.12FDCAN error counter register (FDCAN_ECR) .....2062
46.5.13FDCAN protocol status register (FDCAN_PSR) .....2063
46.5.14FDCAN transmitter delay compensation register (FDCAN_TDCR) ..2065
46.5.15FDCAN interrupt register (FDCAN_IR) .....2065
46.5.16FDCAN interrupt enable register (FDCAN_IE) .....2068
46.5.17FDCAN interrupt line select register (FDCAN_ILS) .....2070
46.5.18FDCAN interrupt line enable register (FDCAN_ILE) .....2071
46.5.19FDCAN global filter configuration register (FDCAN_RXGFC) .....2071
46.5.20FDCAN extended ID and mask register (FDCAN_XIDAM) .....2073
46.5.21FDCAN high-priority message status register (FDCAN_HPMS) ....2073
46.5.22FDCAN Rx FIFO 0 status register (FDCAN_RXF0S) .....2074
46.5.23CAN Rx FIFO 0 acknowledge register (FDCAN_RXF0A) .....2075
46.5.24FDCAN Rx FIFO 1 status register (FDCAN_RXF1S) .....2075
46.5.25FDCAN Rx FIFO 1 acknowledge register (FDCAN_RXF1A) .....2076
46.5.26FDCAN Tx buffer configuration register (FDCAN_TXBC) .....2076
46.5.27FDCAN Tx FIFO/queue status register (FDCAN_TXFQS) .....2077
46.5.28FDCAN Tx buffer request pending register (FDCAN_TXBRP) ....2077
46.5.29FDCAN Tx buffer add request register (FDCAN_TXBAR) .....2078
46.5.30FDCAN Tx buffer cancellation request register (FDCAN_TXBCR) ..2079
46.5.31FDCAN Tx buffer transmission occurred register (FDCAN_TXBTO)2079
46.5.32FDCAN Tx buffer cancellation finished register (FDCAN_TXBCF) ..2080
46.5.33FDCAN Tx buffer transmission interrupt enable register
(FDCAN_TXBTIE) .....
2080
46.5.34FDCAN Tx buffer cancellation finished interrupt enable register
(FDCAN_TXBCIE) .....
2081
46.5.35FDCAN Tx event FIFO status register (FDCAN_TXEFS) .....2081
46.5.36FDCAN Tx event FIFO acknowledge register (FDCAN_TXEFA) ....2082
46.5.37FDCAN CFG clock divider register (FDCAN_CKDIV) .....2082
46.5.38FDCAN register map .....2083
47Universal serial bus full-speed host/device interface (USB) .....2087
47.1USB introduction .....2087
47.2USB main features .....2087
47.3USB implementation .....2087
47.4USB functional description .....2088
47.4.1USB block diagram .....2088
47.4.2USB pins and internal signals .....2088
47.4.3USB reset and clocks .....2089
47.4.4General description and Device mode functionality .....2089
47.4.5Description of USB blocks used in both Device and Host modes .....2090
47.4.6Description of host frame scheduler (HFS) specific to Host mode .....2091
47.5Programming considerations for Device and Host modes .....2092
47.5.1Generic USB Device programming .....2092
47.5.2System and power-on reset .....2092
47.5.3Double-buffered endpoints and usage in Device mode .....2099
47.5.4Double buffered channels: usage in Host mode .....2101
47.5.5Isochronous transfers in Device mode .....2102
47.5.6Isochronous transfers in Host mode .....2103
47.5.7Suspend/resume events .....2104
47.6USB registers .....2107
47.6.1USB control register (USB_CNTR) .....2108
47.6.2USB interrupt status register (USB_ISTR) .....2111
47.6.3USB frame number register (USB_FNR) .....2115
47.6.4USB Device address (USB_DADDR) .....2115
47.6.5USB LPM control and status register (USB_LPMCSR) .....2116
47.6.6USB battery charging detector (USB_BCDR) .....2117
47.6.7USB endpoint/channel n register (USB_CHEPnR) .....2118
47.7USBSRAM registers .....2127
47.7.1Channel/endpoint transmit buffer descriptor n
(USBSRAM_CHEP_TXRXBD_n) .....
2128
47.7.2Channel/endpoint receive buffer descriptor n [alternate]
(USBSRAM_CHEP_TXRXBD_n) .....
2128
47.7.3Channel/endpoint receive buffer descriptor n
(USBSRAM_CHEP_RXTXBD_n) .....
2130
47.7.4Channel/endpoint transmit buffer descriptor n [alternate]
(USBSRAM_CHEP_RXTXBD_n) .....
2131
47.7.5USBSRAM register map .....2132
48Ethernet (ETH): media access control
(MAC) with DMA controller .....
2133
48.1Ethernet introduction .....2133
48.2Ethernet main features .....2133
48.2.1Standard compliance .....2133
48.2.2MAC features .....2133
48.2.3Transaction layer (MTL) features .....2135
48.2.4DMA block features .....2136
48.2.5Bus interface features .....2136
48.3Ethernet pins and internal signals .....2137
48.4Ethernet architecture .....2139
48.4.1DMA controller .....2140
48.4.2MTL .....2148
48.4.3MAC .....2148
48.5Ethernet functional description: MAC .....2153
48.5.1Double VLAN processing .....2153
48.5.2Source address and VLAN insertion, replacement, or deletion .....2154
48.5.3Packet filtering .....2156
48.5.4IEEE 1588 timestamp support .....2163
48.5.5Checksum offload engine .....2187
48.5.6TCP segmentation offload .....2193
48.5.7IPv4 ARP offload .....2199
48.5.8Loopback .....2200
48.5.9Flow control .....2201
48.5.10MAC management counters .....2203
48.5.11Interrupts generated by the MAC .....2205
48.5.12MAC and MMC register descriptions .....2205
48.6Ethernet functional description: PHY interfaces .....2206
48.6.1Station management agent (SMA) .....2206
48.6.2Media independent interface (MII) .....2213
48.6.3Reduced media independent interface (RMII) .....2214
48.7Ethernet low-power modes .....2217
48.7.1Low-power management .....2217
48.7.2Energy-efficient Ethernet (EEE) . . . . .2223
48.8Ethernet interrupts . . . . .2229
48.8.1DMA interrupts . . . . .2229
48.8.2MTL interrupts . . . . .2232
48.8.3MAC interrupts . . . . .2232
48.9Ethernet programming model . . . . .2233
48.9.1DMA initialization . . . . .2234
48.9.2MTL initialization . . . . .2235
48.9.3MAC initialization . . . . .2235
48.9.4Performing normal receive and transmit operation . . . . .2236
48.9.5Stopping and starting transmission . . . . .2237
48.9.6Programming guidelines for switching to new descriptor list
in RxDMA . . . . .
2237
48.9.7Programming guidelines for switching the AHB clock frequency . . . . .2237
48.9.8Programming guidelines for MII link state transitions . . . . .2238
48.9.9Programming guidelines for IEEE 1588 timestamping . . . . .2239
48.9.10Programming guidelines for PTP offload feature . . . . .2240
48.9.11Programming guidelines for Energy Efficient Ethernet (EEE) . . . . .2244
48.9.12Programming guidelines for flexible pulse-per-second (PPS) output . . . . .2246
48.9.13Programming guidelines for IEEE 1588 auxiliary snapshot . . . . .2248
48.9.14Programming guidelines for TSO . . . . .2248
48.9.15Programming guidelines to perform VLAN filtering on the receiver . . . . .2249
48.9.16Programming guidelines for receive idle and
receive interrupt watchdog timers . . . . .
2250
48.10Descriptors . . . . .2251
48.10.1Descriptor overview . . . . .2251
48.10.2Descriptor structure . . . . .2251
48.10.3Transmit descriptor . . . . .2255
48.10.4Receive descriptor . . . . .2267
48.11Ethernet registers . . . . .2280
48.11.1Ethernet register maps . . . . .2280
48.11.2Ethernet DMA registers . . . . .2280
48.11.3Ethernet MTL registers . . . . .2302
48.11.4Ethernet MAC and MMC registers . . . . .2311
49Debug support (DBG) . . . . .2413
49.1DBG introduction . . . . .2413
49.2DBG functional description . . . . .2414
49.2.1DBG block diagram . . . . .2414
49.2.2DBG pins and internal signals . . . . .2414
49.2.3DBG reset and clocks . . . . .2415
49.2.4DBG power domains . . . . .2415
49.2.5Debug and low-power modes . . . . .2415
49.2.6Security . . . . .2416
49.2.7OEMKEY and BSKEY password management . . . . .2417
49.3Serial-wire and JTAG debug port (SWJ-DP) . . . . .2419
49.3.1JTAG debug port . . . . .2420
49.3.2Serial-wire debug port . . . . .2422
49.3.3Debug port registers . . . . .2423
49.4Access ports . . . . .2431
49.4.1Access port registers . . . . .2431
49.5ROM tables . . . . .2438
49.5.1System ROM table registers . . . . .2441
49.5.2MCU ROM table registers . . . . .2445
49.5.3Processor ROM table registers . . . . .2450
49.6Data watchpoint and trace unit (DWT) . . . . .2455
49.6.1DWT registers . . . . .2456
49.7Instrumentation trace macrocell (ITM) . . . . .2472
49.7.1ITM registers . . . . .2472
49.8Breakpoint unit (BPU) . . . . .2481
49.8.1BPU registers . . . . .2481
49.9Embedded trace macrocell (ETM) . . . . .2488
49.9.1ETM registers . . . . .2488
49.10Trace port interface unit (TPIU) . . . . .2514
49.10.1TPIU registers . . . . .2515
49.11Cross-trigger interface (CTI) . . . . .2526
49.11.1CTI registers . . . . .2527
49.12Microcontroller debug unit (DBGMCU) . . . . .2539
49.12.1Device ID . . . . .2540
49.12.2Low-power mode emulation . . . . .2540
49.12.3Peripheral clock freeze . . . . .2540
49.12.4DBGMCU registers . . . . .2541
49.13References . . . . .2557
50Device electronic signature .....2558
50.1 Unique device ID register (96 bits) .....2558
50.2 Flash size data register .....2559
50.3 Package data register .....2559
51Important security notice .....2561
52Revision history .....2562

List of tables

Table 1.Implementation of masters on STM32C5 series. ....87
Table 2.Implementation of slaves on STM32C5 series. ....87
Table 3.Memory map and peripheral register boundary addresses. ....94
Table 4.SRAM sizes. ....98
Table 5.Internal tampers in TAMP. ....102
Table 6.Effect of low-power modes on TAMP. ....103
Table 7.Accelerated cryptographic operations. ....105
Table 8.Main product life cycle transitions. ....107
Table 9.Typical product life cycle phases. ....108
Table 10.OEM RDP unlocking methods. ....109
Table 11.BS RDP locking methods. ....109
Table 12.Summary of protected assets and protection mechanism. ....110
Table 13.STM32C5 boot modes. ....112
Table 14.SRAM density (Kbytes). ....114
Table 15.Internal SRAMs features. ....115
Table 16.SRAM with ECC memory map. ....116
Table 17.Effect of low-power modes on RAMCFG. ....117
Table 18.RAMCFG interrupt requests. ....117
Table 19.RAMCFG register map and reset values. ....124
Table 20.FLASH recommended number of wait states and programming delay. ....132
Table 21.OTP first page organization. ....139
Table 22.Flash memory OTP organization. ....140
Table 23.Read-only public data organization. ....141
Table 24.Memory map and the swapping option (STM32C53x/542 devices). ....143
Table 25.Memory map and the swapping option (STM32C55x/562 devices). ....144
Table 26.Memory map and the swapping option (STM32C59x/5A3 devices). ....145
Table 27.Recommended reactions to FLASH_OPSR contents. ....148
Table 28.Option-byte organization. ....151
Table 29.Write-protection management. ....153
Table 30.Specific OB modifying rules overview. ....154
Table 31.OBs modifiable in L2 product. ....154
Table 32.Secure hide protection. ....157
Table 33.HDP protections summary. ....157
Table 34.FLASH interface register protection summary. ....158
Table 35.RDP levels description. ....160
Table 36.RDP levels transitions. ....161
Table 37.OTP/RO access constraints. ....163
Table 38.C defined macro for HDP services. ....163
Table 39.EXITHDPLib interface function list. ....164
Table 40.Effect of low-power modes on the FLASH. ....165
Table 41.Locating ECC failure. ....169
Table 42.FLASH interrupt request. ....172
Table 43.FLASH register map and reset values. ....202
Table 44.ICACHE features for STM32C5 devices. ....208
Table 45.TAG memory dimensioning parameters
for n-way set associative operating mode (default). ....
210
Table 46.TAG memory dimensioning parameters for direct-mapped cache mode. ....211
Table 47.ICACHE cacheability for AHB transaction. ....213
Table 48.Memory configurations . . . . .213
Table 49.ICACHE remap region size, base address, and remap address . . . . .214
Table 50.ICACHE interrupts . . . . .218
Table 51.ICACHE register map and reset values . . . . .222
Table 52.PWR input/output pins . . . . .224
Table 53.PWR internal input/output signals. . . . .225
Table 54.Low-power mode summary . . . . .230
Table 55.Functionalities depending on the working mode. . . . .231
Table 56.Sleep mode. . . . .235
Table 57.Memory power down block selection . . . . .235
Table 58.Stop 0 mode . . . . .237
Table 59.Stop 1 mode . . . . .239
Table 60.Standby mode. . . . .241
Table 61.Power mode output states versus MCU power modes. . . . .242
Table 62.PWR interrupt requests . . . . .243
Table 63.PWR register map and reset values . . . . .249
Table 64.RCC input/output signals connected to package pins or balls . . . . .251
Table 65.Reset source identification (RCC_RSR). . . . .253
Table 66.PSI frequency settings . . . . .258
Table 67.PSIK and HSIK output frequency . . . . .260
Table 68.HSIKERON and PSIKERON behavior . . . . .263
Table 69.Kernel clock distribution overview. . . . .265
Table 70.Interrupt sources and control . . . . .273
Table 71.RCC register map and reset values . . . . .322
Table 72.CRS features . . . . .327
Table 73.CRS internal input/output signals . . . . .328
Table 74.CRS interconnection. . . . .329
Table 75.Effect of low-power modes on CRS . . . . .332
Table 76.Interrupt control bits . . . . .332
Table 77.CRS register map and reset values . . . . .337
Table 78.Port bit configuration. . . . .340
Table 79.GPIO register map and reset values . . . . .355
Table 80.SBS internal input/output signals . . . . .358
Table 81.HDPL encoded values . . . . .360
Table 82.NEXT-HDPL logic. . . . .361
Table 83.SBS register map and reset values . . . . .369
Table 84.Peripherals interconnect matrix . . . . .372
Table 85.peripheral interconnect matrix details . . . . .374
Table 86.LPDMA1/2 channels implementation . . . . .383
Table 87.LPDMA1 channels implementation. . . . .383
Table 88.LPDMA2 channels implementation. . . . .384
Table 89.LPDMA1/2 autonomous mode and wake-up in low-power modes. . . . .384
Table 90.Programmed LPDMA1/2 request . . . . .384
Table 91.Programmed LPDMA1/2 request as a block request . . . . .387
Table 92.LPDMA1/2 channel with peripheral early termination. . . . .387
Table 93.Programmed LPDMA1/2 request with peripheral early termination . . . . .388
Table 94.Programmed LPDMA1/2 trigger . . . . .388
Table 95.Programmed LPDMA source/destination single. . . . .408
Table 96.Programmed data handling . . . . .409
Table 97.Effect of low-power modes on LPDMA. . . . .420
Table 98.LPDMA interrupt requests . . . . .420
Table 99.LPDMA register map and reset values. . . . .438
Table 100.STM32C5 vector table .....440
Table 101.EXTI signals .....446
Table 102.EVG signals .....447
Table 103.EXTI line connections .....447
Table 104.Masking functionality .....451
Table 105.Register protection overview .....451
Table 106.EXTI register map sections .....452
Table 107.EXTI register map and reset values .....470
Table 108.CRC internal input/output signals .....473
Table 109.CRC register map and reset values .....478
Table 110.CORDIC functions .....480
Table 111.Cosine parameters .....480
Table 112.Sine parameters .....481
Table 113.Phase parameters .....481
Table 114.Modulus parameters .....482
Table 115.Arctangent parameters .....483
Table 116.Hyperbolic cosine parameters .....483
Table 117.Hyperbolic sine parameters .....484
Table 118.Hyperbolic arctangent parameters .....484
Table 119.Natural logarithm parameters .....485
Table 120.Natural log scaling factors and corresponding ranges .....485
Table 121.Square root parameters .....486
Table 122.Square root scaling factors and corresponding ranges .....486
Table 123.Precision vs. number of iterations .....489
Table 124.CORDIC register map and reset value .....496
Table 125.XSPI implementation .....498
Table 126.XSPI input/output pins .....500
Table 127.XSPI internal signals .....500
Table 128.Command/address phase description .....508
Table 129.OctaRAM command address bit assignment
(based on 64 Mb OctaRAM) .....
519
Table 130.Address alignment cases .....526
Table 131.XSPI interrupt requests .....527
Table 132.XSPI register map and reset values .....551
Table 133.DLYB internal input/output signals .....556
Table 134.Delay block control .....557
Table 135.DLYB register map and reset values .....560
Table 136.ADC features .....563
Table 137.ADC input/output pins .....565
Table 138.ADC internal input/output signals .....565
Table 139.ADC1/2/3 interconnection .....565
Table 140.Configuring the trigger polarity for regular external triggers .....585
Table 141.Configuring the trigger polarity for injected external triggers .....585
Table 142.TSAR timings depending on resolution .....588
Table 143.Offset computation versus data resolution .....592
Table 144.12-bit data formats .....594
Table 145.Numerical examples for 32-bit or 16-bit format (POSSPFF = 0) .....595
Table 146.Analog window watchdog features .....603
Table 147.Analog watchdog 1 channel selection .....604
Table 148.Analog watchdog 1, 2, 3 comparison .....605
Table 149.Maximum output results versus N and M .....610
Table 150.Oversampler operating mode summary .....614
Table 151.DELAY bits versus ADC resolution. ....620
Table 152.ADC interrupts .....633
Table 153.ADC register map and reset values for each ADC .....667
Table 154.ADC register map and reset values (master and slave ADC
common registers) .....
670
Table 155.DAC features .....673
Table 156.DAC input/output pins. ....675
Table 157.DAC internal input/output signals .....675
Table 158.DAC interconnection. ....676
Table 159.Data format (case of 12-bit data) .....678
Table 160.HFSEL description .....679
Table 161.Sample and refresh timings .....684
Table 162.Channel output modes summary .....686
Table 163.Effect of low-power modes on DAC .....692
Table 164.DAC interrupts .....692
Table 165.DAC register map and reset values .....709
Table 166.COMP implementation for STM32C55x/562 and STM32C59x/5A3 .....712
Table 167.COMP implementation non-inverting input assignment
for STM32C55x/562 and STM32C59x/5A3 .....
712
Table 168.COMP implementation for STM32C53x/542 .....712
Table 169.COMP implementation non-inverting input assignment
for STM32C53x/542 .....
712
Table 170.Window paired comparators .....713
Table 171.COMP input/output internal signals .....714
Table 172.COMP inverting input assignment .....714
Table 173.COMP blanking source assignment .....714
Table 174.Comparator behavior in low-power modes .....717
Table 175.COMP wake-up interrupt through EXTI control bits .....718
Table 176.COMP NVIC interrupt through EXTI control bits. ....718
Table 177.COMP interrupt through NVIC of the CPU control bits .....719
Table 178.COMP register map and reset values. ....725
Table 179.OPAMP pin and signal assignment per instance .....727
Table 180.OPAMP pins .....728
Table 181.OPAMP internal input/output signals .....729
Table 182.Calibration loops .....738
Table 183.Timer-controlled input selection .....739
Table 184.Timer-controlled programmable gain selection. ....740
Table 185.Effect of low-power modes on OPAMP .....740
Table 186.OPAMP register map and reset values .....746
Table 187.Peripherals connected by CCB interconnect .....748
Table 188.CCB internal input/output signals .....749
Table 189.Blob creation steps for ECDSA signature (CCOP = 0b110000<i>0) .....756
Table 190.Blob use steps for ECDSA signature (CCOP = 0b11000011) .....759
Table 191.Blob use steps for signing public key computation (CCOP = 0b10000001) .....761
Table 192.Blob creation steps for scalar multiplication (CCOP = 0b100000<i>0). ....763
Table 193.Blob use steps for scalar multiplication (CCOP = 0b10000001). ....764
Table 194.Blob creation steps for modular exponentiation (CCOP = 0b01000100) .....765
Table 195.Blob use steps for modular exponentiation (CCOP = 0b01000101). ....766
Table 196.CCB register map and reset values .....772
Table 197.RNG internal input/output signals .....774
Table 198.RNG interrupt requests. ....783
Table 199.RNG configurations .....784
Table 200.Additional health test configurations . . . . .784
Table 201.Configuration selection . . . . .784
Table 202.RNG register map and reset map . . . . .792
Table 203.AES versus SAES features . . . . .794
Table 204.AES internal input/output signals . . . . .795
Table 205.AES approved symmetric key functions . . . . .796
Table 206.Counter mode initialization vector definition . . . . .805
Table 207.Initialization of IV registers in GCM mode . . . . .808
Table 208.GCM last block definition . . . . .808
Table 209.Initialization of IV registers in CCM mode . . . . .815
Table 210.AES data swapping example . . . . .818
Table 211.Key endianness in AES_KEYRx registers (128/256-bit keys) . . . . .820
Table 212.IVI bitfield spread over AES_IVRx registers . . . . .821
Table 213.AES interrupt requests . . . . .822
Table 214.Processing latency for ECB, CBC and CTR . . . . .823
Table 215.Processing latency for GCM and CCM (in clock cycles) . . . . .824
Table 216.AES register map and reset values . . . . .836
Table 217.AES versus SAES features . . . . .840
Table 218.SAES internal input/output signals . . . . .841
Table 219.SAES approved symmetric key functions . . . . .842
Table 220.Counter mode initialization vector definition . . . . .852
Table 221.Initialization of IV registers in GCM mode . . . . .855
Table 222.GCM last block definition . . . . .855
Table 223.Initialization of IV registers in CCM mode . . . . .861
Table 224.AES data swapping example . . . . .870
Table 225.Key endianness in SAES_KEYRx registers (128/256-bit keys) . . . . .872
Table 226.IVI bitfield spread over SAES_IVRx registers . . . . .873
Table 227.SAES interrupt requests . . . . .875
Table 228.Processing latency for ECB, CBC and CTR . . . . .876
Table 229.Processing latency for GCM and CCM (in SAES kernel clock cycles) . . . . .877
Table 230.SAES register map and reset values . . . . .890
Table 231.HASH implementation on different devices . . . . .894
Table 232.HASH internal input/output signals . . . . .895
Table 233.Information on supported hash algorithms . . . . .895
Table 234.Hash processor outputs . . . . .899
Table 235.Processing time (in clock cycle) . . . . .905
Table 236.HASH interrupt requests . . . . .906
Table 237.HASH1 register map and reset values . . . . .914
Table 238.Internal input/output signals . . . . .917
Table 239.PKA integer arithmetic functions list . . . . .918
Table 240.PKA prime field (\(F_p\)) elliptic curve functions list . . . . .919
Table 241.Chaining mode to/from PKA . . . . .924
Table 242.Integrity protected parameters list . . . . .926
Table 243.Confidentiality protected parameter list . . . . .926
Table 244.Example of 'a' curve coefficient for ECC \(F_p\) scalar . . . . .928
Table 245.Montgomery parameter computation . . . . .929
Table 246.Modular addition . . . . .929
Table 247.Modular subtraction . . . . .930
Table 248.Montgomery multiplication . . . . .931
Table 249.Modular exponentiation (normal mode) . . . . .932
Table 250.Modular exponentiation (fast mode) . . . . .932
Table 251.Modular exponentiation (protected mode) . . . . .933
Table 252.Modular inversion933
Table 253.Modular reduction934
Table 254.Arithmetic addition934
Table 255.Arithmetic subtraction934
Table 256.Arithmetic multiplication935
Table 257.Arithmetic comparison935
Table 258.CRT exponentiation936
Table 259.Point on elliptic curve Fp check937
Table 260.ECC Fp scalar multiplication937
Table 261.ECDSA sign - Inputs939
Table 262.ECDSA sign - Outputs939
Table 263.Extended ECDSA sign - additional outputs940
Table 264.ECDSA verification - inputs940
Table 265.ECDSA verification - outputs941
Table 266.ECC complete addition941
Table 267.ECC double base ladder942
Table 268.ECC projective to affine943
Table 269.Family of supported curves for ECC operations944
Table 270.Modular exponentiation945
Table 271.ECC scalar multiplication945
Table 272.ECDSA signature average computation time946
Table 273.ECDSA verification average computation times946
Table 274.ECC double base ladder average computation times946
Table 275.ECC projective to affine average computation times946
Table 276.ECC complete addition average computation times946
Table 277.Point on elliptic curve Fp check average computation times946
Table 278.Montgomery parameters average computation times947
Table 279.PKA interrupt requests947
Table 280.PKA register map and reset values954
Table 281.TIM input/output pins957
Table 282.TIM internal input/output signals957
Table 283.Interconnect to the tim_ti1 input multiplexer959
Table 284.Interconnect to the tim_ti2 input multiplexer959
Table 285.Interconnect to the tim_ti3 input multiplexer959
Table 286.Interconnect to the tim_ti4 input multiplexer959
Table 287.Internal trigger connection959
Table 288.Interconnect to the tim_etr input multiplexer960
Table 289.Interconnect to the tim_bkr_cmp multiplexer960
Table 290.Timer break2 interconnect961
Table 291.Interconnect to tim_oref_clr multiplexer961
Table 292.System break interconnect961
Table 293.CCR and ARR register change dithering pattern995
Table 294.CCR register change dithering pattern in center-aligned PWM mode996
Table 295.Asymmetric PWM modes998
Table 296.Combined PWM mode overview1001
Table 297.Behavior of timer outputs versus tim_brk/tim_brk2 inputs1012
Table 298.Break protection disarming conditions1016
Table 299.Counting direction versus encoder signals (CC1P = CC2P = 0)1028
Table 300.Counting direction versus encoder signals and polarity settings1032
Table 301.DMA request1057
Table 302.Effect of low-power modes on TIM1/TIM81058
Table 303.Interrupt requests1059
Table 304.Output control bits for complementary tim_ocx and tim_ocxn channels with break feature . . . . .1091
Table 305.TIM1/TIM8 register map and reset values . . . . .1129
Table 306.Timer instance implementation on STM32C5. . . . .1134
Table 307.STM32C5 general purpose timers . . . . .1134
Table 308.TIM input/output pins . . . . .1136
Table 309.TIM internal input/output signals . . . . .1136
Table 310.Interconnect to the tim_ti1 input multiplexer . . . . .1137
Table 311.Interconnect to the tim_ti2 input multiplexer . . . . .1137
Table 312.Interconnect to the tim_ti3 input multiplexer . . . . .1138
Table 313.Interconnect to the tim_ti4 input multiplexer . . . . .1138
Table 314.TIMx internal trigger connection . . . . .1138
Table 315.Interconnect to the tim_etr input multiplexer . . . . .1139
Table 316.Interconnect to the tim_ocref_clr input multiplexer . . . . .1139
Table 317.CCR and ARR register change dithering pattern . . . . .1171
Table 318.CCR register change dithering pattern in center-aligned PWM mode . . . . .1172
Table 319.Asymmetric PWM modes . . . . .1173
Table 320.Combined PWM mode overview . . . . .1174
Table 321.Counting direction versus encoder signals(CC1P = CC2P = 0) . . . . .1185
Table 322.Counting direction versus encoder signals and polarity settings . . . . .1190
Table 323.DMA request . . . . .1219
Table 324.Effect of low-power modes on TIM2/TIM3/TIM4/TIM5 . . . . .1219
Table 325.Interrupt requests . . . . .1220
Table 326.Output control bit for standard tim_ocx channels . . . . .1244
Table 327.TIM2/TIM3/TIM4/TIM5 register map and reset values . . . . .1256
Table 328.TIM internal input/output signals . . . . .1260
Table 329.TIM_ARR register change dithering pattern . . . . .1270
Table 330.DMA request . . . . .1272
Table 331.Effect of low-power modes on TIM6/TIM7 . . . . .1272
Table 332.Interrupt request . . . . .1272
Table 333.TIM6/TIM7 register map and reset values . . . . .1280
Table 334.TIM input/output pins . . . . .1282
Table 335.TIM internal input/output signals . . . . .1283
Table 336.Interconnect to the tim_ti1 input multiplexer . . . . .1283
Table 337.Interconnect to the tim_ti2 input multiplexer . . . . .1283
Table 338.TIMx internal trigger connection . . . . .1284
Table 339.CCR and ARR register change dithering pattern . . . . .1302
Table 340.Effect of low-power modes on TIM12 . . . . .1314
Table 341.Interrupt requests . . . . .1314
Table 342.Output control bit for standard tim_ocx channels . . . . .1328
Table 343.TIM12 register map and reset values . . . . .1332
Table 344.Timer instance implementation on STM32C5. . . . .1335
Table 345.TIM input/output pins . . . . .1337
Table 346.TIM internal input/output signals . . . . .1338
Table 347.Interconnect to the tim_ti1 input multiplexer . . . . .1339
Table 348.Interconnect to the tim_ti2 input multiplexer . . . . .1339
Table 349.TIMx internal trigger connection . . . . .1339
Table 350.Interconnect to the tim_brk_cmp multiplexer . . . . .1340
Table 351.Interconnect to the ocref_clr input multiplexer . . . . .1340
Table 352.System break interconnect . . . . .1340
Table 353.CCR and ARR register change dithering pattern . . . . .1371
Table 354.CCR register change dithering pattern in center-aligned PWM mode . . . . .1372
Table 355.Asymmetric PWM modes . . . . .1373
Table 356.Break protection disarming conditions . . . . .1385
Table 357.Counting direction versus encoder signals (CC1P = CC2P = 0) . . . . .1393
Table 358.Counting direction versus encoder signals and polarity settings . . . . .1397
Table 359.DMA request . . . . .1410
Table 360.Effect of low-power modes on TIM15/TIM16/TIM17 . . . . .1410
Table 361.Interrupt requests . . . . .1411
Table 362.Output control bits for complementary tim_ocx and tim_ocxn channels with break feature (TIM15) . . . . .1431
Table 363.TIM15 register map and reset values . . . . .1449
Table 364.Output control bits for complementary tim_oc1 and tim_oc1n channels with break feature (TIM16/TIM17) . . . . .1463
Table 365.TIM16/TIM17 register map and reset values . . . . .1480
Table 366.STM32C5 LPTIM features . . . . .1484
Table 367.LPTIM1 input/output pins . . . . .1485
Table 368.LPTIM1 internal signals . . . . .1486
Table 369.LPTIM1 external trigger connections . . . . .1487
Table 370.LPTIM1 input 1 connections . . . . .1487
Table 371.LPTIM1 input 2 connections . . . . .1487
Table 372.LPTIM1 input capture 1 connections . . . . .1487
Table 373.LPTIM1 input capture 2 connections . . . . .1488
Table 374.Prescaler division ratios . . . . .1489
Table 375.Encoder counting scenarios . . . . .1496
Table 376.Input capture Glitch filter latency (in counter step unit) . . . . .1500
Table 377.Effect of low-power modes on the LPTIM . . . . .1504
Table 378.Interrupt events . . . . .1505
Table 379.LPTIM register map and reset values . . . . .1526
Table 380.IWDG features . . . . .1528
Table 381.IWDG delays versus actions . . . . .1529
Table 382.IWDG internal input/output signals . . . . .1530
Table 383.Effect of low power modes on IWDG . . . . .1535
Table 384.IWDG interrupt request . . . . .1537
Table 385.IWDG register map and reset values . . . . .1543
Table 386.WWDG features . . . . .1544
Table 387.WWDG internal input/output signals . . . . .1545
Table 388.WWDG interrupt requests . . . . .1548
Table 389.WWDG register map and reset values . . . . .1550
Table 390.RTC input/output pins . . . . .1553
Table 391.RTC internal input/output signals . . . . .1553
Table 392.RTC interconnection . . . . .1554
Table 393.RTC pin configuration . . . . .1554
Table 394.RTC_OUT mapping . . . . .1556
Table 395.Effect of low-power modes on RTC . . . . .1570
Table 396.RTC pins functionality over modes . . . . .1570
Table 397.Interrupt requests . . . . .1570
Table 398.RTC register map and reset values . . . . .1595
Table 399.TAMP input/output pins . . . . .1599
Table 400.TAMP internal input/output signals . . . . .1599
Table 401.TAMP interconnection . . . . .1600
Table 402.Effect of low-power modes on TAMP . . . . .1606
Table 403.TAMP pins functionality over modes . . . . .1606
Table 404.Interrupt requests . . . . .1606
Table 405.TAMP register map and reset values1622
Table 406.I2C implementation1625
Table 407.I2C input/output pins1626
Table 408.I2C internal input/output signals1627
Table 409.Comparison of analog and digital filters1629
Table 410.I2C-bus and SMBus specification data setup and hold times1631
Table 411.I2C configuration1635
Table 412.I2C-bus and SMBus specification clock timings1646
Table 413.Timing settings for fI2CCLK of 8 MHz1656
Table 414.Timing settings for fI2CCLK of 16 MHz1656
Table 415.SMBus timeout specifications1658
Table 416.SMBus with PEC configuration1660
Table 417.TIMEOUTA[11:0] for maximum tTIMEOUT of 25 ms1661
Table 418.TIMEOUTB[11:0] for maximum tLOW:SEXT and tLOW:MEXT of 8 ms1661
Table 419.TIMEOUTA[11:0] for maximum tIDLE of 50 µs1661
Table 420.Effect of low-power modes to I2C1671
Table 421.I2C interrupt requests1671
Table 422.I2C register map and reset values1687
Table 423.I3C instantiation1690
Table 424.I3C wake-up1690
Table 425.I3C FIFOs implementation1690
Table 426.I3C interrupt(s)1690
Table 427.I3C peripheral controller/target features versus MIPI v1.11691
Table 428.I3C input/output pins1692
Table 429.I3C internal input/output signals1692
Table 430.I3C register usage1705
Table 431.I3C registers/fields usage versus controller state1706
Table 432.I3C registers/fields usage versus target state1709
Table 433.List of supported I3C CCCs, as controller/target1712
Table 434.I3C controller error management1743
Table 435.I3C target error management1745
Table 436.Effect of low-power modes1749
Table 437.I3C register map and reset values1795
Table 438.Instance implementation on STM32C51799
Table 439.USART/LPUART features1799
Table 440.USART/UART input/output pins1802
Table 441.USART internal input/output signals1803
Table 442.Noise detection from sampled data1815
Table 443.Tolerance of the USART receiver when BRR [3:0] = 00001819
Table 444.Tolerance of the USART receiver when BRR[3:0] is different from 00001819
Table 445.USART frame formats1824
Table 446.Effect of low-power modes on the USART1847
Table 447.USART interrupt requests1848
Table 448.USART register map and reset values1886
Table 449.Instance implementation on STM32C51889
Table 450.USART/LPUART features1889
Table 451.LPUART input/output pins1892
Table 452.LPUART internal input/output signals1892
Table 453.Error calculation for programmed baud rates at lpuart_ker_ck_pres= 32.768 kHz1903
Table 454.Tolerance of the LPUART receiver1904
Table 456.Effect of low-power modes on the LPUART1916
Table 457.LPUART interrupt requests1917
Table 458.LPUART register map and reset values .....1943
Table 459.SPI features .....1946
Table 460.SPI/I2S input/output pins .....1949
Table 461.SPI internal input/output signals .....1949
Table 462.Effect of low-power modes on the SPI .....1976
Table 463.SPI wake-up and interrupt requests .....1977
Table 464.Bitfields usable in PCM/I2S mode .....1979
Table 465.WS and CK level before SPI/I2S is enabled when AFCNTR = 1 .....1988
Table 466.Serial data line swapping .....1988
Table 467.CLKGEN programming examples for usual I2S frequencies .....1992
Table 468.I2S interrupt requests .....2001
Table 469.SPI register map and reset values .....2019
Table 470.FDCAN features .....2023
Table 471.CAN subsystem I/O signals .....2025
Table 472.CAN subsystem I/O pins .....2026
Table 473.DLC coding in FDCAN .....2029
Table 474.Possible configurations for frame transmission .....2043
Table 475.Rx FIFO element .....2046
Table 476.Rx FIFO element description .....2046
Table 477.Tx buffer and FIFO element .....2048
Table 478.Tx buffer element description .....2048
Table 479.Tx event FIFO element .....2050
Table 480.Tx event FIFO element description .....2050
Table 481.Standard message ID filter element .....2051
Table 482.Standard message ID filter element field description .....2052
Table 483.Extended message ID filter element .....2052
Table 484.Extended message ID filter element field description .....2053
Table 485.FDCAN register map and reset values .....2083
Table 486.STM32C5 USB implementation .....2087
Table 487.USB input/output pins .....2088
Table 488.Double-buffering buffer flag definition .....2100
Table 489.Bulk double-buffering memory buffers usage (Device mode) .....2100
Table 490.Bulk double-buffering memory buffers usage (Host mode) .....2102
Table 491.Isochronous memory buffers usage .....2103
Table 492.Isochronous memory buffers usage .....2104
Table 493.Resume event detection .....2106
Table 494.Resume event detection for host .....2107
Table 495.Reception status encoding .....2125
Table 496.Endpoint/channel type encoding .....2125
Table 497.Endpoint/channel kind meaning .....2125
Table 498.Transmission status encoding .....2125
Table 499.USB register map and reset values .....2126
Table 500.Definition of allocated buffer memory .....2129
Table 501.USBSRAM register map and reset values .....2132
Table 502.Ethernet peripheral pins .....2137
Table 503.Internal Ethernet input/output signals .....2138
Table 504.Ethernet trigger connections .....2138
Table 505.Priority scheme for Tx DMA and Rx DMA .....2147
Table 506.Double VLAN processing features in Tx path .....2153
Table 507.Double VLAN processing in Rx path .....2154
Table 508.VLAN insertion or replacement based on VLTI bit .....2155
Table 509.Destination address filtering .....2158
Table 510.Source address filtering . . . . .2159
Table 511.VLAN match status . . . . .2160
Table 512.Ordinary clock: PTP messages for snapshot . . . . .2164
Table 513.End-to-end transparent clock: PTP messages for snapshot . . . . .2164
Table 514.Peer-to-peer transparent clock: PTP messages for snapshot . . . . .2165
Table 515.Egress and ingress latency for PHY interfaces . . . . .2169
Table 516.Minimum PTP clock frequency example . . . . .2169
Table 517.Message format defined in IEEE 1588-2008 . . . . .2170
Table 518.Message format defined in IEEE 1588-2008 . . . . .2171
Table 519.IPv6-UDP PTP packet fields required for control and status . . . . .2172
Table 520.Ethernet PTP packet fields required for control and status . . . . .2173
Table 521.Timestamp Snapshot Dependency on ETH_MACTSCR bits . . . . .2174
Table 522.PTP message generation criteria . . . . .2180
Table 523.Common PTP message header fields . . . . .2182
Table 524.MAC transmit PTP mode and one-step timestamping operation . . . . .2185
Table 525.Transmit checksum offload engine functions for different packet types . . . . .2189
Table 526.Receive checksum offload engine functions for different packet types . . . . .2192
Table 527.TSO: TCP and IP header fields . . . . .2196
Table 528.Pause packet fields . . . . .2201
Table 529.Tx MAC flow control . . . . .2202
Table 530.Rx MAC flow control . . . . .2202
Table 531.Size of the maximum receive packet . . . . .2205
Table 532.MCD clock selection . . . . .2207
Table 533.MDIO Clause 45 frame structure . . . . .2208
Table 534.MDIO Clause 22 frame structure . . . . .2209
Table 535.Remote wake-up packet filter register . . . . .2220
Table 536.Description of the remote wake-up filter fields . . . . .2220
Table 537.Remote wake-up packet and PMT interrupt generation . . . . .2222
Table 538.Transfer complete interrupt behavior . . . . .2231
Table 539.TDES0 normal descriptor (read format) . . . . .2255
Table 540.TDES1 normal descriptor (read format) . . . . .2256
Table 541.TDES2 normal descriptor (read format) . . . . .2256
Table 542.TDES3 normal descriptor (read format) . . . . .2257
Table 543.TDES0 normal descriptor (write-back format) . . . . .2260
Table 544.TDES1 normal descriptor (write-back format) . . . . .2260
Table 545.TDES2 normal descriptor (write-back format) . . . . .2261
Table 546.TDES3 normal descriptor (write-back format) . . . . .2261
Table 547.TDES0 context descriptor . . . . .2265
Table 548.TDES1 context descriptor . . . . .2265
Table 549.TDES2 context descriptor . . . . .2265
Table 550.TDES3 context descriptor . . . . .2266
Table 551.RDES0 normal descriptor (read format) . . . . .2269
Table 552.RDES1 normal descriptor (read format) . . . . .2269
Table 553.RDES2 normal descriptor (read format) . . . . .2269
Table 554.RDES3 normal descriptor (read format) . . . . .2270
Table 555.RDES0 normal descriptor (write-back format) . . . . .2271
Table 556.RDES1 normal descriptor (write-back format) . . . . .2272
Table 557.RDES2 normal descriptor (write-back format) . . . . .2274
Table 558.RDES3 normal descriptor (write-back format) . . . . .2275
Table 559.RDES0 context descriptor . . . . .2278
Table 560.RDES1 context descriptor . . . . .2279
Table 561.RDES2 context descriptor . . . . .2279
Table 562.RDES3 context descriptor . . . . .2279
Table 563.ETH_DMA common register map and reset values . . . . .2300
Table 564.ETH_DMA_CH0 register map and reset values . . . . .2300
Table 565.ETH_MTL register map and reset values . . . . .2310
Table 566.Giant Packet Status based on S2KP and JE Bits . . . . .2316
Table 567.Packet Length based on the CST and ACS bits . . . . .2316
Table 568.Ethernet MAC register map and reset values . . . . .2403
Table 569.JTAG/Serial-wire debug port pins . . . . .2414
Table 570.Trace port pins . . . . .2414
Table 571.Single-wire trace port pins . . . . .2415
Table 572.Authentication signal states of the CPU . . . . .2416
Table 573.Authentication signal states of the DAP . . . . .2416
Table 574.Lifecycle state and debug states . . . . .2417
Table 575.JTAG-DP data registers . . . . .2421
Table 576.Packet request . . . . .2423
Table 577.ACK response . . . . .2423
Table 578.Data transfer . . . . .2423
Table 579.Debug port registers . . . . .2424
Table 580.Debug port register map and reset values . . . . .2430
Table 581.MEM-AP registers . . . . .2431
Table 582.Access port register map and reset values . . . . .2437
Table 583.System ROM table . . . . .2438
Table 584.MCU ROM table . . . . .2439
Table 585.Processor ROM table . . . . .2439
Table 586.System ROM table register map and reset values . . . . .2444
Table 587.MCU ROM table register map and reset values . . . . .2449
Table 588.CPU ROM table register map and reset values . . . . .2454
Table 589.DWT register map and reset values . . . . .2469
Table 590.ITM register map and reset values . . . . .2480
Table 591.BPU register map and reset values . . . . .2487
Table 592.ETM register map and reset values . . . . .2511
Table 593.TPIU register map and reset values . . . . .2524
Table 594.CTI inputs . . . . .2526
Table 595.CTI outputs . . . . .2527
Table 596.CTI register map and reset values . . . . .2538
Table 597.Peripheral clock-freeze control bits . . . . .2540
Table 598.Peripheral behavior in debug mode . . . . .2541
Table 599.DBGMCU register map and reset values . . . . .2554
Table 600.Document revision history . . . . .2562

List of figures

Figure 1.System architecture .....88
Figure 2.Memory map for STM32C53x/542 .....91
Figure 3.Memory map for STM32C55x/562 .....92
Figure 4.Memory map for STM32C59x/5A3 .....93
Figure 5.Flash memory HDP area .....100
Figure 6.Key management principle .....104
Figure 7.Device life cycle security .....107
Figure 8.RDP level transition scheme .....108
Figure 9.FLASH block diagram (simplified) .....127
Figure 10.Embedded flash memory organization .....129
Figure 11.FLASH use .....130
Figure 12.FLASH data area memory map .....142
Figure 13.FLASH bank swapping sequence .....147
Figure 14.HDP in user flash memory .....156
Figure 15.Protection attributes in case of bank swap illustration .....158
Figure 16.RDP transitions .....159
Figure 17.ICACHE block diagram (master2 port only on STM32C59x/5A3 devices) .....209
Figure 18.ICACHE TAG and data memories functional view .....211
Figure 19.ICACHE remapping address mechanism .....214
Figure 20.Power supply .....225
Figure 21.Power-on (POR) / power-down (PDR) reset waveform .....228
Figure 22.PVD thresholds .....229
Figure 23.I/O states in Standby mode .....240
Figure 24.Simplified diagram of the reset circuit .....252
Figure 25.Clock tree .....255
Figure 26.HSE/ LSE clock sources .....256
Figure 27.Clock distribution for ETH .....267
Figure 28.Clock distribution for Crypton subsystem .....269
Figure 29.CRS block diagram .....328
Figure 30.CRS counter behavior .....330
Figure 31.Structure of 3- or 5-V tolerant GPIO (TT or FT) .....340
Figure 32.Input floating/pull-up/pull-down configurations .....344
Figure 33.Output configuration .....345
Figure 34.Alternate function configuration .....346
Figure 35.High-impedance analog configuration .....346
Figure 36.SBS block diagram .....357
Figure 37.Compensation cell management .....359
Figure 38.Compensation cell use .....359
Figure 39.SBS hardware secure storage control .....360
Figure 40.LPDMA block diagram .....390
Figure 41.LPDMA channel direct programming without linked-list (LPDMA_CxLLR = 0) .....391
Figure 42.LPDMA channel suspend and resume sequence .....392
Figure 43.LPDMA channel abort and restart sequence .....393
Figure 44.Static linked-list data structure (all Uxx = 1) of channel x .....394
Figure 45.LPDMA dynamic linked-list data structure of an addressing channel x .....395
Figure 46.LPDMA channel execution and linked-list programming
in run-to-completion mode (LPDMA_CxCR.LSM = 0) .....
397
Figure 47.Inserting a LLIn with an auxiliary LPDMA channel y .....399
Figure 48.LPDMA channel execution and linked-list programming
in link step mode (LPDMA_CxCR.LSM = 1) . . . . .
401
Figure 49.Building LLIn+1: LPDMA dynamic linked-lists in link step mode . . . . .402
Figure 50.Replace with a new LLIn' in register file in link step mode . . . . .403
Figure 51.Replace with a new LLIn' and LLIn+1' in memory in link step mode (option 1) . . . . .404
Figure 52.Replace with a new LLIn' and LLIn+1' in memory in link step mode (option 2) . . . . .405
Figure 53.LPDMA channel execution and linked-list programming . . . . .407
Figure 54.LPDMA arbitration policy . . . . .411
Figure 55.Trigger hit, memorization and overrun waveform . . . . .415
Figure 56.LPDMA circular buffer programming: update of the memory start address . . . . .416
Figure 57.Shared LPDMA channel with circular buffering:
update of the memory start address . . . . .
417
Figure 58.EXTI block diagram . . . . .446
Figure 59.Configurable event trigger logic CPU wake-up . . . . .449
Figure 60.EXTI direct events . . . . .450
Figure 61.EXTI mux GPIO selection . . . . .450
Figure 62.CRC calculation unit block diagram . . . . .473
Figure 63.CORDIC convergence for trigonometric functions . . . . .487
Figure 64.CORDIC convergence for hyperbolic functions . . . . .488
Figure 65.CORDIC convergence for square root . . . . .489
Figure 66.XSPI block diagram for octal configuration . . . . .499
Figure 67.XSPI block diagram for quad configuration . . . . .499
Figure 68.XSPI block diagram for dual-quad configuration . . . . .500
Figure 69.SDR read command in octal configuration . . . . .501
Figure 70.DTR read in octal-SPI mode with DQS (Macronix mode) example . . . . .504
Figure 71.SDR write command in octal-SPI mode example . . . . .506
Figure 72.DTR write in octal-SPI mode (Macronix mode) example . . . . .507
Figure 73.Example of HyperBus read operation (8-bit data mode) . . . . .508
Figure 74.HyperBus write operation with initial latency . . . . .509
Figure 75.HyperBus read operation with additional latency . . . . .510
Figure 76.HyperBus write operation with additional latency . . . . .510
Figure 77.HyperBus write operation with no latency (register write) . . . . .511
Figure 78.HyperBus read operation page crossing with latency . . . . .511
Figure 79.D0/D1 data ordering in octal-SPI DTR mode (Micron) - Read access . . . . .518
Figure 80.OctaRAM read operation with reverse data ordering D1/D0 . . . . .518
Figure 81.NCS when CKMODE = 0 (T = CLK period) . . . . .524
Figure 82.Example of software control of two external memories (octal mode) . . . . .525
Figure 83.Example of hardware-controller extended memory support (octal mode) . . . . .526
Figure 84.DLYB block diagram . . . . .556
Figure 85.ADC block diagram . . . . .564
Figure 86.ADC clock scheme . . . . .568
Figure 87.ADC1 connectivity . . . . .569
Figure 88.ADC2 connectivity . . . . .570
Figure 89.ADC3 connectivity . . . . .571
Figure 90.ADC calibration . . . . .573
Figure 91.Updating the ADC calibration factor . . . . .574
Figure 92.Enabling/disabling the ADC . . . . .575
Figure 93.Bulb mode timing diagram . . . . .578
Figure 94.Analog-to-digital conversion time . . . . .583
Figure 95.Stopping ongoing regular conversions . . . . .584
Figure 96.Stopping ongoing regular and injected conversions . . . . .584
Figure 97.Triggers shared between ADC master and slave . . . . .586
Figure 98.Injected conversion latency during ongoing regular conversion587
Figure 99.Single conversions of a sequence, software trigger589
Figure 100.Continuous conversion of a sequence, software trigger589
Figure 101.Single conversions of a sequence, hardware trigger590
Figure 102.Continuous conversions of a sequence, hardware trigger590
Figure 103.Right alignment (offset disabled, unsigned value)592
Figure 104.Right alignment (offset enabled, signed value)593
Figure 105.Left alignment (offset disabled, unsigned value)593
Figure 106.Left alignment (offset enabled, signed value)594
Figure 107.Example of overrun (OVRMOD = 0)597
Figure 108.Example of overrun (OVRMOD = 1)597
Figure 109.AUTDLY = 1, regular conversion in continuous mode, software trigger600
Figure 110.AUTDLY = 1, regular hardware conversions interrupted by injected conversions
(DISCEN = 0; JDISCEN = 0)
601
Figure 111.AUTDLY = 1, regular hardware conversions interrupted by injected conversions
(DISCEN = 1, JDISCEN = 1)
602
Figure 112.AUTDLY = 1, regular continuous conversions interrupted by injected conversions602
Figure 113.AUTDLY = 1 in autoinjection mode (JAUTO = 1)603
Figure 114.Analog watchdog guarded area604
Figure 115.ADC_AWDy_OUT signal generation (on all regular channels)606
Figure 116.ADC_AWDy_OUT signal generation (AWDy flag not cleared by software)607
Figure 117.ADC_AWDy_OUT signal generation (on a single regular channel)607
Figure 118.ADC_AWDy_OUT signal generation (on all injected channels)608
Figure 119.12-bit result oversampling with 10-bit right shift and rounding609
Figure 120.Triggered regular oversampling mode (TROVS bit = 1)611
Figure 121.Regular oversampling modes (4x ratio)612
Figure 122.Regular and injected oversampling modes used simultaneously613
Figure 123.Triggered regular oversampling with injection613
Figure 124.Oversampling in autoinjection mode614
Figure 125.Dual ADC block diagram616
Figure 126.Injected simultaneous mode on four channels: Dual ADC mode617
Figure 127.Regular simultaneous mode on 16 channels: dual ADC mode619
Figure 128.Interleaved mode on 1 channel in continuous conversion mode:
Dual ADC mode
621
Figure 129.Interleaved mode on 1 channel in single conversion mode:
Dual ADC mode
621
Figure 130.Interleaved conversion with injection622
Figure 131.Alternate trigger: injected group of each ADC623
Figure 132.Alternate trigger: 4 injected channels (each ADC) in discontinuous mode624
Figure 133.Alternate + regular simultaneous624
Figure 134.Case of trigger occurring during injected conversion625
Figure 135.Interleaved single channel CH0 with injected sequence CH11, CH12625
Figure 136.Two interleaved channels (CH1, CH2) with injected sequence CH11, CH12
- case 1: Master interrupted first
626
Figure 137.Two interleaved channels (CH1, CH2) with injected sequence CH11, CH12
- case 2: Slave interrupted first
626
Figure 138.DMA requests in regular simultaneous mode when DAMDF[1:0] = 0b00627
Figure 139.DMA requests in interleaved mode when DAMDF = 0b10628
Figure 140.Temperature sensor channel block diagram630
Figure 141.VREFINT channel block diagram631
Figure 142.Dual-channel DAC block diagram674
Figure 143.Data registers in single DAC channel mode677
Figure 144. Data registers in dual DAC channel mode . . . . .678
Figure 145. Timing diagram for conversion with trigger disabled TEN = 0 . . . . .679
Figure 146. DAC LFSR register calculation algorithm . . . . .681
Figure 147. DAC conversion (SW trigger enabled) with LFSR wave generation . . . . .682
Figure 148. DAC triangle wave generation . . . . .682
Figure 149. DAC conversion (SW trigger enabled) with triangle wave generation . . . . .683
Figure 150. DAC sample and hold mode phase diagram . . . . .685
Figure 151. Comparator functional block diagram . . . . .713
Figure 152. Window comparators functional block diagram . . . . .715
Figure 153. Comparator hysteresis . . . . .716
Figure 154. Comparator output blanking . . . . .717
Figure 155. Scaler block diagram . . . . .720
Figure 156. OPAMP block diagram . . . . .728
Figure 157. Standalone operational amplifier . . . . .731
Figure 158. Follower . . . . .732
Figure 159. Noninverting PGA . . . . .733
Figure 160. Noninverting PGA with filtering . . . . .734
Figure 161. Noninverting PGA with external bias, or inverting PGA . . . . .735
Figure 162. Inverting or noninverting PGA with external bias or/and filtering . . . . .736
Figure 163. Simplified view . . . . .736
Figure 164. Timer-controlled operation for a dual motor application . . . . .739
Figure 165. CCB block diagram . . . . .748
Figure 166. CCB operation CPU → PKA + SAES (write) . . . . .750
Figure 167. CCB operation PKA → SAES . . . . .750
Figure 168. CCB operation SAES → PKA . . . . .750
Figure 169. CCB operation SAES → CCB . . . . .751
Figure 170. CCB operation RNG → PKA (write) . . . . .751
Figure 171. CCB operation RNG → SAES (write) . . . . .752
Figure 172. Blob creation scenarios . . . . .753
Figure 173. RNG block diagram . . . . .774
Figure 174. NIST SP800-90B entropy source model . . . . .775
Figure 175. RNG initialization overview . . . . .778
Figure 176. AES block diagram . . . . .795
Figure 177. Encryption/ decryption typical usage . . . . .796
Figure 178. Typical operation with authentication . . . . .799
Figure 179. Example of suspend mode management . . . . .800
Figure 180. ECB encryption . . . . .801
Figure 181. ECB decryption . . . . .801
Figure 182. CBC encryption . . . . .801
Figure 183. CBC decryption . . . . .802
Figure 184. Message construction in CTR mode . . . . .804
Figure 185. CTR encryption . . . . .805
Figure 186. Message construction in GCM . . . . .806
Figure 187. GCM authenticated encryption . . . . .808
Figure 188. Message construction in GMAC mode . . . . .811
Figure 189. GMAC authentication mode . . . . .812
Figure 190. Message construction in CCM mode . . . . .813
Figure 191. CCM mode authenticated encryption . . . . .814
Figure 192. 128-bit block construction according to the data type . . . . .819
Figure 193. SAES block diagram . . . . .841
Figure 194. Encryption/ decryption typical usage . . . . .843
Figure 195. Typical operation with authentication . . . . .845
Figure 196.Example of suspend mode management . . . . .846
Figure 197.ECB encryption . . . . .847
Figure 198.ECB decryption . . . . .847
Figure 199.CBC encryption . . . . .848
Figure 200.CBC decryption . . . . .848
Figure 201.Message construction in CTR mode . . . . .851
Figure 202.CTR encryption . . . . .852
Figure 203.Message construction in GCM . . . . .853
Figure 204.GCM authenticated encryption . . . . .855
Figure 205.Message construction in GMAC mode . . . . .858
Figure 206.GMAC authentication mode . . . . .858
Figure 207.Message construction in CCM mode . . . . .859
Figure 208.CCM mode authenticated encryption . . . . .861
Figure 209.Operation with wrapped keys for SAES in ECB and CBC modes . . . . .864
Figure 210.Operation with wrapped keys for SAES in CTR mode . . . . .867
Figure 211.Usage of Shared-key mode . . . . .868
Figure 212.128-bit block construction according to the data type . . . . .871
Figure 213.HASH block diagram . . . . .894
Figure 214.Message data swapping feature . . . . .897
Figure 215.HASH suspend/resume mechanism . . . . .903
Figure 216.PKA block diagram . . . . .917
Figure 217.Chaining of PKA with SAES or RNG . . . . .924
Figure 218.Advanced-control timer block diagram . . . . .956
Figure 219.Counter timing diagram with prescaler division change from 1 to 2 . . . . .963
Figure 220.Counter timing diagram with prescaler division change from 1 to 4 . . . . .963
Figure 221.Counter timing diagram, internal clock divided by 1 . . . . .965
Figure 222.Counter timing diagram, internal clock divided by 2 . . . . .965
Figure 223.Counter timing diagram, internal clock divided by 4 . . . . .966
Figure 224.Counter timing diagram, internal clock divided by N . . . . .966
Figure 225.Counter timing diagram, update event when ARPE = 0
(TIM_ARR not preloaded) . . . . .
967
Figure 226.Counter timing diagram, update event when ARPE = 1
(TIM_ARR preloaded) . . . . .
968
Figure 227.Counter timing diagram, internal clock divided by 1 . . . . .969
Figure 228.Counter timing diagram, internal clock divided by 2 . . . . .970
Figure 229.Counter timing diagram, internal clock divided by 4 . . . . .970
Figure 230.Counter timing diagram, internal clock divided by N . . . . .971
Figure 231.Counter timing diagram, update event when repetition counter is not used . . . . .971
Figure 232.Counter timing diagram, internal clock divided by 1, TIM_ARR = 0x6 . . . . .973
Figure 233.Counter timing diagram, internal clock divided by 2 . . . . .973
Figure 234.Counter timing diagram, internal clock divided by 4, TIM_ARR = 0x36 . . . . .974
Figure 235.Counter timing diagram, internal clock divided by N . . . . .974
Figure 236.Counter timing diagram, update event with ARPE = 1 (counter underflow) . . . . .975
Figure 237.Counter timing diagram, Update event with ARPE = 1 (counter overflow) . . . . .976
Figure 238.Update rate examples depending on mode and TIM_RCR register settings . . . . .977
Figure 239.External trigger input block . . . . .978
Figure 240.Control circuit in normal mode, internal clock divided by 1 . . . . .979
Figure 241.tim_ti2 external clock connection example . . . . .979
Figure 242.Control circuit in external clock mode 1 . . . . .980
Figure 243.External trigger input block . . . . .981
Figure 244.Control circuit in external clock mode 2 . . . . .982
Figure 245.Capture/compare channel (example: channel 1 input stage) . . . . .982
Figure 246. Capture/compare channel 1 main circuit .....983
Figure 247. Output stage of capture/compare channel (channel 1, idem ch. 2, 3 and 4) .....984
Figure 248. Output stage of capture/compare channel (channel 5, idem ch. 6 and 7) .....984
Figure 249. PWM input mode timing .....986
Figure 250. Output compare mode, toggle on tim_oc1 .....988
Figure 251. Edge-aligned PWM waveforms (ARR = 8) .....990
Figure 252. Center-aligned PWM waveforms (ARR = 8) .....991
Figure 253. Dithering principle .....992
Figure 254. Data format and register coding in dithering mode .....993
Figure 255. PWM resolution vs frequency .....994
Figure 256. PWM dithering pattern .....995
Figure 257. Dithering effect on duty cycle in center-aligned PWM mode .....996
Figure 258. Generation of 2 phase-shifted PWM signals with 50% duty cycle .....997
Figure 259. Asymmetric mode example for single-shunt current sensing .....1000
Figure 260. Asymmetric mode 8 example .....1000
Figure 261. Combined PWM mode examples .....1002
Figure 262. Combined PWM 3 example .....1003
Figure 263. 3-phase combined PWM signals with multiple trigger pulses per period .....1004
Figure 264. Complementary output with symmetrical dead-time insertion .....1005
Figure 265. Asymmetrical deadtime .....1006
Figure 266. Dead-time waveforms with delay greater than the negative pulse .....1006
Figure 267. Dead-time waveforms with delay greater than the positive pulse .....1006
Figure 268. Clock prescalers for dead-time and digital filters .....1007
Figure 269. Break and Break2 circuitry overview .....1009
Figure 270. Various output behavior in response to a break event on tim_brk (OSSI = 1) .....1011
Figure 271. PWM output state following tim_brk and tim_brk2 assertion (OSSI = 1) .....1012
Figure 272. PWM output state following tim_brk assertion (OSSI = 0) .....1013
Figure 273. Immediate break and Delayed 1/2 break modes .....1013
Figure 274. Pulse termination during delayed break .....1014
Figure 275. Delayed break with deadtime insertion .....1015
Figure 276. Output redirection (tim_brk2 request not represented) .....1017
Figure 277. tim_ocref_clr input selection multiplexer .....1018
Figure 278. Clearing TIMx tim_ocxref .....1019
Figure 279. Asymmetric PWM mode 1 .....1019
Figure 280. Asymmetric PWM mode 2 .....1020
Figure 281. Asymmetric PWM mode 7 (OC1refc = oc1ref OR oc5ref) .....1020
Figure 282. Combined PWM mode 1 .....1021
Figure 283. 6-step generation, COM example (OSSR = 1) .....1022
Figure 284. Example of one pulse mode .....1023
Figure 285. Retriggerable one-pulse mode .....1024
Figure 286. Pulse generator circuitry .....1025
Figure 287. Pulse generation on compare event, for edge-aligned and encoder modes .....1026
Figure 288. Extended pulsewidth in case of concurrent triggers .....1027
Figure 289. Example of counter operation in encoder interface mode .....1029
Figure 290. Example of encoder interface mode with tim_ti1fp1 polarity inverted .....1029
Figure 291. Quadrature encoder counting modes .....1030
Figure 292. Direction plus clock encoder mode .....1031
Figure 293. Directional clock encoder mode (CC1P = CC2P = 0) .....1031
Figure 294. Directional clock encoder mode (CC1P = CC2P = 1) .....1032
Figure 295. Index gating options .....1033
Figure 296. Jittered Index signals .....1033
Figure 297. Index generation for IPOS[1:0] = 11 .....1034
Figure 298.Counter reading with index gated on channel A (IPOS[1:0] = 11) . . . . .1034
Figure 299.Counter reading with index ungated (IPOS[1:0] = 00) . . . . .1035
Figure 300.Counter reading with index gated on channel A and B. . . . .1035
Figure 301.Encoder mode behavior in case of narrow index pulse (IPOS[1:0] = 11) . . . . .1036
Figure 302.Counter reset Narrow index pulse (closer view, ARR = 0x07) . . . . .1037
Figure 303.Index behavior in x1 and x2 mode (IPOS[1:0] = 01) . . . . .1038
Figure 304.Directional index sensitivity. . . . .1038
Figure 305.Counter reset as function of FIDX bit setting . . . . .1039
Figure 306.Index blanking. . . . .1039
Figure 307.Index behavior in clock + direction mode, IPOS[0] = 1 . . . . .1040
Figure 308.Index behavior in directional clock mode, IPOS[0] = 1 . . . . .1040
Figure 309.State diagram for quadrature encoded signals. . . . .1041
Figure 310.Up-counting encoder error detection . . . . .1042
Figure 311.Down-counting encode error detection. . . . .1043
Figure 312.Encoder mode change with preload transferred on update (SMSPS = 0) . . . . .1044
Figure 313.Encoder with built-in debouncer, x2 mode . . . . .1045
Figure 314.Encoder with built-in debouncer, x4 mode . . . . .1045
Figure 315.Clock drift measure using directional clock mode. . . . .1046
Figure 316.Measuring time interval between edges on three signals. . . . .1047
Figure 317.XOR gate connection with TI1S = 1 and XORPS = 0. . . . .1048
Figure 318.XOR gate connection with TI1S = 1 and XORPS = 1. . . . .1048
Figure 319.Example of Hall sensor interface . . . . .1050
Figure 320.Control circuit in reset mode. . . . .1051
Figure 321.Control circuit in Gated mode . . . . .1052
Figure 322.Control circuit in trigger mode. . . . .1053
Figure 323.Control circuit in external clock mode 2 + trigger mode . . . . .1054
Figure 324.tim_trgo2 postscaler example. . . . .1055
Figure 325.General-purpose timer block diagram . . . . .1135
Figure 326.Counter timing diagram with prescaler division change from 1 to 2 . . . . .1141
Figure 327.Counter timing diagram with prescaler division change from 1 to 4 . . . . .1141
Figure 328.Counter timing diagram, internal clock divided by 1 . . . . .1142
Figure 329.Counter timing diagram, internal clock divided by 2 . . . . .1143
Figure 330.Counter timing diagram, internal clock divided by 4 . . . . .1143
Figure 331.Counter timing diagram, internal clock divided by N. . . . .1144
Figure 332.Counter timing diagram, Update event when ARPE = 0 (TIM_ARR not preloaded) . . . . .1144
Figure 333.Counter timing diagram, Update event when ARPE = 1 (TIM_ARR preloaded) . . . . .1145
Figure 334.Counter timing diagram, internal clock divided by 1 . . . . .1146
Figure 335.Counter timing diagram, internal clock divided by 2 . . . . .1147
Figure 336.Counter timing diagram, internal clock divided by 4 . . . . .1147
Figure 337.Counter timing diagram, internal clock divided by N. . . . .1148
Figure 338.Counter timing diagram, Update event. . . . .1148
Figure 339.Counter timing diagram, internal clock divided by 1, TIM_ARR = 0x6 . . . . .1150
Figure 340.Counter timing diagram, internal clock divided by 2 . . . . .1150
Figure 341.Counter timing diagram, internal clock divided by 4, TIM_ARR = 0x36 . . . . .1151
Figure 342.Counter timing diagram, internal clock divided by N. . . . .1151
Figure 343.Counter timing diagram, Update event with ARPE = 1 (counter underflow). . . . .1152
Figure 344.Counter timing diagram, Update event with ARPE = 1 (counter overflow). . . . .1153
Figure 345.External trigger input block . . . . .1153
Figure 346.Control circuit in normal mode, internal clock divided by 1. . . . .1155
Figure 347.tim_ti2 external clock connection example . . . . .1155
Figure 348.Control circuit in external clock mode 1 . . . . .1156
Figure 349.External trigger input block . . . . .1157
Figure 350. Control circuit in external clock mode 2 .....1158
Figure 351. Capture/compare channel (example: channel 1 input stage) .....1158
Figure 352. Capture/compare channel 1 main circuit .....1159
Figure 353. Output stage of capture/compare channel (channel 1, idem ch.2, 3 and 4) .....1159
Figure 354. PWM input mode timing .....1162
Figure 355. Output compare mode, toggle on tim_oc1 .....1164
Figure 356. Edge-aligned PWM waveforms (ARR = 8) .....1165
Figure 357. Center-aligned PWM waveforms (ARR = 8) .....1166
Figure 358. Dithering principle .....1167
Figure 359. Data format and register coding in dithering mode .....1168
Figure 360. PWM resolution vs frequency (16-bit mode) .....1169
Figure 361. PWM resolution vs frequency (32-bit mode) .....1169
Figure 362. PWM dithering pattern .....1170
Figure 363. Dithering effect on duty cycle in center-aligned PWM mode .....1171
Figure 364. Generation of two phase-shifted PWM signals with 50% duty cycle .....1173
Figure 365. Combined PWM mode on channels 1 and 3 .....1175
Figure 366. Clock prescalers for dead-time and digital filters .....1176
Figure 367. OCREF_CLR input selection multiplexer .....1176
Figure 368. Clearing TIMx tim_ocxref .....1177
Figure 369. Asymmetric PWM mode 1 .....1178
Figure 370. Asymmetric PWM mode 2 .....1178
Figure 371. Combined PWM mode 1 .....1179
Figure 372. Example of one-pulse mode .....1180
Figure 373. Retriggerable one-pulse mode .....1181
Figure 374. Pulse generator circuitry .....1182
Figure 375. Pulse generation on compare event, for edge-aligned and encoder modes .....1183
Figure 376. Extended pulse width in case of concurrent triggers .....1184
Figure 377. Example of counter operation in encoder interface mode .....1186
Figure 378. Example of encoder interface mode with tim_ti1fp1 polarity inverted .....1186
Figure 379. Quadrature encoder counting modes .....1187
Figure 380. Direction plus clock encoder mode .....1188
Figure 381. Directional clock encoder mode (CC1P = CC2P = 0) .....1189
Figure 382. Directional clock encoder mode (CC1P = CC2P = 1) .....1189
Figure 383. Index gating options .....1191
Figure 384. Jittered Index signals .....1191
Figure 385. Index generation for IPOS[1:0] = 11 .....1192
Figure 386. Counter reading with index gated on channel A (IPOS[1:0] = 11) .....1192
Figure 387. Counter reading with index ungated (IPOS[1:0] = 00) .....1193
Figure 388. Counter reading with index gated on channel A and B .....1193
Figure 389. Encoder mode behavior in case of narrow index pulse (IPOS[1:0] = 11) .....1194
Figure 390. Counter reset Narrow index pulse (closer view, ARR = 0x07) .....1195
Figure 391. Index behavior in x1 and x2 mode (IPOS[1:0] = 01) .....1196
Figure 392. Directional index sensitivity .....1196
Figure 393. Counter reset as function of FIDX bit setting .....1197
Figure 394. Index blanking .....1197
Figure 395. Index behavior in clock + direction mode, IPOS[0] = 1 .....1198
Figure 396. Index behavior in directional clock mode, IPOS[0] = 1 .....1198
Figure 397. State diagram for quadrature encoded signals .....1199
Figure 398. Up-counting encoder error detection .....1200
Figure 399. Down-counting encode error detection .....1201
Figure 400. Encoder mode change with preload transferred on update (SMSPS = 0) .....1202
Figure 401. Encoder with built-in debouncer, x2 mode .....1203
Figure 402.Encoder with built-in debouncer, x4 mode1203
Figure 403.Clock drift measure using directional clock mode1204
Figure 404.Measuring time interval between edges on three signals1205
Figure 405.XOR gate connection with TI1S = 1 and XORPS = 01206
Figure 406.XOR gate connection with TI1S = 1 and XORPS = 11206
Figure 407.Control circuit in reset mode1207
Figure 408.Control circuit in gated mode1208
Figure 409.Control circuit in trigger mode1209
Figure 410.Control circuit in external clock mode 2 + trigger mode1210
Figure 411.Master/Slave timer example1211
Figure 412.Master/slave connection example with 1 channel only timers1211
Figure 413.Gating TIM_slv with tim_oc1ref of TIM_mstr1212
Figure 414.Gating TIM_slv with Enable of TIM_mstr1213
Figure 415.Triggering TIM_slv with update of TIM_mstr1214
Figure 416.Triggering TIM_slv with Enable of TIM_mstr1214
Figure 417.Triggering TIM_mstr and TIM_slv with TIM_mstr tim_ti1 input1215
Figure 418.Basic timer block diagram1260
Figure 419.Control circuit in normal mode, internal clock divided by 11261
Figure 420.Counter timing diagram with prescaler division change from 1 to 21262
Figure 421.Counter timing diagram with prescaler division change from 1 to 41263
Figure 422.Counter timing diagram, internal clock divided by 11264
Figure 423.Counter timing diagram, internal clock divided by 21264
Figure 424.Counter timing diagram, internal clock divided by 41265
Figure 425.Counter timing diagram, internal clock divided by N1265
Figure 426.Counter timing diagram, update event when ARPE = 0 (TIM_ARR not preloaded)1266
Figure 427.Counter timing diagram, update event when ARPE = 1 (TIM_ARR preloaded)1267
Figure 428.Dithering principle1268
Figure 429.Data format and register coding in dithering mode1268
Figure 430.FCnt resolution vs frequency1269
Figure 431.PWM dithering pattern1269
Figure 432.General-purpose timer block diagram (TIM12)1282
Figure 433.Counter timing diagram with prescaler division change from 1 to 21285
Figure 434.Counter timing diagram with prescaler division change from 1 to 41286
Figure 435.Counter timing diagram, internal clock divided by 11287
Figure 436.Counter timing diagram, internal clock divided by 21287
Figure 437.Counter timing diagram, internal clock divided by 41288
Figure 438.Counter timing diagram, internal clock divided by N1288
Figure 439.Counter timing diagram, update event when ARPE = 0 (TIM_ARR not preloaded)1289
Figure 440.Counter timing diagram, update event when ARPE = 1 (TIM_ARR preloaded)1290
Figure 441.Control circuit in normal mode, internal clock divided by 11291
Figure 442.tim_ti2 external clock connection example1291
Figure 443.Control circuit in external clock mode 11292
Figure 444.Capture/compare channel 1 input stage (TIM12)1293
Figure 445.Capture/compare channel 1 main circuit1293
Figure 446.Output stage of capture/compare channel 11294
Figure 447.PWM input mode timing1296
Figure 448.Output compare mode, toggle on tim_oc11298
Figure 449.Edge-aligned PWM waveforms (ARR = 8)1299
Figure 450. Dithering principle . . . . .1300
Figure 451. Data format and register coding in dithering mode . . . . .1300
Figure 452. PWM resolution vs frequency . . . . .1301
Figure 453. PWM dithering pattern . . . . .1302
Figure 454. Combined PWM mode on channel 1 and 2 . . . . .1304
Figure 455. Clock prescalers for digital filters . . . . .1305
Figure 456. Example of one pulse mode . . . . .1305
Figure 457. Retriggerable one pulse mode . . . . .1307
Figure 458. Measuring time interval between edges on 2 signals . . . . .1308
Figure 459. XOR gate connection with TI1S = 1 and XORPS = 0 . . . . .1308
Figure 460. XOR gate connection with TI1S = 1 and XORPS = 1 . . . . .1309
Figure 461. Control circuit in reset mode . . . . .1310
Figure 462. Control circuit in gated mode . . . . .1311
Figure 463. Control circuit in trigger mode . . . . .1311
Figure 464. TIM15 block diagram . . . . .1336
Figure 465. TIM16/TIM17 block diagram . . . . .1337
Figure 466. Counter timing diagram with prescaler division change from 1 to 2 . . . . .1342
Figure 467. Counter timing diagram with prescaler division change from 1 to 4 . . . . .1342
Figure 468. Counter timing diagram, internal clock divided by 1 . . . . .1344
Figure 469. Counter timing diagram, internal clock divided by 2 . . . . .1344
Figure 470. Counter timing diagram, internal clock divided by 4 . . . . .1345
Figure 471. Counter timing diagram, internal clock divided by N . . . . .1345
Figure 472. Counter timing diagram, update event when ARPE = 0
(TIM_ARR not preloaded) . . . . .
1346
Figure 473. Counter timing diagram, update event when ARPE = 1
(TIM_ARR preloaded) . . . . .
1347
Figure 474. Counter timing diagram, internal clock divided by 1 . . . . .1348
Figure 475. Counter timing diagram, internal clock divided by 2 . . . . .1349
Figure 476. Counter timing diagram, internal clock divided by 4 . . . . .1349
Figure 477. Counter timing diagram, internal clock divided by N . . . . .1350
Figure 478. Counter timing diagram, update event when repetition counter is not used . . . . .1350
Figure 479. Counter timing diagram, internal clock divided by 1, TIM_ARR = 0x6 . . . . .1352
Figure 480. Counter timing diagram, internal clock divided by 2 . . . . .1352
Figure 481. Counter timing diagram, internal clock divided by 4, TIM_ARR = 0x36 . . . . .1353
Figure 482. Counter timing diagram, internal clock divided by N . . . . .1353
Figure 483. Counter timing diagram, update event with ARPE = 1 (counter underflow) . . . . .1354
Figure 484. Counter timing diagram, Update event with ARPE = 1 (counter overflow) . . . . .1355
Figure 485. Update rate examples depending on mode and TIM_RCR register settings . . . . .1356
Figure 486. Control circuit in normal mode, internal clock divided by 1 . . . . .1357
Figure 487. tim_ti2 external clock connection example . . . . .1358
Figure 488. Control circuit in external clock mode 1 . . . . .1359
Figure 489. Capture/compare channel (example: channel 1 input stage) . . . . .1359
Figure 490. Capture/compare channel 1 main circuit . . . . .1360
Figure 491. Output stage of capture/compare channel (channel 1) . . . . .1360
Figure 492. Output stage of capture/compare channel (channel 2 for TIM15) . . . . .1361
Figure 493. PWM input mode timing . . . . .1363
Figure 494. Output compare mode, toggle on tim_oc1 . . . . .1365
Figure 495. Edge-aligned PWM waveforms (ARR = 8) . . . . .1366
Figure 496. Center-aligned PWM waveforms (ARR = 8) . . . . .1367
Figure 497. Dithering principle . . . . .1368
Figure 498. Data format and register coding in dithering mode . . . . .1369
Figure 499. PWM resolution vs frequency . . . . .1370
Figure 500. PWM dithering pattern . . . . .1370
Figure 501. Dithering effect on duty cycle in center-aligned PWM mode . . . . .1371
Figure 502. Generation of a phase-shifted PWM signal with 50% duty cycle . . . . .1372
Figure 503. Combined PWM mode on channel 1 and 2 . . . . .1374
Figure 504. Complementary output with symmetrical dead-time insertion. . . . .1375
Figure 505. Asymmetrical deadtime . . . . .1376
Figure 506. Dead-time waveforms with delay greater than the negative pulse. . . . .1376
Figure 507. Dead-time waveforms with delay greater than the positive pulse. . . . .1376
Figure 508. Clock prescalers for dead-time and digital filters . . . . .1377
Figure 509. Break circuitry overview . . . . .1379
Figure 510. Output behavior in response to a break event on tim_brk . . . . .1381
Figure 511. Immediate break and Delayed 1/2 break modes . . . . .1382
Figure 512. Pulse termination during delayed break . . . . .1383
Figure 513. Delayed break with deadtime insertion. . . . .1383
Figure 514. Output redirection . . . . .1385
Figure 515. tim_ocref_clr input selection multiplexer. . . . .1386
Figure 516. Asymmetric PWM mode 1 . . . . .1387
Figure 517. Asymmetric PWM mode 2 . . . . .1387
Figure 518. Combined PWM mode 1. . . . .1388
Figure 519. 6-step generation, COM example (OSSR = 1) . . . . .1389
Figure 520. Example of one pulse mode . . . . .1390
Figure 521. Retriggerable one pulse mode . . . . .1392
Figure 522. Example of counter operation in encoder interface mode. . . . .1394
Figure 523. Example of encoder interface mode with tim_ti1fp1 polarity inverted. . . . .1394
Figure 524. Quadrature encoder counting modes . . . . .1395
Figure 525. Direction plus clock encoder mode. . . . .1396
Figure 526. Directional clock encoder mode (CC1P = CC2P = 0) . . . . .1396
Figure 527. Directional clock encoder mode (CC1P = CC2P = 1) . . . . .1397
Figure 528. State diagram for quadrature encoded signals. . . . .1398
Figure 529. Encoder mode change with preload transferred on update . . . . .1398
Figure 530. Encoder with built-in debouncer, x2 mode . . . . .1400
Figure 531. Encoder with built-in debouncer, x4 mode . . . . .1400
Figure 532. Clock drift measure using directional clock mode. . . . .1401
Figure 533. Measuring time interval between edges on 2 signals . . . . .1402
Figure 534. XOR gate connection with TI1S = 1 and XORPS = 0 . . . . .1402
Figure 535. XOR gate connection with TI1S = 1 and XORPS = 1 . . . . .1403
Figure 536. Control circuit in reset mode . . . . .1404
Figure 537. Control circuit in gated mode . . . . .1405
Figure 538. Control circuit in trigger mode. . . . .1406
Figure 539. LPTIM1 block diagram(1) . . . . .1485
Figure 540. Glitch filter timing diagram . . . . .1489
Figure 541. LPTIM output waveform, single-counting mode configuration
when repetition register content is different than zero (with PRELOAD = 1) . . . . .
1491
Figure 542. LPTIM output waveform, single-counting mode configuration
and Set-once mode activated (WAVE bit is set). . . . .
1491
Figure 543. LPTIM output waveform, Continuous counting mode configuration . . . . .1492
Figure 544. Waveform generation . . . . .1493
Figure 545. Encoder mode counting sequence . . . . .1497
Figure 546. Continuous counting mode when repetition register LPTIM_RCR
different from zero (with PRELOAD = 1). . . . .
1498
Figure 547. Capture/compare input stage (channel 1) . . . . .1499
Figure 548. Capture/compare output stage (channel 1) . . . . .1499
Figure 549. Edge-aligned PWM mode (PRELOAD = 1) . . . . .1501
Figure 550. Edge-aligned PWM waveforms (ARR=8 and CCxP = 0) . . . . .1502
Figure 551. PWM mode with immediate update versus preloaded update . . . . .1503
Figure 552. Independent watchdog block diagram . . . . .1529
Figure 553. Reset timing due to timeout . . . . .1531
Figure 554. Reset timing due to refresh in the not allowed area . . . . .1532
Figure 555. Changing PR, RL, and performing a refresh(1) . . . . .1533
Figure 556. Window comparator update(1) . . . . .1534
Figure 557. Independent watchdog interrupt timing diagram. . . . .1536
Figure 558. Early wake-up comparator update(1) . . . . .1537
Figure 559. Watchdog block diagram . . . . .1545
Figure 560. Window watchdog timing diagram . . . . .1547
Figure 561. RTC block diagram . . . . .1552
Figure 562. TAMP block diagram . . . . .1598
Figure 563. Backup registers protection zones . . . . .1601
Figure 564. Tamper sampling with precharge pulse . . . . .1605
Figure 565. Low level detection with precharge and filtering . . . . .1605
Figure 566. Block diagram . . . . .1626
Figure 567. I2C-bus protocol . . . . .1628
Figure 568. Setup and hold timings . . . . .1630
Figure 569. I2C initialization flow . . . . .1632
Figure 570. Data reception . . . . .1633
Figure 571. Data transmission . . . . .1634
Figure 572. Target initialization flow . . . . .1637
Figure 573. Transfer sequence flow for I2C target transmitter, NOSTRETCH = 0 . . . . .1639
Figure 574. Transfer sequence flow for I2C target transmitter, NOSTRETCH = 1 . . . . .1640
Figure 575. Transfer bus diagrams for I2C target transmitter (mandatory events only) . . . . .1641
Figure 576. Transfer sequence flow for I2C target receiver, NOSTRETCH = 0 . . . . .1642
Figure 577. Transfer sequence flow for I2C target receiver, NOSTRETCH = 1 . . . . .1643
Figure 578. Transfer bus diagrams for I2C target receiver
(mandatory events only) . . . . .
1643
Figure 579. Controller clock generation . . . . .1645
Figure 580. Controller initialization flow . . . . .1647
Figure 581. 10-bit address read access with HEAD10R = 0 . . . . .1647
Figure 582. 10-bit address read access with HEAD10R = 1 . . . . .1648
Figure 583. Transfer sequence flow for I2C controller transmitter, N ≤ 255 bytes. . . . .1649
Figure 584. Transfer sequence flow for I2C controller transmitter, N > 255 bytes. . . . .1650
Figure 585. Transfer bus diagrams for I2C controller transmitter
(mandatory events only) . . . . .
1651
Figure 586. Transfer sequence flow for I2C controller receiver, N ≤ 255 bytes . . . . .1653
Figure 587. Transfer sequence flow for I2C controller receiver, N > 255 bytes. . . . .1654
Figure 588. Transfer bus diagrams for I2C controller receiver
(mandatory events only) . . . . .
1655
Figure 589. Timeout intervals for tLOW:SEXT, tLOW:MEXT . . . . .1659
Figure 590. Transfer sequence flow for SMBus target transmitter N bytes + PEC . . . . .1662
Figure 591. Transfer bus diagram for SMBus target transmitter (SBC = 1). . . . .1663
Figure 592. Transfer sequence flow for SMBus target receiver N bytes + PEC . . . . .1664
Figure 593. Bus transfer diagrams for SMBus target receiver (SBC = 1) . . . . .1665
Figure 594. Bus transfer diagrams for SMBus controller transmitter . . . . .1666
Figure 595. Bus transfer diagrams for SMBus controller receiver . . . . .1668
Figure 596. I3C block diagram . . . . .1692
Figure 597. I3C (primary) controller state and programming sequence diagram. . . . .1697
Figure 598.I3C target state and programing sequence diagram1702
Figure 599.I3C CCC messages, as controller1716
Figure 600.I3C broadcast ENTDAA CCC, as controller1717
Figure 601.I3C broadcast, direct read and direct write RSTACT CCC, as controller1718
Figure 602.I3C CCC messages, as target1720
Figure 603.I3C broadcast ENTDAA CCC, as target1721
Figure 604.I3C broadcast DEFTGTS CCC, as target1722
Figure 605.I3C broadcast DEFGRPA CCC, as target1723
Figure 606.I3C private read/write messages, as controller1725
Figure 607.I3C private read/write messages, as target1726
Figure 608.Legacy I2C read/write messages, as controller1727
Figure 609.IBI transfer, as controller/target1728
Figure 610.Hot-join request transfer, as controller/target1729
Figure 611.Controller-role request transfer, as controller/target1730
Figure 612.C-FIFO management, as controller1731
Figure 613.TX-FIFO management, as controller1733
Figure 614.RX-FIFO management, as controller1735
Figure 615.S-FIFO management, as controller1738
Figure 616.RX-FIFO management, as target on the I3C bus1739
Figure 617.TX-FIFO management with I3C_TGTTDR, as target on the I3C bus1741
Figure 618.TX-FIFO management by software without I3C_TGTTDR
if reading less bytes than TX-FIFO size, as target
1743
Figure 619.USART block diagram1801
Figure 620.Word length programming1805
Figure 621.Configurable stop bits1807
Figure 622.TC/TXE behavior when transmitting1809
Figure 623.Start bit detection when oversampling by 16 or 81810
Figure 624.usart_ker_ck clock divider block diagram1813
Figure 625.Data sampling when oversampling by 161814
Figure 626.Data sampling when oversampling by 81815
Figure 627.Mute mode using Idle line detection1822
Figure 628.Mute mode using address mark detection1823
Figure 629.Break detection in LIN mode (11-bit break length - LBDL bit is set)1826
Figure 630.Break detection in LIN mode vs. Framing error detection1827
Figure 631.USART example of synchronous master transmission1828
Figure 632.USART data clock timing diagram in synchronous master mode
(M bits = 00)
1828
Figure 633.USART data clock timing diagram in synchronous master mode
(M bits = 01)
1829
Figure 634.USART data clock timing diagram in synchronous slave mode
(M bits = 00)
1830
Figure 635.ISO 7816-3 asynchronous protocol1832
Figure 636.Parity error detection using the 1.5 stop bits1834
Figure 637.IrDA SIR ENDEC block diagram1838
Figure 638.IrDA data modulation (3/16) - normal mode1838
Figure 639.Transmission using DMA1840
Figure 640.Reception using DMA1841
Figure 641.Hardware flow control between two USARTs1841
Figure 642.RS232 RTS flow control1842
Figure 643.RS232 CTS flow control1843
Figure 644.Wake-up event verified (wake-up event = address match, FIFO disabled)1846
Figure 645.Wake-up event not verified (wake-up event = address match,
FIFO disabled) . . . . .1846
Figure 646.LPUART block diagram . . . . .1891
Figure 647.LPUART word length programming . . . . .1894
Figure 648.Configurable stop bits . . . . .1896
Figure 649.TC/TXE behavior when transmitting . . . . .1898
Figure 650.lpuart_ker_ck clock divider block diagram . . . . .1902
Figure 651.Mute mode using Idle line detection . . . . .1906
Figure 652.Mute mode using address mark detection . . . . .1907
Figure 653.Transmission using DMA . . . . .1909
Figure 654.Reception using DMA . . . . .1910
Figure 655.Hardware flow control between two LPUARTs . . . . .1911
Figure 656.RS232 RTS flow control . . . . .1911
Figure 657.RS232 CTS flow control . . . . .1912
Figure 658.Wake-up event verified (wake-up event = address match,
FIFO disabled) . . . . .
1915
Figure 659.Wake-up event not verified (wake-up event = address match,
FIFO disabled) . . . . .
1915
Figure 660.SPI/I2S block diagram . . . . .1947
Figure 661.Full-duplex single master/ single slave application . . . . .1950
Figure 662.Half-duplex single master/ single slave application . . . . .1951
Figure 663.Simplex single master / single slave application
(master in transmit-only / slave in receive-only mode) . . . . .
1952
Figure 664.Master and three independent slaves connected in star topology . . . . .1953
Figure 665.Master and three slaves connected in circular (daisy chain) topology . . . . .1955
Figure 666.Multimaster application . . . . .1956
Figure 667.Scheme of NSS control logic . . . . .1958
Figure 668.Data flow timing control (SSOE = 1, SSOM = 0, SSM = 0) . . . . .1958
Figure 669.NSS interleaving pulses between data (SSOE = 1, SSOM = 1, SSM = 0) . . . . .1959
Figure 670.Data clock timing diagram . . . . .1961
Figure 671.Data alignment when data size is not equal to 8, 16 or 32 bits . . . . .1962
Figure 672.TI mode transfer . . . . .1971
Figure 673.Optional configurations of the slave behavior when an underrun condition is detected . . . . .1973
Figure 674.Waveform examples . . . . .1981
Figure 675.Master I2S Philips protocol waveforms (16/32-bit full accuracy) . . . . .1982
Figure 676.I2S Philips standard waveforms . . . . .1982
Figure 677.Master MSB-justified 16- or 32-bit full-accuracy length . . . . .1983
Figure 678.Master MSB-justified 16- or 24-bit data length . . . . .1983
Figure 679.Slave MSB-justified 16-, 24- or 32-bit data length . . . . .1984
Figure 680.LSB-justified 16 or 24-bit data length . . . . .1984
Figure 681.Master PCM when the frame length is equal the data length . . . . .1985
Figure 682.Master PCM standard waveforms (16 or 24-bit data length) . . . . .1985
Figure 683.Slave PCM waveforms . . . . .1986
Figure 684.Startup sequence, I2S Philips standard, master . . . . .1989
Figure 685.Startup sequence, I2S Philips standard, slave . . . . .1990
Figure 686.Stop sequence, I2S Philips standard, master . . . . .1990
Figure 687.I2S clock generator architecture . . . . .1991
Figure 688.Data Format . . . . .1993
Figure 689.Handling of underrun situation . . . . .1995
Figure 690.Handling of overrun situation . . . . .1996
Figure 691.Frame error detection, with FIXCH = 0 . . . . .1997
Figure 692.Frame error detection, with FIXCH = 1 . . . . .1997
Figure 693.CAN subsystem . . . . .2022
Figure 694.FDCAN block diagram2024
Figure 695.Bit timing2026
Figure 696.Transceiver delay measurement2031
Figure 697.Pin control in bus monitoring mode2032
Figure 698.Pin control in loop-back mode2035
Figure 699.CAN error state diagram2036
Figure 700.Message RAM configuration2037
Figure 701.Standard message ID filter path2040
Figure 702.Extended message ID filter path2041
Figure 703.USB peripheral block diagram2088
Figure 704.Packet buffer areas with examples of buffer description table locations2094
Figure 705.High-level Ethernet block diagram2139
Figure 706.DMA transmission flow (standard mode)2142
Figure 707.DMA transmission flow (OSP mode)2144
Figure 708.Receive DMA flow2146
Figure 709.Overview of MAC transmission flow2150
Figure 710.MAC reception flow2152
Figure 711.Packet filtering sequence2156
Figure 712.Networked time synchronization2165
Figure 713.Propagation delay calculation in clocks supporting
peer-to-peer path correction
2166
Figure 714.System time update using fine correction method2176
Figure 715.TCP segmentation offload overview2193
Figure 716.TCP segmentation offload flow2194
Figure 717.Header and payload fields of segmented packets2197
Figure 718.Supported PHY interfaces2206
Figure 719.SMA Interface block2206
Figure 720.MDIO packet structure (Clause 45)2207
Figure 721.MDIO packet structure (Clause 22)2208
Figure 722.SMA write operation flow2210
Figure 723.Write data packet2211
Figure 724.Read data packet2211
Figure 725.Media independent interface (MII) signals2213
Figure 726.RMII block diagram2215
Figure 727.Transmission bit order2216
Figure 728.Receive bit order2217
Figure 729.LPI transitions (Transmit, 100 Mbds)2225
Figure 730.LPI Tx clock gating (when LPITCSE = 1)2226
Figure 731.LPI transitions (receive, 100 Mbit/s)2227
Figure 732.Descriptor ring structure2251
Figure 733.DMA descriptor ring2253
Figure 734.Descriptor tail pointer example 12253
Figure 735.Descriptor tail pointer example 22254
Figure 736.Transmit descriptor (read format)2255
Figure 737.Transmit descriptor write-back format2260
Figure 738.Transmit context descriptor format2264
Figure 739.Receive normal descriptor (read format)2268
Figure 740.Receive normal descriptor (write-back format)2271
Figure 741.Receive context descriptor2278
Figure 742.Generation of ETH_DMAISR flags2293
Figure 743.Block diagram of debug support infrastructure2414
Figure 744.Product life cycle states and regression management2417

Figure 745. Product life cycle states and transition management .....2419
Figure 746. JTAG TAP state machine .....2420
Figure 747. CoreSight topology .....2440
Figure 748. Trace port interface unit (TPIU) .....2515
Figure 749. Embedded cross trigger .....2526