STM32L5-serien Mycket säker med låg strömförbrukning
“
Specifikationer:
- Produktnamn: RM0438 Referensmanual
- Revision: Rev 8
- Sidor: 1 till 2187
- Releasedatum: juni 2025
- Tillverkare: www.st.com
Produktinformation:
Referensmanualen RM0438 ger detaljerad information om
minnes- och bussarkitektur, TrustZone säkerhetsarkitektur,
minnesorganisation, inbäddat SRAM, flashminne överview, stövel
konfiguration och systemsäkerhet.
Produktanvändningsinstruktioner:
Minnes- och bussarkitektur:
Systemarkitekturen inkluderar snabb C-buss, långsam C-buss, S-buss,
DMA-buss, SDMMC-styrenhets DMA-buss och BusMatrix.
TrustZone säkerhetsarkitektur:
Förklarar standardsäkerhetsläget för TrustZone och TrustZone
perifer klassificering.
Minnesorganisation:
Beskriver minneskartan, registergränsadresserna och
organisation av inbäddade SRAM.
Inbyggt SRAM:
Detaljer SRAM2 paritetskontroll, skrivskydd, lässkydd,
radera operationer.
Flashminne slutview:
Ger en överview av det flashminne som används i systemet.
Startkonfiguration:
Täcker systemets startkonfigurationsinställningar.
Systemsäkerhet:
Introduktion till systemsäkerhetsåtgärder.
Vanliga frågor (FAQ):
F: Var kan jag hitta information om återställning av register
värden?
A: Registrets återställningsvärden beskrivs i avsnitt 1.3 i
manuell.
F: Vad är TrustZones säkerhetsarkitektur?
A: TrustZones säkerhetsarkitektur förklaras i avsnitt 2.2
av manualen.
F: Hur konfigurerar jag startinställningarna?
A: Instruktioner för startkonfiguration finns i avsnitt 3
av manualen.
"`
RM0438 Referensmanual
STM32L5-seriens avancerade Arm®-baserade 32-bitars mikrokontroller
Introduktion
Denna referensmanual riktar sig till applikationsutvecklare. Den ger fullständig information om hur man använder mikrokontrollerna STM32L552xx och STM32L562xx, deras minne och kringutrustning. STM32L552xx och STM32L562xx tillhör STM32L5x2-serien av mikrokontroller med olika minnesstorlekar, paket och kringutrustning. För beställningsinformation, mekaniska och elektriska enhetsegenskaper, se motsvarande datablad. För information om Arm® Cortex®-M33-kärnan, se Cortex®-M33 teknisk referensmanual. Mikroprocessorerna STM32L552xx och STM32L562xx inkluderar ST:s senaste patenterade teknik.
Relaterade dokument
· Cortex®-M33 teknisk referensmanual finns på http://infocenter.arm.com · Datablad för STM32L552xx och STM32L562xx · Felblad för STM32L552xx och STM32L562xx
juni 2025
RM0438 Rev 8
1/2187
www.st.com
1
Innehåll
Innehåll
RM0438
1
Dokumentationskonventioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
1.1 Allmän information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
1.2 Lista över förkortningar för register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
1.3 Registrets återställningsvärde . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
1.4 Ordlista . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
1.5 Tillgänglighet av kringutrustning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
2
Minnes- och bussarkitektur . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
2.1 Systemarkitektur . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
2.1.1 Snabb C-buss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
2.1.2 Långsam C-buss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
2.1.3 S-buss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
2.1.4 DMA-buss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
2.1.5 SDMMC-styrenhet DMA-buss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
2.1.6 Bussmatris . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
2.2 TrustZones säkerhetsarkitektur . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
2.2.1 Standardsäkerhetsstatus för TrustZone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
2.2.2 TrustZone-klassificering av kringutrustning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
2.3 Minnesorganisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
2.3.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
2.3.2 Minnesmappnings- och registergränsadresser . . . . . . . . . . . . . . . . . . . . . 87
2.4 Inbyggt SRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
2.4.1 SRAM2-paritetskontroll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
2.4.2 SRAM2 Skrivskydd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
2.4.3 SRAM2 Lässkydd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
2.4.4 Radera SRAM2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
2.5 Flashminne överview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
3
Startkonfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
4
Systemsäkerhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
4.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
4.2 Viktiga säkerhetsfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
2/2187
RM0438 Rev 8
RM0438
Innehåll
4.3 4.4 4.5 4.6
4.7 4.8 XNUMX XNUMX XNUMX XNUMX
4.9 4.10 4.11 4.12 4.13 XNUMX XNUMX XNUMX
Säker installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Säker start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
4.4.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 4.4.2 Unik startpost och BOOT_LOCK . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 4.4.3 Oföränderlig rot av förtroende i systemets flashminne . . . . . . . . . . . . . . . . . . 102
Säker uppdatering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Resursisolering med TrustZone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
4.6.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 4.6.2 TrustZone säkerhetsarkitektur . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 4.6.3 Armv8-M säkerhetsutökning av Cortex-M33 . . . . . . . . . . . . . . . . . . . . . . . 104 4.6.4 Minnes- och kringutrustningsallokering med IDAU/SAU . . . . . . . . . . . . . . . . 104 4.6.5 Minnes- och kringutrustningsallokering med GTZC . . . . . . . . . . . . . . . . . . . 106 4.6.6 Hantera säkerhet i TrustZone-medveten kringutrustning . . . . . . . . . . . . . . . . . . 109 4.6.7 Aktivera TrustZone-säkerhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 4.6.8 Inaktivera TrustZone-säkerhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Andra resursisoleringar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117
4.7.1 Temporär isolering med säkert döljskydd (HDP) . . . . . . . . . . . . . . 117
Säkert utförande . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118
4.8.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 4.8.2 Minnesskyddsenhet (MPU) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 4.8.3 Skrivskydd för inbyggt flashminne . . . . . . . . . . . . . . . . . . . . . . . . . 118 4.8.4 Tamper-detektering och respons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Säker förvaring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
4.9.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 4.9.2 Unikt ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Kryptomotorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
4.10.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 4.10.2 Funktioner hos kryptomotorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 4.10.3 On-the-fly dekrypteringsmotor (OTFDEC) . . . . . . . . . . . . . . . . . . . ... . . . . . 122
Produktens livscykel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
4.11.1 Livscykelhantering med avläsningsskydd (RDP) . . . . . . . . . . . . . . 124 4.11.2 Rekommenderade byte-inställningar för tillval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Åtkomstkontrollerad felsökning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
4.12.1 Felsökningsskydd med avläsningsskydd (RDP) . . . . . . . . . . . . . . . . . . . . 125
Skydd av immateriella rättigheter inom programvara och gemensam utveckling 126
RM0438 Rev 8
3/2187
54
Innehåll
RM0438
4.13.1
4.13.2 4.13.3 XNUMX XNUMX XNUMX XNUMX
Skydd av programvarans immateriella rättigheter med avläsningsskydd (RDP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Skydd av immateriella rättigheter i programvara med OTFDEC . . . . . . . . . . . . . 127
Andra immateriella rättigheter i programvara . . . . . . . . . . . . . . . . . . . 129
5
Global TrustZone®-kontrollant (GTZC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
5.1 Introduktion till GTZC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
5.2 GTZC:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
5.2.1 GTZC TrustZone systemarkitektur . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
5.3 GTZC funktionell beskrivning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
5.3.1 GTZC-blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
5.3.2 Definition av olaglig åtkomst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
5.3.3 TrustZone-säkerhetskontrollant (TZSC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
5.3.4 Minnesskyddsstyrenhet – blockbaserad (MPCBB) . . . . . . . . . . . . . . . 134
5.3.5 TrustZone olaglig åtkomstkontrollant (TZIC) . . . . . . . . . . . . . . . . . . . . . . . . . 135
5.3.6 Strömpåslag/återställningsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
5.3.7 DMA-begäranden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
5.4 GTZC-händelser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
5.5 GTZC_TZSC-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
5.5.1 GTZC_TZSC-kontrollregister (GTZC_TZSC_CR) . . . . . . . . . . . . . . . . . . . 136
5.5.2
GTZC_TZSC säkert konfigurationsregister 1 (GTZC_TZSC_SECCFGR1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
5.5.3
GTZC_TZSC säkert konfigurationsregister 2 (GTZC_TZSC_SECCFGR2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
5.5.4
GTZC_TZSC privilegiekonfigurationsregister 1 (GTZC_TZSC_PRIVCFGR1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
5.5.5
GTZC_TZSC privilegiekonfigurationsregister 2 (GTZC_TZSC_PRIVCFGR2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
5.5.6
GTZC_TZSC externt minne x osäkert vattenstämpelregister 1 (GTZC_TZSC_MPCWMxANSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
5.5.7
GTZC_TZSC externt minne x osäkert vattenstämpelregister 2 (GTZC_TZSC_MPCWMxBNSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
5.5.8 GTZC_TZSC registermappning och återställningsvärden . . . . . . . . . . . . . . . . . . . . . . 148
5.6 GTZC_MPCBB-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
5.6.1 GTZC_MPCBBx kontrollregister (GTZC_MPCBBx_CR) (x = 1 till 2). 150
5.6.2 GTZC_MPCBB1 låsregister 1(GTZC_MPCBB1_LCKVTR1) . . . . . . 151
5.6.3
GTZC_MPCBB2 låsregister 1 (GTZC_MPCBB2_LCKVTR1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
4/2187
RM0438 Rev 8
RM0438
Innehåll
5.6.4
GTZC_MPCBBx vektorregister y (GTZC_MPCBBx_VCTRy) (x = 1 till 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
5.6.5 GTZC_MPCBB1 registermappning och återställningsvärden . . . . . . . . . . . . . . . . . . . 153
5.6.6 GTZC_MPCBB2 registermappning och återställningsvärden . . . . . . . . . . . . . . . . . . . 153
5.7 GTZC_TZIC-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
5.7.1 GTZC_TZIC avbrottsaktiveringsregister 1 (GTZC_TZIC_IER1) . . . . . . . . 154
5.7.2 GTZC_TZIC avbrottsaktiveringsregister 2 (GTZC_TZIC_IER2) . . . . . . . . 157
5.7.3 GTZC_TZIC avbrottsaktiveringsregister 3 (GTZC_TZIC_IER3) . . . . . . . . 159
5.7.4 GTZC_TZIC statusregister 1 (GTZC_TZIC_SR1) . . . . . . . . . . . . . . . . . 160
5.7.5 GTZC_TZIC statusregister 2 (GTZC_TZIC_SR2) . . . . . . . . . . . . . . . . . 163
5.7.6 GTZC_TZIC statusregister 3 (GTZC_TZIC_SR3) . . . . . . . . . . . . . . . . . 165
5.7.7 GTZC_TZIC flagga rensning av register 1 (GTZC_TZIC_FCR1) . . . . . . . . . . . . . . 166
5.7.8 GTZC_TZIC flagga rensning av register 2 (GTZC_TZIC_FCR2) . . . . . . . . . . . . . . 169
5.7.9 GTZC_TZIC flagga rensning av register 3 (GTZC_TZIC_FCR3) . . . . . . . . . . . . . . 171
5.7.10 GTZC_TZIC registermappning och återställningsvärden . . . . . . . . . . . . . . . . . . . . . . . . 172
6
Inbyggt flashminne (FLASH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
6.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
6.2 FLASH-huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
6.3 Funktionsbeskrivning av flashminne . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
6.3.1 Flashminnesorganisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
6.3.2 Felkodskorrigering (ECC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
6.3.3 Läsåtkomstlatens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
6.3.4 Lågvolymtage läste . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
6.3.5 Flashprogrammering och radering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
6.3.6 Raderingssekvenser för flashminne . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
6.3.7 Programmeringssekvenser för flashminne . . . . . . . . . . . . . . . . . . . . . . 185
6.3.8 Flaggor för flashfel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
6.3.9
Läs-vid-skrivning (RWW) är endast tillgängligt i dubbelbanksläge (DBANK = 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
6.4 Antal byte för flashminnesalternativ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
6.4.1 Beskrivning av alternativbyte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
6.4.2 Programmering av optionbytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
6.5 Säkerhets- och privilegieskydd i Flash TrustZone . . . . . . . . . . . . . . . . . . . 193
6.5.1 TrustZone-säkerhetsskydd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
6.5.2 Säkert vattenstämpelbaserat områdesskydd . . . . . . . . . . . . . . . . . . . . . . . . . 195
6.5.3 Säkert hudskydd (HDP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
RM0438 Rev 8
5/2187
54
Innehåll
RM0438
6.5.4 Skydd av säkert blockbaserat område (SECBB) . . . . . . . . . . . . . . . . . . . . 196 6.5.5 Tvinga fram start från en säker minnesadress . . . . . . . . . . . . . . . . . . . . . 197 6.5.6 Attributets tillstånd för Flash-säkerhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 6.5.7 Flash registrerar privilegierade och oprivilegierade lägen . . . . . . . . . . . . . . . . . 198
6.6 Säkra systemminnet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
6.6.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 6.6.2 RSS allokerar resurser till bootloader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 6.6.3 RSSLIB-funktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 200
6.7 Skydd av flashminne . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
6.7.1 Skrivskydd (WRP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 6.7.2 Avläsningsskydd (RDP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
6.8 FLASH-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 6.9 FLASH-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
6.9.1 Register för flashåtkomstkontroll (FLASH_ACR) . . . . . . . . . . . . . . . . . . . . 213 6.9.2 Register för flashavstängningsnyckel (FLASH_PDKEYR) . . . . . . . . . . . . . . 214 6.9.3 Register för osäker flashnyckel (FLASH_NSKEYR) . . . . . . . . . . . . . . . 215 6.9.4 Register för säker flashnyckel (FLASH_SECKEYR) . . . . . . . . . . . . . . . . . . 215 6.9.5 Register för flashalternativnyckel (FLASH_OPTKEYR) . . . . . . . . . . . . . . . . . . . . 216 6.9.6 Låg blixtvolymtage-nyckelregister (FLASH_LVEKEYR) . . . . . . . . . . . . . . . . 216 6.9.7 Blixtstatusregister (FLASH_NSSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 6.9.8 Blixtstatusregister (FLASH_SECSR) . . . . . . . . . . . . . . . . . . . . . . . . . . 218 6.9.9 Osäkert blixtkontrollregister (FLASH_NSCR) . . . . . . . . . . . . . . . . 220 6.9.10 Register för säker blixtkontroll (FLASH_SECCR) . . . . . . . . . . . . . . . . . . . 222 6.9.11 Blixt-ECC-register (FLASH_ECCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 6.9.12 Register för blixttillval (FLASH_OPTR) . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 6.9.13 Flash-register för icke-säker startadress 0 (FLASH_NSBOOTADD0R) 227 6.9.14 Flash-register för icke-säker startadress 1 (FLASH_NSBOOTADD1R) 228 6.9.15 Flash-register för säker startadress 0 (FLASH_SECBOOTADD0R) . . 228 6.9.16 Flash-register för säkert vattenmärke 1 i bank 1 (FLASH_SECWM1R1) . . . . 229 6.9.17 Flash-register för säkert vattenmärke 1 i register 2 (FLASH_SECWM1R2) . . . . . . . . 230 6.9.18 Flash-adressregister för WPR1 område A (FLASH_WRP1AR) . . . . . . . . . 231 6.9.19 Flash WPR1 område B adressregister (FLASH_WRP1BR) . . . . . . . . . 232 6.9.20 Flash säkert watermak2-register (FLASH_SECWM2R1) . . . . . . . . . . 233 6.9.21 Flash säkert watermak2-register 2 (FLASH_SECWM2R2) . . . . . . . . 234 6.9.22 Flash WPR2 område A adressregister (FLASH_WRP2AR) . . . . . . . . . 235 6.9.23 Flash WPR2 område B adressregister (FLASH_WRP2BR) . . . . . . . . . 236
6/2187
RM0438 Rev 8
RM0438
Innehåll
6.9.24
6.9.25
6.9.26 6.9.27 6.9.28
FLASH säkert blockbaserat bank 1-register (FLASH_SECBB1Rx) (där x=1..4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
FLASH säkert blockbaserat bank 2-register (FLASH_SECBB2Rx) (där x=1..4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
FLASH säkert HDP-kontrollregister (FLASH_SECHDPCR) . . . . . . . . . 238
FLASH-privilegiumkonfigurationsregister (FLASH_PRIVCFGR) . . . . . . . . 238
FLASH-registerkarta och återställningsvärden . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
7
Instruktionscache (ICACHE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
7.1 Introduktion till ICACHE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
7.2 ICACHEs huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
7.3 ICACHE-implementering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
7.4 Funktionsbeskrivning av ICACHE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
7.4.1 Blockschema för ICACHE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
7.4.2 ICACHE-återställning och klockor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
7.4.3 ICACHE TAG minne . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
7.4.4 Direktmappad ICACHE (envägscache) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
7.4.5 Aktivera ICACHE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
7.4.6 Cachebar och icke-cachebar trafik . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
7.4.7 Adressommappning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
7.4.8 Cachelagrade åtkomster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
7.4.9 Dubbelmastercache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
7.4.10 ICACHE-säkerhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
7.4.11 ICACHE-underhåll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
7.4.12 ICACHE-prestandaövervakning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
7.4.13 ICACHE-start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
7.5 ICACHE lågströmslägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
7.6 ICACHE-felhantering och avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . 253
7.7 ICACHE-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
7.7.1 ICACHE-kontrollregister (ICACHE_CR) . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
7.7.2 ICACHE-statusregister (ICACHE_SR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
7.7.3 ICACHE-avbrottsaktiveringsregister (ICACHE_IER) . . . . . . . . . . . . . . . . . . . 255
7.7.4 ICACHE-flaggan för att tömma register (ICACHE_FCR) . . . . . . . . . . . . . . . . . . . . . . . 255
7.7.5 ICACHE-träffövervakningsregister (ICACHE_HMONR) . . . . . . . . . . . . . . . . . . . 256
7.7.6 ICACHE missövervakningsregister (ICACHE_MMONR) . . . . . . . . . . . . . . . . 256
7.7.7 ICACHE region x konfigurationsregister (ICACHE_CRRx) . . . . . . . . . . . 256
7.7.8 ICACHE-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
RM0438 Rev 8
7/2187
54
Innehåll
RM0438
8
Effektreglering (PWR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
8.1 Strömförsörjning och matningsdomäner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
8.1.1 Oberoende analog kringutrustningsförsörjning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
8.1.2 Oberoende I/O-matningsskena . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
8.1.3 Matning från oberoende USB-sändtagare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
8.1.4 Domän för batteribackup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
8.2 Systemförsörjningsvolymtage-förordning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
8.2.1 voltage-regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
8.2.2 Inbyggd SMPS-stegdown-omvandlare . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
8.2.3 SMPS-strömförsörjningsschema för nedströmskonverterare . . . . . . . . . . . . . . . . . . 268
8.2.4 SMPS-nedströmsomvandlare kontra lågeffektsläge . . . . . . . . . . . . . . . 269
8.2.5 Dynamisk volymtage-skalningshantering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
8.2.6 VDD12-domän och extern SMPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
8.3 Övervakning av strömförsörjning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
8.3.1
Strömpåslagsåterställning (POR) / strömavstängningsåterställning (PDR) / strömavbrottsåterställning (BOR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
8.3.2 Programmerbar volymtage-detektor (PVD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
8.3.3 Perifer volymtage-övervakning (PVM) . . . . . . . . . . . . . . . . . . . . . . . . . . 275
8.3.4 Övre volymtage tröskelövervakning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
8.3.5 Övervakning av temperaturtröskelvärde . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
8.4 Strömhantering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
8.4.1 Energilägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
8.4.2 Körläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
8.4.3 Lågeffektsläge (LP-drift) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
8.4.4 Lågströmslägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
8.4.5 Viloläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
8.4.6 Energisparläge (LP-viloläge) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
8.4.7 Stopp 0-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
8.4.8 Stopp 1-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
8.4.9 Stopp 2-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
8.4.10 Standby-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
8.4.11 Avstängningsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
8.4.12 Automatisk väckning från ett lågströmsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
8.5 PWR TrustZone-säkerhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
8.5.1 Privilegierade och oprivilegierade lägen för PWR . . . . . . . . . . . . . . . . . . . . . . . . . . 298
8.6 PWR-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
8/2187
RM0438 Rev 8
RM0438
Innehåll
8.6.1 8.6.2 8.6.3 8.6.4 8.6.5 8.6.6 8.6.7 8.6.8 8.6.9 8.6.10 8.6.11 8.6.12 8.6.13 8.6.14 8.6.15 8.6.16 8.6.17 8.6.18 8.6.19 8.6.20 8.6.21 8.6.22 8.6.23 8.6.24 8.6.25 8.6.26
Effektstyrregister 1 (PWR_CR1) . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 Effektstyrregister 2 (PWR_CR2) . . . . . . . . . . . . . . . . . . . . . . . . . . 300 Effektstyrregister 3 (PWR_CR3) . . . . . . . . . . . . . . . . . . . . . . . . . . 301 Effektstyrregister 4 (PWR_CR4) . . . . . . . . . . . . . . . . . . . . . . . . . 303 Strömstatusregister 1 (PWR_SR1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 Strömstatusregister 2 (PWR_SR2) . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 Register för rensning av strömstatus (PWR_SCR) . . . . . . . . . . . . . . . . . . . . . . . . 307 Pull-up-kontrollregister för strömport A (PWR_PUCRA) . . . . . . . . . . . . . 308 Strömport A:s neddragningsregister (PWR_PDCRA) . . . . . . . . . . . 308 Strömport B:s uppdragningsregister (PWR_PUCRB) . . . . . . . . . . . . . 309 Strömport B:s neddragningsregister (PWR_PDCRB) . . . . . . . . . . 310 Strömport C:s uppdragningsregister (PWR_PUCRC) . . . . . . . . . . . . 310 Strömport C:s neddragningsregister (PWR_PDCRC) . . . . . . . . . . 311 Strömport D:s uppdragningsregister (PWR_PUCRD) . . . . . . . . . . . . 311 Power Port D:s neddragningsregister (PWR_PDCRD) . . . . . . . . . . 312 Power Port E:s uppdragningsregister (PWR_PUCRE) . . . . . . . . . . . . . 313 Power Port E:s neddragningsregister (PWR_PDCRE) . . . . . . . . . . 313 Power Port F:s uppdragningsregister (PWR_PUCRF) . . . . . . . . . . . . . 314 Power Port F:s neddragningsregister (PWR_PDCRF) . . . . . . . . . . 314 Power Port G pull-up-kontrollregister (PWR_PUCRG) . . . . . . . . . . . . 315 Power Port G pull-down-kontrollregister (PWR_PDCRG) . . . . . . . . . . 316 Power Port H pull-up-kontrollregister (PWR_PUCRH) . . . . . . . . . . . . 316 Power Port H pull-down-kontrollregister (PWR_PDCRH) . . . . . . . . . . 317 Register för säker strömkonfiguration (PWR_SECCFGR) . . . . . . . . . . . 317 Register för strömprivilegier (PWR_PRIVCFGR) . . . . . . . . . 319 PWR-registermappning och återställningsvärden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
9
Återställning och klockstyrning (RCC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
9.1 Återställ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
9.1.1 Strömåterställning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
9.1.2 Systemåterställning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
9.1.3 Återställning av säkerhetskopia av domän . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
9.2 RCC-stift och interna signaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
9.3 Klockor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
9.3.1 HSE-klocka . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
9.3.2 HSI16-klocka . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
9.3.3 MSI-klocka . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
RM0438 Rev 8
9/2187
54
Innehåll
RM0438
9.3.4 HSI48-klocka . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 9.3.5 PLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 9.3.6 LSE-klocka . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 9.3.7 LSE-systemklocka . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 9.3.8 LSI-klocka . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 9.3.9 Val av systemklocka (SYSCLK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 9.3.10 Klockkällans frekvens kontra volymtage-skalning . . . . . . . . . . . . . . . . . . . . 335 9.3.11 Klocksäkerhetssystem (CSS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 9.3.12 Klocksäkerhetssystem på LSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 9.3.13 ADC-klocka . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 9.3.14 RTC-klocka . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 9.3.15 Timerklocka . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 9.3.16 Watchdog-klocka . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 9.3.17 Stämpelutkopplingsfunktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 9.3.18 Intern/extern klockmätning med TIM15/TIM16/TIM17 . . . . . 337 9.3.19 Perifera klockaktiveringsregister
(RCC_AHBxENR, RCC_APBxENRy) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
9.4 Lågströmslägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 9.5 RCC TrustZone®-säkerhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 9.6 RCC-privilegierat och oprivilegierat läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 9.7 RCC-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 9.8 RCC-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
9.8.1 RCC-klockkontrollregister (RCC_CR) . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 9.8.2 RCC:s interna kalibreringsregister för klockkällor (RCC_ICSCR) . . . . . . 348 9.8.3 RCC-klockkonfigurationsregister (RCC_CFGR) . . . . . . . . . . . . . . . . . . 349 9.8.4 RCC PLL-konfigurationsregister (RCC_PLLCFGR) . . . . . . . . . . . . . . . 352 9.8.5 RCC PLLSAI1-konfigurationsregister (RCC_PLLSAI1CFGR) . . . . . . . 355 9.8.6 RCC PLLSAI2-konfigurationsregister (RCC_PLLSAI2CFGR) . . . . . . . 358 9.8.7 RCC-avbrottsaktiveringsregister (RCC_CIER) . . . . . . . . . . . . . . . . 360 9.8.8 RCC-avbrottsflaggregister (RCC_CIFR) . . . . . . . . . . . . . . . . . . 361 9.8.9 RCC-avbrottsrensningsregister (RCC_CICR) . . . . . . . . . . . . . . . . . 363 9.8.10 RCC AHB1 kringutrustningsåterställningsregister (RCC_AHB1RSTR) . . . . . . . . . . 364 9.8.11 RCC AHB2 kringutrustningsåterställningsregister (RCC_AHB2RSTR) . . . . . . . . . . 365 9.8.12 RCC AHB3 kringutrustningsåterställningsregister (RCC_AHB3RSTR) . . . . . . . . . . 367 9.8.13 RCC APB1 kringutrustningsåterställningsregister 1 (RCC_APB1RSTR1) . . . . . . . . 368 9.8.14 RCC APB1 kringutrustningsåterställningsregister 2 (RCC_APB1RSTR2) . . . . . . . . 370 9.8.15 RCC APB2 kringutrustningsåterställningsregister (RCC_APB2RSTR) . . . . . . . . . . . 371
10/2187
RM0438 Rev 8
RM0438
Innehåll
9.8.16 9.8.17 9.8.18 9.8.19 9.8.20 9.8.21 9.8.22
9.8.23
9.8.24
9.8.25
9.8.26
9.8.27
9.8.28
9.8.29 9.8.30 9.8.31 9.8.32
9.8.33 9.8.34 9.8.35 9.8.36 9.8.37 9.8.38 9.8.39 9.8.40 9.8.41 9.8.42
RCC AHB1 perifert klockaktiveringsregister (RCC_AHB1ENR) . . . . . 373 RCC AHB2 perifert klockaktiveringsregister (RCC_AHB2ENR) . . . . . 374 RCC AHB3 perifert klockaktiveringsregister (RCC_AHB3ENR) . . . . . . 376
RCC APB1 perifer klockaktiveringsregister 1 (RCC_APB1ENR1) . . . 377 RCC APB1 perifer klockaktiveringsregister 2 (RCC_APB1ENR2) . . . 379
RCC APB2 perifer klockaktiveringsregister (RCC_APB2ENR) . . . . . 381 RCC AHB1 perifer klockaktiveringsregister i viloläge och stoppläge (RCC_AHB1SMENR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 RCC AHB2 perifer klockaktiveringsregister i viloläge och stoppläge (RCC_AHB2SMENR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
RCC AHB3 kringutrustningsklockor aktiveras i viloläge och stoppläge, register (RCC_AHB3SMENR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 RCC APB1 kringutrustningsklockor aktiveras i viloläge och stoppläge, register 1 (RCC_APB1SMENR1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 RCC APB1 kringutrustningsklockor aktiveras i viloläge och stoppläge, register 2 (RCC_APB1SMENR2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
RCC APB2 kringutrustningsklockor aktiveras i viloläge och stoppläge. Register för aktivering av RCC_APB2SMENR (RCC_APB391SMENR). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 RCC kringutrustning, oberoende klockkonfiguration, register 1 (RCC_CCIPR393). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 RCC Backup-domänkontrollregister (RCC_BDCR). . . . . . . . . . . ... XNUMX
RCC-kontroll-/statusregister (RCC_CSR) . . . . . . . . . . . . . . . . . . . . . . . . 398 RCC-klockåterställning RC-register (RCC_CRRCR) . . . . . . . . . . . . . . . . 400 RCC-kringutrustning, oberoende klockkonfigurationsregister 2 (RCC_CCIPR2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
OCTOSPI-fördröjningskonfigurationsregister (RCC_DLYCFGR) . . . . . . . . . 402 RCC:s säkert konfigurationsregister (RCC_SECCFGR) . . . . . . . . . . . . . 403 RCC:s säkert statusregister (RCC_SECSR) . . . . . . . . . . . . . . . . . . . . . 405
RCC AHB1 säkerhetsstatusregister (RCC_AHB1SECSR) . . . . . . . . . . . 407 RCC AHB2 säkerhetsstatusregister (RCC_AHB2SECSR) . . . . . . . . . . 408 RCC AHB3 säkerhetsstatusregister (RCC_AHB3SECSR) . . . . . . . . . . 410
RCC APB1 säkerhetsstatusregister 1 (RCC_APB1SECSR1) . . . . . . . 411 RCC APB1 säkerhetsstatusregister 2 (RCC_APB1SECSR2) . . . . . . . 414 RCC APB2 säkerhetsstatusregister (RCC_APB2SECSR) . . . . . . . . . . 415
RCC-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
10
System för klockåterställning (CRS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
10.1 Introduktion till CRS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
10.2 CRS huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
RM0438 Rev 8
11/2187
54
Innehåll
RM0438
10.3 10.4 XNUMX XNUMX XNUMX XNUMX
10.5 10.6 10.7
CRS-implementering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 CRS funktionell beskrivning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
10.4.1 CRS-blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 10.4.2 CRS-interna signaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 10.4.3 Synkroniseringsingång . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 10.4.4 Frekvensfelsmätning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 10.4.5 Frekvensfelsutvärdering och automatisk trimning . . . . . . . . . . . . . . . . 427 10.4.6 CRS-initialisering och konfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
CRS i lågströmsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 CRS-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 CRS-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
10.7.1 CRS-kontrollregister (CRS_CR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 10.7.2 CRS-konfigurationsregister (CRS_CFGR) . . . . . . . . . . . . . . . . . . . . . . 430 10.7.3 CRS-avbrotts- och statusregister (CRS_ISR) . . . . . . . . . . . . . . . . . . . . 431 10.7.4 CRS-avbrottsflagga för rensning (CRS_ICR) . . . . . . . . . . . . . . . . . . . . . 433 10.7.5 CRS-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
11
Allmänna I/O-enheter (GPIO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
11.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
11.2 GPIO:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
11.3 Funktionsbeskrivning av GPIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
11.3.1 Allmän I/O (GPIO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
11.3.2 I/O-pin alternerande funktionsmultiplexerare och mappning . . . . . . . . . . . . . . . . . . 438
11.3.3 I/O-portkontrollregister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
11.3.4 I/O-portdataregister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
11.3.5 Bitvis hantering av I/O-data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
11.3.6 GPIO-låsmekanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
11.3.7 I/O alternativ funktion ingång/utgång . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
11.3.8 Externa avbrotts-/väckningslinjer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
11.3.9 Ingångskonfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
11.3.10 Utgångskonfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
11.3.11 Konfiguration av alternativa funktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
11.3.12 Analog konfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
11.3.13 Använda HSE- eller LSE-oscillatorstiften som GPIO:er . . . . . . . . . . . . . . . . . . . 443
11.3.14 Använda GPIO-stiften i RTC-matningsdomänen . . . . . . . . . . . . . . . . . . . . 443
11.3.15 Använda PH3 som GPIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
12/2187
RM0438 Rev 8
RM0438
Innehåll
11.4 11.5 11.6
TrustZone-säkerhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
Privilegierade och oprivilegierade lägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
GPIO-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
11.6.1 GPIO-portlägesregister (GPIOx_MODER) (x =A till H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
11.6.2 GPIO-portens utgångstypregister (GPIOx_OTYPER) (x = A till H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
11.6.3 GPIO-portens utgångshastighetsregister (GPIOx_OSPEEDR) (x = A till H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
11.6.4 GPIO-port pull-up/pull-down register (GPIOx_PUPDR) (x = A till H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
11.6.5 GPIO-portens indataregister (GPIOx_IDR) (x = A till H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
11.6.6 GPIO-portens utgångsdataregister (GPIOx_ODR) (x = A till H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
11.6.7 Register för inställning/återställning av GPIO-portbitar (GPIOx_BSRR) (x = A till H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
11.6.8 Låsregister för GPIO-portkonfiguration (GPIOx_LCKR) (x = A till H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
11.6.9 GPIO alternativ funktion lågt register (GPIOx_AFRL) (x = A till H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
11.6.10 GPIO alternativ funktion högt register (GPIOx_AFRH) (x = A till H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
11.6.11 GPIO-portens bitåterställningsregister (GPIOx_BRR) (x = A till H) . . . . . . . . . . . . . . 452
11.6.12 GPIO säkert konfigurationsregister (GPIOx_SECCFGR) (x = A till H). 452
11.6.13 GPIO-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
12
Systemkonfigurationsstyrenhet (SYSCFG) . . . . . . . . . . . . . . . . . . . . . . . 456
12.1 SYSCFG:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
12.2 SYSCFG TrustZone-säkerhet och -privilegier . . . . . . . . . . . . . . . . . . . . . . . . . . 456
12.3 SYSCFG-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
12.3.1 SYSCFG säkert konfigurationsregister (SYSCFG_SECCFGR) . . . . . 458
12.3.2 SYSCFG-konfigurationsregister 1 (SYSCFG_CFGR1) . . . . . . . . . . . . . . 459
12.3.3 FPU-avbrottsmaskregister (SYSCFG_FPUIMR) . . . . . . . . . . . . . . . . . . 461
12.3.4 SYSCFG CPU-osäkert låsregister (SYSCFG_CNSLCKR) . . . . . 461
12.3.5 SYSCFG CPU-säkert låsregister (SYSCFG_CSLOCKR) . . . . . . . . . 462
12.3.6 SYSCFG-konfigurationsregister 2 (SYSCFG_CFGR2) . . . . . . . . . . . . . . 463
12.3.7 SYSCFG SRAM2 kontroll- och statusregister (SYSCFG_SCSR) . . . . 464
12.3.8 SYSCFG SRAM2-nyckelregister (SYSCFG_SKR) . . . . . . . . . . . . . . . . . . . 465
RM0438 Rev 8
13/2187
54
Innehåll
RM0438
12.3.9 SYSCFG SRAM2 skrivskyddsregister (SYSCFG_SWPR) . . . . . . 465 12.3.10 SYSCFG SRAM2 skrivskyddsregister 2 (SYSCFG_SWPR2) . . . 466 12.3.11 SYSCFG RSS-kommandoregister (SYSCFG_RSSCMDR) . . . . . . . . . 466 12.3.12 SYSCFG-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
13
Kringutrustnings sammankopplingsmatris . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
13.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
13.2 Anslutningssammanfattning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
13.3 Sammankopplingsdetaljer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
13.3.1 Från timer (TIM1/TIM2/TIM3/TIM4/TIM5/TIM8/TIM15/TIM16/TIM17) till timer (TIM1/TIM2/TIM3/TIM4/TIM5/TIM8/TIM15) . . . . . . . . . . . . . . . . . . 470
13.3.2 Från timer (TIM1/TIM2/TIM3/TIM4/TIM6/TIM8/TIM15) och EXTI till ADC (ADC1/ADC2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
13.3.3 Från ADC1/ADC2 till timer (TIM1/TIM8) . . . . . . . . . . . . . . . . . . . . . . . . . . 471
13.3.4 Från timer (TIM2/TIM4/TIM5/TIM6/TIM7/TIM8) och EXTI till DAC (DAC1/DAC2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
13.3.5 Från timer (TIM1/TIM3/TIM4/TIM6/TIM7/TIM8/TIM16/LPTIM1) och EXTI till DFSDM1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
13.3.6 Från DFSDM1 till timer (TIM1/TIM8/TIM15/TIM16/TIM17) . . . . . . . . . . 473
13.3.7 Från HSE, LSE, LSI, MSI, MCO, RTC till timer (TIM2/TIM15/TIM16/TIM17) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
13.3.8 Från RTC, COMP1, COMP2 till lågeffektstimer (LPTIM1/LPTIM2/LPTIM3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
13.3.9 Från timer (TIM1/TIM2/TIM3/TIM8/TIM15) till komparatorer (COMP1/COMP2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
13.3.10 Från ADC (ADC1) till ADC (ADC2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
13.3.11 Från USB till timer (TIM2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
13.3.12 Från intern analog källa till ADC (ADC1/ADC2) och OPAMP (ÖppnatAMP1/OPAM2). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
13.3.13 Från komparatorer (COMP1/COMP2) till timers (TIM1/TIM2/TIM3/TIM8/TIM15/TIM16/TIM17) . . . . . . . . . . . . . . . . . . . . . 475
13.3.14 Från systemfel till timers (TIM1/TIM8/TIM15/TIM16/TIM17) . . . . 476
13.3.15 Från timers (TIM16/TIM17) till IRTIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
13.3.16 Från ADC (ADC1/ADC2) till DFSDM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
14
Direktminnesåtkomstkontroller (DMA) . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
14.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
14.2 DMA:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
14.3 DMA-implementering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
14/2187
RM0438 Rev 8
RM0438
Innehåll
14.4
14.5 14.6 XNUMX XNUMX XNUMX XNUMX
14.3.1 DMA1 och DMA2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 14.3.2 DMA-begäranemappning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
DMA funktionell beskrivning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
14.4.1 DMA-blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 14.4.2 DMA-stift och interna signaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 14.4.3 DMA-överföringar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 14.4.4 DMA-arbitrering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482 14.4.5 DMA-kanaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 14.4.6 DMA-databredd, justering och endianness . . . . . . . . . . . . . . . . . . . . . . 488 14.4.7 DMA-felhantering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
DMA-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 DMA-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
14.6.1 DMA-avbrottsstatusregister (DMA_ISR) . . . . . . . . . . . . . . . . . . . . . . . 490 14.6.2 DMA-avbrottsflagga för rensning av register (DMA_IFCR) . . . . . . . . . . . . . . . . . . 494 14.6.3 DMA-kanal x konfigurationsregister (DMA_CCRx) . . . . . . . . . . . . . . . 495 14.6.4 DMA-kanal x antal data att överföra, register (DMA_CNDTRx) . 500 14.6.5 DMA-kanal x perifert adressregister (DMA_CPARx) . . . . . . . . 501 14.6.6 DMA-kanal x minne 0 adressregister (DMA_CM0ARx) . . . . . . . 501 14.6.7 DMA-kanal x minne 1 adressregister (DMA_CM1ARx) . . . . . . . 502 14.6.8 DMA-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
15
DMA-begäranmultiplexerare (DMAMUX) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
15.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
15.2 DMAMUX huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
15.3 DMAMUX-implementering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
15.3.1 DMAMUX-instansiering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
15.3.2 DMAMUX-mappning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
15.4 Funktionell beskrivning av DMAMUX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .511
15.4.1 DMAMUX-blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
15.4.2 DMAMUX-signaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
15.4.3 DMAMUX-kanaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
15.4.4 DMAMUX säkra/osäkra kanaler . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
15.4.5 DMAMUX privilegierade/icke-privilegierade kanaler . . . . . . . . . . . . . . . . . . . . . . 513
15.4.6 DMAMUX-förfrågningslinjemultiplexerare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
15.4.7 DMAMUX-förfrågningsgenerator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
15.5 DMAMUX-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
RM0438 Rev 8
15/2187
54
Innehåll
RM0438
15.6
DMAMUX-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
15.6.1 DMAMUX-förfrågningsradsmultiplexerare, kanal x-konfigurationsregister (DMAMUX_CxCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
15.6.2 DMAMUX-förfrågningsradsmultiplexor, statusregister för avbrottskanal (DMAMUX_CSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520
15.6.3 DMAMUX-förfrågningsradsmultiplexerare för avbrottskanal, rensningsflaggaregister (DMAMUX_CCFR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520
15.6.4 DMAMUX-förfrågningsgenerator, kanal x-konfigurationsregister (DMAMUX_RGxCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
15.6.5 DMAMUX-förfrågningsgeneratorns avbrottsstatusregister (DMAMUX_RGSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
15.6.6 DMAMUX-förfrågningsgenerator för avbrottsrensningsflagga (DMAMUX_RGCFR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
15.6.7 DMAMUX-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
16
Kapslad vektoriserad avbrottskontroller (NVIC) . . . . . . . . . . . . . . . . . . . . . . 528
16.1 NVIC:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
16.2 SysTick-kalibreringsvärdesregister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
16.3 Avbrotts- och undantagsvektorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
17
Utökad avbrotts- och händelsestyrenhet (EXTI) . . . . . . . . . . . . . . . . . . 533
17.1 EXTIs huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
17.2 EXTI-blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
17.2.1 EXTI-anslutningar mellan kringutrustning och processor . . . . . . . . . . . . . . . . . . 535
17.2.2 EXTI avbrott/händelsekartläggning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535
17.3 EXTI funktionsbeskrivning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
17.3.1 Konfigurerbar EXTI-händelseingångsväckning . . . . . . . . . . . . . . . . . . . . . . . . . . 537
17.3.2 EXTI direkt väckning av händelseingång . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
17.3.3 EXTI mux-val . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
17.4 EXTI funktionellt beteende . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
17.5 EXTI-händelseskydd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
17.5.1 EXTI-säkerhetsskydd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
17.5.2 EXTI-behörighetsskydd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542
17.6 EXTI-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
17.6.1 17.6.2 17.6.3 17.6.4
EXTI stigande triggervalsregister (EXTI_RTSR1) . . . . . . . . . . . . . . 543 EXTI valregister för fallande trigger (EXTI_FTSR1) . . . . . . . . . . . . . 544 EXTI programvaruavbrottshändelseregister (EXTI_SWIER1) . . . . . . . . . . . 545 EXTI stigande flank väntande register (EXTI_RPR1) . . . . . . . . . . . . . . . . 546
16/2187
RM0438 Rev 8
RM0438
Innehåll
17.6.5 EXTI fallande flank väntande register (EXTI_FPR1) . . . . . . . . . . . . . . . . 547 17.6.6 EXTI säkerhetskonfigurationsregister (EXTI_SECCFGR1) . . . . . . . . . . 548 17.6.7 EXTI-behörighetskonfigurationsregister (EXTI_PRIVCFGR1) . . . . . . . . . 549 17.6.8 EXTI stigande triggervalsregister (EXTI_RTSR2) . . . . . . . . . . . . . . 549 17.6.9 EXTI valregister för fallande trigger (EXTI_FTSR2) . . . . . . . . . . . . . 550 17.6.10 EXTI programvaruavbrottshändelseregister (EXTI_SWIER2) . . . . . . . . . . . 551 17.6.11 EXTI stigande flank väntande register (EXTI_RPR2) . . . . . . . . . . . . . . . . 551 17.6.12 EXTI fallande flank väntande register (EXTI_FPR2) . . . . . . . . . . . . . . . . 552 17.6.13 EXTI säkerhetsaktiveringsregister (EXTI_SECCFGR2) . . . . . . . . . . . . . . . 553 17.6.14 EXTI-privilegieaktiveringsregister (EXTI_PRIVCFGR2) . . . . . . . . . . . . . . 553 17.6.15 EXTI externt avbrottsvalregister (EXTI_EXTICRn) . . . . . . . . 554 17.6.16 EXTI-låsregister (EXTI_LOCKR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557 17.6.17 EXTI CPU väckning med avbrottsmaskregister (EXTI_IMR1) . . . . . . . 557 17.6.18 EXTI CPU väckning med händelsemaskregister (EXTI_EMR1) . . . . . . . . 558 17.6.19 EXTI CPU väckning med avbrottsmaskregister (EXTI_IMR2) . . . . . . . 559 17.6.20 EXTI CPU väckning med händelsemaskregister (EXTI_EMR2) . . . . . . . . 559 17.6.21 EXTI registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560
18
Enhet för beräkning av cyklisk redundanskontroll (CRC) . . . . . . . . . . . . . . . . . . 563
18.1 Introduktion till CRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
18.2 CRC:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
18.3 CRC funktionell beskrivning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
18.3.1 CRC-blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
18.3.2 CRC interna signaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
18.3.3 CRC-drift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
18.4 CRC-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566
18.4.1 18.4.2 18.4.3 18.4.4
CRC-dataregister (CRC_DR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566 CRC-oberoende dataregister (CRC_IDR) . . . . . . . . . . . . . . . . . . . . 566 CRC-kontrollregister (CRC_CR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 CRC-initialvärde (CRC_INIT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568
18.4.5 CRC-polynom (CRC_POL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568
18.4.6 CRC-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
19
Flexibel statisk minneskontroller (FSMC) . . . . . . . . . . . . . . . . . . . . . . . 570
19.1 Introduktion till FMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
19.2 FMC:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
RM0438 Rev 8
17/2187
54
Innehåll
RM0438
19.3 19.4 19.5 19.6
19.7
FMC-blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571 AHB-gränssnitt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
19.4.1 Minnen och transaktioner som stöds . . . . . . . . . . . . . . . . . . . . . . . . . . . 572
Adressmappning för extern enhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573
19.5.1 NOR/PSRAM-adressmappning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 19.5.2 Adressmappning för NAND-flashminne . . . . . . . . . . . . . . . . . . . . . . . . . 574
NOR-blixt/PSRAM-styrenhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
19.6.1 Gränssnittssignaler för externa minnesenheter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576 19.6.2 Minnen och transaktioner som stöds . . . . . . . . . . . . . . . . . . . . . . . . . . 578 19.6.3 Allmänna tidsregler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580 19.6.4 Asynkrona transaktioner för NOR-flash/PSRAM-styrenhet . . . . . . . . . . . . 580 19.6.5 Synkrona transaktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 19.6.6 NOR/PSRAM-styrenhetsregister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
NAND-blixtkontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
19.7.1 Gränssnittssignaler för externa minnesenheter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 19.7.2 Minnen och transaktioner som stöds av NAND-flashminne . . . . . . . . . . . . . . . . . 614 19.7.3 Tidsdiagram för NAND-flashminne . . . . . . . . . . . . . . . . . . . . . . . . 615 19.7.4 NAND-flashfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615 19.7.5 NAND-flashförväntningsfunktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 19.7.6 Beräkning av felkorrigeringskod (ECC)
i NAND-flashminne . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 19.7.7 NAND-flashstyrenhetsregister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 19.7.8 FMC-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624
20
Octo-SPI-gränssnitt (OCTOSPI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626
20.1 OCTOSPI introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626
20.2 OCTOSPI huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626
20.3 OCTOSPI-implementering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627
20.4 OCTOSPI funktionsbeskrivning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628
20.4.1 OCTOSPI blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628
20.4.2 OCTOSPI-stift och interna signaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
20.4.3 OCTOSPI-gränssnitt till minneslägen . . . . . . . . . . . . . . . . . . . . . . . . . . . 630
20.4.4 OCTOSPI protokoll för vanligt kommando . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630
20.4.5 OCTOSPI signalgränssnitt för vanligt kommandoprotokoll . . . . . . . . . . . . . . . . 634
20.4.6 HyperBus-protokoll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
20.4.7 Specifika egenskaper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641
18/2187
RM0438 Rev 8
RM0438
Innehåll
20.5 20.6 20.7
20.4.8 OCTOSPI driftläge introduktion . . . . . . . . . . . . . . . . . . . . . . . . 642 20.4.9 OCTOSPI indirekt läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642 20.4.10 OCTOSPI automatiskt statuspollingläge . . . . . . . . . . . . . . . . . . . . . . 644 20.4.11 OCTOSPI minnesmappat läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 20.4.12 OCTOSPI-konfigurationsintroduktion . . . . . . . . . . . . . . . . . . . . . . . . . . 646 20.4.13 OCTOSPI-systemkonfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646 20.4.14 OCTOSPI-enhetskonfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646 20.4.15 OCTOSPI konfiguration av vanligt kommandoläge . . . . . . . . . . . . . . . . 649 20.4.16 OCTOSPI HyperBus-protokollkonfiguration . . . . . . . . . . . . . . . . . . . . . 651 20.4.17 OCTOSPI-felhantering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652 20.4.18 OCTOSPI UPPTAGET och AVBORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 20.4.19 OCTOSPI omkonfigurering eller avaktivering . . . . . . . . . . . . . . . . . . . . . . 653 20.4.20 NCS beteende . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 653
Adressjustering och datanummer . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 OCTOSPI avbryter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 OCTOSPI-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657
20.7.1 OCTOSPI-kontrollregister (OCTOSPI_CR) . . . . . . . . . . . . . . . . . . . . . 657 20.7.2 OCTOSPI-enhetskonfigurationsregister 1 (OCTOSPI_DCR1) . . . . . . 659 20.7.3 OCTOSPI-enhetskonfigurationsregister 2 (OCTOSPI_DCR2) . . . . . . 661 20.7.4 OCTOSPI-enhetskonfigurationsregister 3 (OCTOSPI_DCR3) . . . . . . 662 20.7.5 OCTOSPI-enhetskonfigurationsregister 4 (OCTOSPI_DCR4) . . . . . . 662 20.7.6 OCTOSPI statusregister (OCTOSPI_SR) . . . . . . . . . . . . . . . . . . . . . . 663 20.7.7 OCTOSPI-flagga rensa register (OCTOSPI_FCR) . . . . . . . . . . . . . . . . . . 664 20.7.8 OCTOSPI datalängdregister (OCTOSPI_DLR) . . . . . . . . . . . . . . . . 664 20.7.9 OCTOSPI adressregister (OCTOSPI_AR) . . . . . . . . . . . . . . . . . . . . 665 20.7.10 OCTOSPI-dataregister (OCTOSPI_DR) . . . . . . . . . . . . . . . . . . . . . . . 665 20.7.11 OCTOSPI pollingstatus maskregister (OCTOSPI_PSMKR) . . . . . . . 666 20.7.12 OCTOSPI polling status match register (OCTOSPI_PSMAR) . . . . . . . 667 20.7.13 OCTOSPI avfrågningsintervallregister (OCTOSPI_PIR) . . . . . . . . . . . . . . 667 20.7.14 OCTOSPI kommunikationskonfigurationsregister (OCTOSPI_CCR) . . 667 20.7.15 OCTOSPI tidskonfigurationsregister (OCTOSPI_TCR) . . . . . . . . . . 670 20.7.16 OCTOSPI instruktionsregister (OCTOSPI_IR) . . . . . . . . . . . . . . . . . . . 670 20.7.17 OCTOSPI alternativa byteregister (OCTOSPI_ABR) . . . . . . . . . . . . . 671 20.7.18 OCTOSPI timeoutregister för låg effekt (OCTOSPI_LPTR) . . . . . . . . . . 671 20.7.19 OCTOSPI-omslagskommunikationskonfigurationsregister
(OCTOSPI_WPCCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672 20.7.20 OCTOSPI wrap timing konfigurationsregister (OCTOSPI_WPTCR) . . 674
RM0438 Rev 8
19/2187
54
Innehåll
RM0438
20.7.21 OCTOSPI wrap-instruktionsregister (OCTOSPI_WPIR) . . . . . . . . . . . . 674 20.7.22 OCTOSPI wrap alternate byte register (OCTOSPI_WPABR) . . . . . . 675 20.7.23 OCTOSPI skriva kommunikationskonfigurationsregister
(OCTOSPI_WCCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675 20.7.24 OCTOSPI skriva timing konfigurationsregister (OCTOSPI_WTCR) . . . . 677 20.7.25 OCTOSPI skrivinstruktionsregister (OCTOSPI_WIR) . . . . . . . . . . . . . 678 20.7.26 OCTOSPI skriv alternativt byteregister (OCTOSPI_WABR) . . . . . . . 678 20.7.27 OCTOSPI HyperBus latenskonfigurationsregister
(OCTOSPI_HLCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679 20.7.28 OCTOSPI registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
21
Analog-till-digital-omvandlare (ADC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
21.1 Introduktion till ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
21.2 ADC:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
21.3 ADC-implementering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
21.4 Funktionsbeskrivning av ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
21.4.1 Blockschema för ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
21.4.2 ADC-stift och interna signaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
21.4.3 ADC-klockor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688
21.4.4 ADC1/2-anslutning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690
21.4.5 Slav AHB-gränssnitt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692
21.4.6 ADC Djup avstängningsläge (DEEPPWD) och ADC-volymtage-regulator (ADVREGEN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692
21.4.7 Enkelsidiga och differentiella ingångskanaler . . . . . . . . . . . . . . . . . . . . . . . 693
21.4.8 Kalibrering (ADCAL, ADCALDIF, ADC_CALFACT) . . . . . . . . . . . . . . . . . 693
21.4.9 ADC på/av-styrning (ADEN, ADDIS, ADRDY) . . . . . . . . . . . . . . . . . . . . . . 696
21.4.10 Begränsningar vid skrivning av ADC-kontrollbitar . . . . . . . . . . . . . . . . . . . . . . 697
21.4.11 Kanalval (ADC_SQRy, ADC_JSQR) . . . . . . . . . . . . . . . . . . . . . . 698
21.4.12 Kanalvis programmerbara sampsamtalstid (SMPR1, SMPR2) . . . . . 699
21.4.13 Enkelkonverteringsläge (CONT = 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699
21.4.14 Kontinuerligt konverteringsläge (CONT = 1) . . . . . . . . . . . . . . . . . . . . . . . . 700
21.4.15 Starta konverteringar (ADSTART, JADSTART) . . . . . . . . . . . . . . . . . . . . . 701
21.4.16 ADC-timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702
21.4.17 Stoppa en pågående konvertering (ADSTP, JADSTP) . . . . . . . . . . . . . . . . 702
21.4.18 Konvertering på extern trigger och triggerpolaritet (EXTSEL, EXTEN, JEXTSEL, JEXTEN) . . . . . . . . . . . . . . . . . . . . . . . . . 704
21.4.19 Hantering av injicerade kanaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706
21.4.20 Diskontinuerligt läge (DISCEN, DISCNUM, JDISCEN) . . . . . . . . . . . . 708
20/2187
RM0438 Rev 8
RM0438
Innehåll
21.5 21.6 21.7
21.4.21 Kö med kontext för injicerade konverteringar . . . . . . . . . . . . . . . . . . . . . . . . 709 21.4.22 Programmerbar upplösning (RES) – Snabbt konverteringsläge . . . . . . . . . . 717 21.4.23 Slut på konvertering, slut på samplångfas (EOC, JEOC, EOSMP) . . 718 21.4.24 Slut på konverteringssekvens (EOS, JEOS) . . . . . . . . . . . . . . . . . . . . . . . 718 21.4.25 Tidsdiagram example (enkelt/kontinuerligt läge,
hårdvaru-/programvarutlösare) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 21.4.26 Datahantering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721 21.4.27 Hantera konverteringar med DFSDM . . . . . . . . . . . . . . . . . . . . . . . . . 726 21.4.28 Dynamiska lågströmsfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727 21.4.29 Analog fönsterövervakning (AWD1EN, JAWD1EN, AWD1SGL,
AWD1CH, AWD2CH, AWD3CH, AWD_HTx, AWD_LTx, AWDx). . . . . 732 21.4.30 Oversampler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736 21.4.31 Dubbla ADC-lägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742 21.4.32 Temperatursensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755 21.4.33 VBAT-matningsövervakning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757 21.4.34 Övervakning av intern volymtage-referens . . . . . . . . . . . . . . . . . . . . . . . . . . 758
ADC i lågströmsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759 ADC-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760 ADC-register (för varje ADC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... . . . . 761
21.7.1 ADC-avbrotts- och statusregister (ADC_ISR) . . . . . . . . . . . . . . . . . . . . 761 21.7.2 ADC-avbrottsaktiveringsregister (ADC_IER) . . . . . . . . . . . . . . . . . . . . . . 763 21.7.3 ADC-styrregister (ADC_CR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765 21.7.4 ADC-konfigurationsregister (ADC_CFGR) . . . . . . . . . . . . . . . . . . . . . . . . 768 21.7.5 ADC-konfigurationsregister 2 (ADC_CFGR2) . . . . . . . . . . . . . . . . . . . . 772 21.7.6 ADC-enheterampTidsregister 1 (ADC_SMPR1) . . . . . . . . . . . . . . . . . . . . . . . 774 21.7.7 ADC-enheterampTidsregister 2 (ADC_SMPR2) . . . . . . . . . . . . . . . . . . . . . 775 21.7.8 ADC watchdog-tröskelregister 1 (ADC_TR1) . . . . . . . . . . . . . . . . . 776 21.7.9 ADC watchdog-tröskelregister 2 (ADC_TR2) . . . . . . . . . . . . . . . . . 776 21.7.10 ADC watchdog-tröskelregister 3 (ADC_TR3) . . . . . . . . . . . . . . . . . . 777 21.7.11 ADC regelbunden sekvensregister 1 (ADC_SQR1) . . . . . . . . . . . . . . . . . . 778 21.7.12 ADC regelbunden sekvensregister 2 (ADC_SQR2) . . . . . . . . . . . . . . . . . 779 21.7.13 ADC regelbunden sekvensregister 3 (ADC_SQR3) . . . . . . . . . . . . . . . . . 780 21.7.14 ADC regelbunden sekvensregister 4 (ADC_SQR4) . . . . . . . . . . . . . . . . . 781 21.7.15 ADC-register för vanligt data (ADC_DR) . . . . . . . . . . . . . . . . . . . . . . . . . . . 781 21.7.16 ADC-injicerad sekvensregister (ADC_JSQR) . . . . . . . . . . . . . . . . . . 782 21.7.17 ADC-offset y-register (ADC_OFRy) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784 21.7.18 ADC-injicerad kanal y-dataregister (ADC_JDRy) . . . . . . . . . . . . . . . . 785
RM0438 Rev 8
21/2187
54
Innehåll
RM0438
21.8 21.9 XNUMX XNUMX XNUMX XNUMX
21.7.19 ADC analog watchdog 2 konfigurationsregister (ADC_AWD2CR) . . . . 785 21.7.20 ADC analog watchdog 3 konfigurationsregister (ADC_AWD3CR) . . . . 786 21.7.21 ADC differentiallägesvalsregister (ADC_DIFSEL) . . . . . . . . . . . 786 21.7.22 ADC-kalibreringsfaktorer (ADC_CALFACT) . . . . . . . . . . . . . . . . . . . . . . . 787
ADC-gemensamma register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787
21.8.1 ADC gemensamt statusregister (ADC_CSR) . . . . . . . . . . . . . . . . . . . . . . . 787 21.8.2 ADC gemensamt styrregister (ADC_CCR) . . . . . . . . . . . . . . . . . . . . . . 789 21.8.3 ADC gemensamt vanligt dataregister för dubbelt läge (ADC_CDR) . . . . . 792
ADC-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 792
22
Digital-till-analog-omvandlare (DAC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796
22.1 Introduktion till DAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796
22.2 DAC:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796
22.3 DAC-implementering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797
22.4 DAC-funktionsbeskrivning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798
22.4.1 Blockschema för DAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798
22.4.2 DAC-kanalaktivering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
22.4.3 DAC-dataformat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
22.4.4 DAC-konvertering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801
22.4.5 DAC-utgångsvolymtage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801
22.4.6 Val av DAC-trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802
22.4.7 DMA-begäranden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
22.4.8 Bullergenerering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
22.4.9 Triangelvågsgenerering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805
22.4.10 DAC-kanallägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806
22.4.11 Kalibrering av DAC-kanalbuffert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809
22.4.12 DAC-kanalkonverteringslägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810
22.4.13 Konverteringslägen för dubbla DAC-kanaler (om dubbla kanaler är tillgängliga) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811
22.5 DAC i lågströmsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815
22.6 DAC-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816
22.7 DAC-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816
22.7.1 DAC-kontrollregister (DAC_CR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816
22.7.2 DAC-programvaruutlösarregister (DAC_SWTRGR) . . . . . . . . . . . . . . . . . . . . 820
22.7.3 DAC-kanal 1 12-bitars högerjusterat datalagringsregister (DAC_DHR12R1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 820
22/2187
RM0438 Rev 8
RM0438
Innehåll
22.7.4 DAC-kanal 1 12-bitars vänsterjusterat datalagringsregister (DAC_DHR12L1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821
22.7.5 DAC-kanal 1 8-bitars högerjusterat datalagringsregister (DAC_DHR8R1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821
22.7.6 DAC-kanal 2 12-bitars högerjusterat datalagringsregister (DAC_DHR12R2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822
22.7.7 DAC-kanal 2 12-bitars vänsterjusterat datalagringsregister (DAC_DHR12L2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822
22.7.8 DAC-kanal 2 8-bitars högerjusterat datalagringsregister (DAC_DHR8R2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823
22.7.9 Dubbel DAC 12-bitars högerjusterat datalagringsregister (DAC_DHR12RD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823
22.7.10 Dubbel DAC 12-bitars vänsterjusterat datalagringsregister (DAC_DHR12LD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824
22.7.11 Dubbel DAC 8-bitars högerjusterat datalagringsregister (DAC_DHR8RD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824
22.7.12 DAC-kanal 1 datautgångsregister (DAC_DOR1) . . . . . . . . . . . . . . . . . . 825
22.7.13 DAC-kanal 2 datautgångsregister (DAC_DOR2) . . . . . . . . . . . . . . . . . . 825
22.7.14 DAC-statusregister (DAC_SR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825
22.7.15 DAC-kalibreringskontrollregister (DAC_CCR) . . . . . . . . . . . . . . . . . . . . . . 827
22.7.16 DAC-lägeskontrollregister (DAC_MCR) . . . . . . . . . . . . . . . . . . . . . . . . . . 827
22.7.17 DAC kanal 1 sample och håll sampTidsregister (DAC_SHSR1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829
22.7.18 DAC kanal 2 sample och håll sampTidsregister (DAC_SHSR2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829
22.7.19 DAC:erample och håll tidsregister (DAC_SHHR) . . . . . . . . . . . . . . . . . 829
22.7.20 DAC:erampHåll uppdateringstidsregister (DAC_SHRR) intryckt (le och håll) . . . . . . . . . . 830
22.7.21 DAC-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831
23
Voltage referensbuffert (VREFBUF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833
23.1 Introduktion till VREFBUF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833
23.2 Funktionsbeskrivning av VREFBUF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833
23.3 VREFBUF-trimning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834
23.4 VREFBUF-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835
23.4.1 VREFBUF kontroll- och statusregister (VREFBUF_CSR) . . . . . . . . . . . . 835
23.4.2 VREFBUF-kalibreringskontrollregister (VREFBUF_CCR) . . . . . . . . . . . . 836
23.4.3 VREFBUF-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836
24
Jämförelseenhet (COMP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 837
24.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 837
RM0438 Rev 8
23/2187
54
Innehåll
RM0438
24.2 24.3 XNUMX XNUMX XNUMX XNUMX
24.4 24.5 24.6
COMP:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 837 COMP:s funktionsbeskrivning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838
24.3.1 Blockschema för COMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838 24.3.2 COMP-stift och interna signaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838 24.3.3 COMP-återställning och klockor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839 24.3.4 Komparatorns LÅS-mekanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839 24.3.5 Fönsterkomparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840 24.3.6 Hysteres . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840 24.3.7 Komparatorutgångens blankningfunktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841 24.3.8 COMP effekt- och hastighetslägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842
COMP lågströmslägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842 COMP-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842 COMP-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843
24.6.1 Jämförelse 1 kontroll- och statusregister (COMP1_CSR) . . . . . . . . . . . 843 24.6.2 Jämförelse 2 kontroll- och statusregister (COMP2_CSR) . . . . . . . . . . . 845 24.6.3 COMP-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848
25
Operativ amplyftare (OPAMP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849
25.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849
25.2 ÖppettiderAMP huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849
25.3 ÖppettiderAMP funktionell beskrivning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849
25.3.1 ÖppettiderAMP återställning och klockor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849
25.3.2 Ursprunglig konfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850
25.3.3 Signalvägledning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850
25.3.4 ÖppettiderAMP lägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851
25.3.5 Kalibrering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854
25.4 ÖppettiderAMP lågenergilägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856
25.5 ÖppettiderAMP register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857
25.5.1 ÖppettiderAMP1 kontroll-/statusregister (OPAMP1_CSR) . . . . . . . . . . . . . . . . . . 857
25.5.2 ÖppettiderAMP1 offset-trimningsregister i normalt läge (OPAMP1_OTR) . . 858
25.5.3 ÖppettiderAMP1 offset-trimningsregister i lågeffektläge (OPAMP1_LPOTR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858
25.5.4 ÖppettiderAMP2 kontroll-/statusregister (OPAMP2_CRS) . . . . . . . . . . . . . . . . . . 859
25.5.5 ÖppettiderAMP2 offset-trimningsregister i normalt läge (OPAMP2_OTR) . . 860
25.5.6 ÖppettiderAMP2 offset-trimningsregister i lågeffektläge (OPAMP2_LPOTR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 860
25.5.7 ÖppettiderAMP registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861
24/2187
RM0438 Rev 8
RM0438
Innehåll
26
Digitalt filter för sigma delta-modulatorer (DFSDM) . . . . . . . . . . . . . . . . . 862
26.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862
26.2 DFSDM:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863
26.3 DFSDM-implementering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 864
26.4 Funktionsbeskrivning av DFSDM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865
26.4.1 DFSDM-blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865
26.4.2 DFSDM-stift och interna signaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 866
26.4.3 DFSDM-återställning och klockor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867
26.4.4 Seriella kanalsändtagare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868
26.4.5 Konfigurera det seriella ingångsgränssnittet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878
26.4.6 Parallella dataingångar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878
26.4.7 Kanalval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880
26.4.8 Konfiguration av digitalt filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881
26.4.9 Integratorenhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 882
26.4.10 Analog övervakningsenhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883
26.4.11 Kortslutningsdetektor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885
26.4.12 Extrem detektor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 886
26.4.13 Dataenhetsblock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 886
26.4.14 Signerat dataformat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887
26.4.15 Starta konverteringar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888
26.4.16 Kontinuerliga och snabba kontinuerliga lägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888
26.4.17 Begär prioritet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889
26.4.18 Effektoptimering i körläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890
26.5 DFSDM-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890
26.6 DFSDM DMA-överföring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 892
26.7 DFSDM-kanal y-register (y=0..3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 892
26.7.1 DFSDM-kanal y-konfigurationsregister (DFSDM_CHyCFGR1) . . . . 892
26.7.2 DFSDM-kanal y-konfigurationsregister (DFSDM_CHyCFGR2) . . . . 894
26.7.3 DFSDM-kanal y analog watchdog och kortslutningsdetektorregister (DFSDM_CHyAWSCDR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 895
26.7.4 DFSDM-kanal y-övervakningsfilterdataregister (DFSDM_CHyWDATR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896
26.7.5 DFSDM-kanal y-datainmatningsregister (DFSDM_CHyDATINR) . . . . . . 896
26.7.6 DFSDM-kanal y fördröjningsregister (DFSDM_CHyDLYR) . . . . . . . . . . . . 897
26.8 DFSDM-filter x modulregister (x=0..3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898
26.8.1 DFSDM-filter x kontrollregister 1 (DFSDM_FLTxCR1) . . . . . . . . . . . . . . 898
26.8.2 DFSDM-filter x kontrollregister 2 (DFSDM_FLTxCR2) . . . . . . . . . . . . . . 901
RM0438 Rev 8
25/2187
54
Innehåll
RM0438
26.8.3 DFSDM-filter x avbrotts- och statusregister (DFSDM_FLTxISR) . . . . . 902
26.8.4 DFSDM-filter x avbrottsflagga rensningsregister (DFSDM_FLTxICR) . . . . . 904
26.8.5 DFSDM-filter x-injicerad kanalgruppsvalsregister (DFSDM_FLTxJCHGR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 905
26.8.6 DFSDM-filter x kontrollregister (DFSDM_FLTxFCR) . . . . . . . . . . . . . . . . 905
26.8.7 DFSDM-filter x-dataregister för injicerad grupp (DFSDM_FLTxJDATAR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
26.8.8 DFSDM-filter x-dataregister för den vanliga kanalen (DFSDM_FLTxRDATAR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907
26.8.9 DFSDM-filter x analogt watchdog-register för högt tröskelvärde (DFSDM_FLTxAWHTR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908
26.8.10 DFSDM-filter x analogt watchdog lågt tröskelregister (DFSDM_FLTxAWLTR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908
26.8.11 DFSDM-filter x analogt watchdog-statusregister (DFSDM_FLTxAWSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 909
26.8.12 DFSDM-filter x analog watchdog clear flag-register (DFSDM_FLTxAWCFR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 910
26.8.13 DFSDM-filter x extremvärdesdetektor maximumregister (DFSDM_FLTxEXMAX) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 910
26.8.14 DFSDM-filter x extremvärdesdetektor minimumregister (DFSDM_FLTxEXMIN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911
26.8.15 DFSDM-filter x konverteringstimerregister (DFSDM_FLTxCNVTIMR) . . 911
26.8.16 DFSDM-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912
27
Beröringskänslig styrenhet (TSC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 920
27.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 920
27.2 TSC:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 920
27.3 TSC funktionsbeskrivning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921
27.3.1 TSC-blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921
27.3.2 Förvärv av ytladdningsöverföring överview . . . . . . . . . . . . . . . . . . . 921
27.3.3 Återställning och klockor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 924
27.3.4 Förvärvssekvens för laddningsöverföring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 924
27.3.5 Funktion för spridningsspektrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 925
27.3.6 Fel vid maxräknare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 926
27.3.7 SampVal av I/O-läge för långkondensator och I/O-läge för kanal . . . . . . . . . . . . 926
27.3.8 Förvärvsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 927
27.3.9 I/O-hysteres och analog omkopplarstyrning . . . . . . . . . . . . . . . . . . . . . . . . . . 927
27.4 TSC lågströmslägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928
27.5 TSC-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928
26/2187
RM0438 Rev 8
RM0438
Innehåll
27.6
TSC-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928
27.6.1 TSC-kontrollregister (TSC_CR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928 27.6.2 TSC-avbrottsaktiveringsregister (TSC_IER) . . . . . . . . . . . . . . . . . . . . . . 931 27.6.3 TSC-avbrottsrensningsregister (TSC_ICR) . . . . . . . . . . . . . . . . . . . . . . . . 932 27.6.4 TSC-avbrottsstatusregister (TSC_ISR) . . . . . . . . . . . . . . . . . . . . . . . 932 27.6.5 TSC I/O-hystereskontrollregister (TSC_IOHCR) . . . . . . . . . . . . . . . . 933 27.6.6 TSC I/O-analogt omkopplarkontrollregister
(TSC_IOASCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 933 27.6.7 TSC I/O:erampling-kontrollregister (TSC_IOSCR) . . . . . . . . . . . . . . . . 934 27.6.8 TSC I/O-kanalkontrollregister (TSC_IOCCR) . . . . . . . . . . . . . . . . . 934 27.6.9 TSC I/O-gruppkontrollstatusregister (TSC_IOGCSR) . . . . . . . . . . . . 935 27.6.10 TSC I/O-grupp x-räknarregister (TSC_IOGxCR) . . . . . . . . . . . . . . . . 935 27.6.11 TSC-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 936
28
Sann slumptalsgenerator (RNG) . . . . . . . . . . . . . . . . . . . . . . . . . . . 938
28.1 Introduktion till slumptalsgeneratorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 938
28.2 Huvudfunktioner för slumptalsgenerator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 938
28.3 Funktionell beskrivning av slumptalsgeneratorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939
28.3.1 Blockschema för slumptalsgenerator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939
28.3.2 Interna slumptalssignaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939
28.3.3 Generering av slumpmässiga tal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939
28.3.4 RNG-initiering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 942
28.3.5 RNG-funktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 943
28.3.6 RNG-klockning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 945
28.3.7 Felhantering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 945
28.3.8 Låg strömförbrukning i slumptalsgenerator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 946
28.4 RNG-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 946
28.5 RNG-bearbetningstid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 947
28.6 Validering av källa för slumptalsgeneratorns entropi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 947
28.6.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 947
28.6.2 Valideringsvillkor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 947
28.6.3 Datainsamling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 948
28.7 RNG-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 948
28.7.1 RNG-kontrollregister (RNG_CR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 948
28.7.2 RNG-statusregister (RNG_SR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 950
28.7.3 RNG-dataregister (RNG_DR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 951
28.7.4 Kontrollregister för slumptalsgeneratorns hälsotest (RNG_HTCR) . . . . . . . . . . . . . . . . . . . . 952
RM0438 Rev 8
27/2187
54
Innehåll
RM0438
28.7.5 RNG-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 952
29
AES-hårdvaruaccelerator (AES) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 953
29.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 953
29.2 AES huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 953
29.3 AES-implementering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 953
29.4 Funktionsbeskrivning av AES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 954
29.4.1 AES-blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 954
29.4.2 Interna AES-signaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 954
29.4.3 AES-kryptografisk kärna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 954
29.4.4 AES-procedur för att utföra en krypteringsoperation . . . . . . . . . . . . . . . . . . . . . 960
29.4.5 Förberedelse av nyckel för AES-dekrypteringsrunda . . . . . . . . . . . . . . . . . . . . . . . . . . . 963
29.4.6 AES-chiffrerad textstöld och datautfyllnad . . . . . . . . . . . . . . . . . . . . . . . . . 963
29.4.7 Pausa och återuppta AES-uppgift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 964
29.4.8 AES grundläggande kedjelägen (ECB, CBC) . . . . . . . . . . . . . . . . . . . . . . . . . . 964
29.4.9 AES-räknarläge (CTR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 969
29.4.10 AES Galois/räknarläge (GCM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 971
29.4.11 AES Galois-meddelandeautentiseringskod (GMAC) . . . . . . . . . . . . . . . . 976
29.4.12 AES-räknare med CBC-MAC (CCM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 978
29.4.13 AES-dataregister och datautbyte . . . . . . . . . . . . . . . . . . . . . . . . . . . . 983
29.4.14 AES-nyckelregister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985
29.4.15 AES-initieringsvektorregister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985
29.4.16 AES DMA-gränssnitt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986
29.4.17 AES-felhantering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 987
29.5 AES-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 988
29.6 AES-bearbetningslatens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 988
29.7 AES-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 989
29.7.1 AES-kontrollregister (AES_CR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 989
29.7.2 AES-statusregister (AES_SR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 991
29.7.3 AES-datainmatningsregister (AES_DINR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 993
29.7.4 AES-datautgångsregister (AES_DOUTR) . . . . . . . . . . . . . . . . . . . . . . . . . 993
29.7.5 AES-nyckelregister 0 (AES_KEYR0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 994
29.7.6 AES-nyckelregister 1 (AES_KEYR1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 994
29.7.7 AES-nyckelregister 2 (AES_KEYR2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 995
29.7.8 AES-nyckelregister 3 (AES_KEYR3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 995
29.7.9 AES-initieringsvektorregister 0 (AES_IVR0) . . . . . . . . . . . . . . . . . . . . 995
28/2187
RM0438 Rev 8
RM0438
Innehåll
29.7.10 AES-initieringsvektorregister 1 (AES_IVR1) . . . . . . . . . . . . . . . . . . . 996 29.7.11 AES-initieringsvektorregister 2 (AES_IVR2) . . . . . . . . . . . . . . . . . . 996 29.7.12 AES-initieringsvektorregister 3 (AES_IVR3) . . . . . . . . . . . . . . . . . . . 996 29.7.13 AES-nyckelregister 4 (AES_KEYR4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 997 29.7.14 AES-nyckelregister 5 (AES_KEYR5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 997 29.7.15 AES-nyckelregister 6 (AES_KEYR6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 997 29.7.16 AES-nyckelregister 7 (AES_KEYR7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 998 29.7.17 AES-suspenderingsregister (AES_SUSPxR) . . . . . . . . . . . . . . . . . . . . . . . . . 998 29.7.18 AES-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 999
30
Hashprocessor (HASH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1001
30.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1001
30.2 HASH:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1001
30.3 HASH-implementering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1002
30.4 Beskrivning av HASH-funktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1002
30.4.1 HASH-blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1002
30.4.2 Interna HASH-signaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1003
30.4.3 Om säkra hashalgoritmer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1003
30.4.4 Matning av meddelandedata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1003
30.4.5 Beräkning av meddelandesammanfattning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1005
30.4.6 Meddelandefyllning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1006
30.4.7 HMAC-drift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1008
30.4.8 HASH pausa/återuppta operationer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1010
30.4.9 HASH DMA-gränssnitt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1012
30.4.10 HASH-felhantering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1012
30.4.11 HASH-bearbetningstid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1012
30.5 HASH-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1013
30.6 HASH-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1014
30.6.1 HASH-kontrollregister (HASH_CR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1014
30.6.2 HASH-datainmatningsregister (HASH_DIN) . . . . . . . . . . . . . . . . . . . . . . . . . . 1016
30.6.3 HASH-startregister (HASH_STR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1017
30.6.4 HASH-digertregister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1018
30.6.5 HASH-avbrottsaktiveringsregister (HASH_IMR) . . . . . . . . . . . . . . . . . . . . 1019
30.6.6 HASH-statusregister (HASH_SR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1020
30.6.7 HASH-kontextväxlingsregister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1020
30.6.8 HASH-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1021
RM0438 Rev 8
29/2187
54
Innehåll
RM0438
31
On-the-fly dekrypteringsmotor (OTFDEC) . . . . . . . . . . . . . . . . . . . . . . . . . . 1023
31.1 Introduktion till OTFDEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1023
31.2 OTFDEC:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1023
31.3 OTFDEC funktionell beskrivning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1024
31.3.1 OTFDEC-blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1024
31.3.2 OTFDEC interna signaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1024
31.3.3 OTFDEC-dekryptering i farten . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1025
31.3.4 OTFDEC-användning av AES vid dekryptering i räknarläge . . . . . . . . . . . . . . . 1026
31.3.5 Flödeskontrollhantering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1027
31.3.6 OTFDEC-felhantering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1027
31.4 OTFDEC-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1028
31.5 Information om OTFDEC-ansökan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1028
31.5.1 OTFDEC-initieringsprocess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1028
31.5.2 OTFDEC och strömhantering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1030
31.5.3 Kryptering för OTFDEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1030
31.5.4 OTFDEC-nyckel CRC-källkod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1031
31.6 OTFDEC-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1032
31.6.1 OTFDEC-kontrollregister (OTFDEC_CR) . . . . . . . . . . . . . . . . . . . . . . . . 1032
31.6.2 OTFDEC-konfigurationsregister för privilegierad åtkomstkontroll (OTFDEC_PRIVCFGR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1033
31.6.3 OTFDEC region x konfigurationsregister (OTFDEC_RxCFGR) . . . . . 1033
31.6.4 OTFDEC region x startadressregister (OTFDEC_RxSTARTADDR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1035
31.6.5 OTFDEC region x slutadressregister (OTFDEC_RxENDADDR) . 1035
31.6.6 OTFDEC-region x nonce-register 0 (OTFDEC_RxNONCER0) . . . . . 1036
31.6.7 OTFDEC-region x nonce-register 1 (OTFDEC_RxNONCER1) . . . . . 1037
31.6.8 OTFDEC region x nyckelregister 0 (OTFDEC_RxKEYR0) . . . . . . . . . . . 1037
31.6.9 OTFDEC region x nyckelregister 1 (OTFDEC_RxKEYR1) . . . . . . . . . . . 1038
31.6.10 OTFDEC region x nyckelregister 2 (OTFDEC_RxKEYR2) . . . . . . . . . . . 1038
31.6.11 OTFDEC region x nyckelregister 3 (OTFDEC_RxKEYR3) . . . . . . . . . . . 1039
31.6.12 OTFDEC avbrottsstatusregister (OTFDEC_ISR) . . . . . . . . . . . . . . . . 1039
31.6.13 OTFDEC avbrottsrensningsregister (OTFDEC_ICR) . . . . . . . . . . . . . . . . . 1040
31.6.14 OTFDEC avbrottsaktiveringsregister (OTFDEC_IER) . . . . . . . . . . . . . . . . 1041
31.6.15 OTFDEC-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1042
32
Accelerator för offentliga nyckelr (PKA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046
32.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046
30/2187
RM0438 Rev 8
RM0438
Innehåll
32.2 32.3 XNUMX XNUMX XNUMX XNUMX
32.4
32.5 32.6 32.7
PKA:s huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046 PKA:s funktionsbeskrivning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046
32.3.1 PKA-blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046 32.3.2 PKA-interna signaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1047 32.3.3 PKA-återställning och klockor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1047 32.3.4 PKA-acceleration av offentlig nyckel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1047 32.3.5 Typiska tillämpningar för PKA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1049 32.3.6 PKA-procedur för att utföra en åtgärd . . . . . . . . . . . . . . . . . . . . . . 1051 32.3.7 PKA-felhantering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1052
PKA-driftlägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1052
32.4.1 Introduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1052 32.4.2 Beräkning av Montgomery-parametern . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1053 32.4.3 Modulär addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1054 32.4.4 Modulär subtraktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1054 32.4.5 Modulär och Montgomery-multiplikation . . . . . . . . . . . . . . . . . . . . . . . . 1055 32.4.6 Modulär exponentiering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1056 32.4.7 Modulär inversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1056 32.4.8 Modulär reduktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1057 32.4.9 Aritmetisk addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1057 32.4.10 Aritmetisk subtraktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1057 32.4.11 Aritmetisk multiplikation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1058 32.4.12 Aritmetisk jämförelse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1058 32.4.13 RSA CRT-exponentiering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1059 32.4.14 Punkt på elliptisk kurva Fp-kontroll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1059 32.4.15 ECC Fp skalär multiplikation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1060 32.4.16 ECDSA-tecken . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061 32.4.17 ECDSA-verifiering . . . . . . . . . . . . . . . . . . . . . . ... 1063
Exampantal konfigurationer och bearbetningstider . . . . . . . . . . . . . . . . . . . 1064
32.5.1 Elliptiska kurvor som stöds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1064 32.5.2 Beräkningstider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1066
PKA-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1067 PKA-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1068
32.7.1 PKA-kontrollregister (PKA_CR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1068 32.7.2 PKA-statusregister (PKA_SR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1069 32.7.3 PKA-register för klarflagga (PKA_CLRFR) . . . . . . . . . . . . . . . . . . . . . . . . . . 1070 32.7.4 PKA RAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1070
RM0438 Rev 8
31/2187
54
Innehåll
RM0438
32.7.5 PKA-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1071
33
Avancerade timers (TIM1/TIM8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1072
33.1 Introduktion till TIM1/TIM8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1072
33.2 TIM1/TIM8 huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1072
33.3 Funktionsbeskrivning av TIM1/TIM8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1074
33.3.1 Tidsbasenhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1074
33.3.2 Räknarelägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1076
33.3.3 Repetitionsräknare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1087
33.3.4 Extern triggeringång . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1089
33.3.5 Val av klocka . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1090
33.3.6 Registrera/jämföra kanaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1094
33.3.7 Inmatningsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1096
33.3.8 PWM-ingångsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1097
33.3.9 Tvångsstyrd utgång . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1098
33.3.10 Jämförelseläge för utgångar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1099
33.3.11 PWM-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1100
33.3.12 Asymmetriskt PWM-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1103
33.3.13 Kombinerat PWM-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1104
33.3.14 Kombinerat 3-fas PWM-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1105
33.3.15 Kompletterande utgångar och dödtidsinsättning . . . . . . . . . . . . . . . . . . 1106
33.3.16 Använda break-funktionen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1108
33.3.17 Dubbelriktade brytingångar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1114
33.3.18 Rensa OCxREF-signalen vid en extern händelse . . . . . . . . . . . . . . . . 1115
33.3.19 6-stegs PWM-generering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1117
33.3.20 Enpulsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1118
33.3.21 Omtriggbar enpulsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1119
33.3.22 Givargränssnittsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1120
33.3.23 Ommappning av UIF-bitar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1122
33.3.24 Timeringång XOR-funktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1123
33.3.25 Gränssnitt med Hall-sensorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1123
33.3.26 Timersynkronisering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1126
33.3.27 ADC-synkronisering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1130
33.3.28 DMA burst-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1130
33.3.29 Felsökningsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1131
33.4 TIM1/TIM8-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1132
33.4.1 TIMx-kontrollregister 1 (TIMx_CR1)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . 1132
32/2187
RM0438 Rev 8
RM0438
Innehåll
33.4.2 TIMx-kontrollregister 2 (TIMx_CR2)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . 1133
33.4.3 TIMx slavlägeskontrollregister (TIMx_SMCR)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1136
33.4.4 TIMx DMA/avbrottsaktiveringsregister (TIMx_DIER)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1138
33.4.5 TIMx-statusregister (TIMx_SR)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . 1140
33.4.6 TIMx-händelsegenereringsregister (TIMx_EGR)(x = 1, 8) . . . . . . . . . . . . . . 1142
33.4.7 TIMx-registrerings-/jämförelseläge 1 (TIMx_CCMR1)(x = 1, 8) . . 1143
33.4.8 TIMx-inspelnings-/jämförelseläge register 1 [alternativ] (TIMx_CCMR1)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1144
33.4.9 TIMx-registrerings-/jämförelseläge 2 (TIMx_CCMR2)(x = 1, 8) . . 1147
33.4.10 TIMx-inspelnings-/jämförelseläge register 2 [alternativ] (TIMx_CCMR2)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1148
33.4.11 TIMx-registrerings-/jämförelseaktiveringsregister (TIMx_CCER)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1149
33.4.12 TIMx-räknare (TIMx_CNT)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1153
33.4.13 TIMx-förskalning (TIMx_PSC)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1153
33.4.14 TIMx automatisk omladdningsregister (TIMx_ARR)(x = 1, 8) . . . . . . . . . . . . . . . . . . 1153
33.4.15 TIMx-repetitionsräknarregister (TIMx_RCR)(x = 1, 8) . . . . . . . . . . . . . 1154
33.4.16 TIMx-registrerings-/jämförelseregister 1 (TIMx_CCR1)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1154
33.4.17 TIMx-registrerings-/jämförelseregister 2 (TIMx_CCR2)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1155
33.4.18 TIMx-registrerings-/jämförelseregister 3 (TIMx_CCR3)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1155
33.4.19 TIMx-registrerings-/jämförelseregister 4 (TIMx_CCR4)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1156
33.4.20 TIMx paus- och dödtidsregister (TIMx_BDTR)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1156
33.4.21 TIMx DMA-kontrollregister (TIMx_DCR)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1160
33.4.22 TIMx DMA-adress för fullständig överföring (TIMx_DMAR)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1161
33.4.23 TIM1-alternativregister 1 (TIM1_OR1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1162
33.4.24 TIM8-alternativregister 1 (TIM8_OR1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1162
33.4.25 TIMx inspelnings-/jämförelseläge register 3 (TIMx_CCMR3)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1163
33.4.26 TIMx-registrerings-/jämförelseregister 5 (TIMx_CCR5)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1164
33.4.27 TIMx-registrerings-/jämförelseregister 6 (TIMx_CCR6)(x = 1, 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1165
RM0438 Rev 8
33/2187
54
Innehåll
RM0438
33.4.28 TIM1-tillvalsregister 2 (TIM1_OR2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1165 33.4.29 TIM1-tillvalsregister 3 (TIM1_OR3) . . . . . . . . . . . . . . . . . . . . . . . . . . 1167 33.4.30 TIM8-tillvalsregister 2 (TIM8_OR2) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1168 33.4.31 TIM8-tillvalsregister 3 (TIM8_OR3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1170 33.4.32 TIM1-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1172 33.4.33 TIM8-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1174
34
Allmänna timers (TIM2/TIM3/TIM4/TIM5) . . . . . . . . . . . . . . . . . . 1177
34.1 Introduktion till TIM2/TIM3/TIM4/TIM5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1177
34.2 TIM2/TIM3/TIM4/TIM5 huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1177
34.3 Funktionsbeskrivning för TIM2/TIM3/TIM4/TIM5 . . . . . . . . . . . . . . . . . . . . . . .1179
34.3.1 Tidsbasenhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1179
34.3.2 Räknarelägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1181
34.3.3 Val av klocka . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1191
34.3.4 Registrera/Jämför kanaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1195
34.3.5 Inmatningsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1197
34.3.6 PWM-ingångsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1198
34.3.7 Tvångsstyrd utgång . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1199
34.3.8 Jämförelseläge för utgångar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1200
34.3.9 PWM-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1201
34.3.10 Asymmetriskt PWM-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1204
34.3.11 Kombinerat PWM-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1205
34.3.12 Rensa OCxREF-signalen vid en extern händelse . . . . . . . . . . . . . . . . 1206
34.3.13 Enpulsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1208
34.3.14 Omtriggbar enpulsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1209
34.3.15 Givargränssnittsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1210
34.3.16 Ommappning av UIF-bitar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1212
34.3.17 Timeringång XOR-funktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1212
34.3.18 Timers och extern triggersynkronisering . . . . . . . . . . . . . . . . . . . . . 1213
34.3.19 Timersynkronisering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1216
34.3.20 DMA burst-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1221
34.3.21 Felsökningsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1222
34.4 TIM2/TIM3/TIM4/TIM5-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1223
34.4.1 TIMx-kontrollregister 1 (TIMx_CR1)(x = 2 till 5) . . . . . . . . . . . . . . . . . . . 1223
34.4.2 TIMx-kontrollregister 2 (TIMx_CR2)(x = 2 till 5) . . . . . . . . . . . . . . . . . . . 1224
34.4.3 TIMx slavlägeskontrollregister (TIMx_SMCR)(x = 2 till 5) . . . . . . . . 1226
34.4.4 TIMx DMA/Avbrottsaktiveringsregister (TIMx_DIER)(x = 2 till 5) . . . . . . 1229
34/2187
RM0438 Rev 8
RM0438
Innehåll
34.4.5 TIMx-statusregister (TIMx_SR)(x = 2 till 5) . . . . . . . . . . . . . . . . . . . . . 1230 34.4.6 TIMx-händelsegenereringsregister (TIMx_EGR)(x = 2 till 5) . . . . . . . . . . 1231 34.4.7 TIMx registrator 1 för inspelnings-/jämförelseläge (TIMx_CCMR1)(x = 2 till 5) . 1232 34.4.8 TIMx register 1 för inspelnings-/jämförelseläge [alternativt] (TIMx_CCMR1)
(x = 2 till 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1234 34.4.9 TIMx inspelnings-/jämförelseläge register 2 (TIMx_CCMR2)(x = 2 till 5) . 1236 34.4.10 TIMx inspelnings-/jämförelseläge register 2 [alternativ] (TIMx_CCMR2)
(x = 2 till 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1237 34.4.11 TIMx-registrerings-/jämförelseaktiveringsregister
(TIMx_CCER)(x = 2 till 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1238 34.4.12 TIMx-räknare (TIMx_CNT)(x = 2 till 5) . . . . . . . . . . . . . . . . . . . . . . . . . 1239 34.4.13 TIMx-räknare [alternerande] (TIMx_CNT)(x = 2 till 5) . . . . . . . . . . . . . . . . . 1240 34.4.14 TIMx förskalning (TIMx_PSC)(x = 2 till 5) . . . . . . . . . . . . . . . . . . . . . . . 1240 34.4.15 TIMx automatisk omladdningsregister (TIMx_ARR)(x = 2 till 5) . . . . . . . . . . . . . . 1241 34.4.16 TIMx inspelnings-/jämförelseregister 1 (TIMx_CCR1)(x = 2 till 5) . . . . . . . 1241 34.4.17 TIMx inspelnings-/jämförelseregister 2 (TIMx_CCR2)(x = 2 till 5) . . . . . . . 1241 34.4.18 TIMx inspelnings-/jämförelseregister 3 (TIMx_CCR3)(x = 2 till 5) . . . . . . . 1242 34.4.19 TIMx inspelnings-/jämförelseregister 4 (TIMx_CCR4)(x = 2 till 5) . . . . . . . 1242 34.4.20 TIMx DMA-kontrollregister (TIMx_DCR)(x = 2 till 5) . . . . . . . . . . . . . . 1243 34.4.21 TIMx DMA-adress för fullständig överföring (TIMx_DMAR)(x = 2 till 5) . . . . . . 1244 34.4.22 TIM2-tillvalsregister 1 (TIM2_OR1) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1244 34.4.23 TIM3-tillvalsregister 1 (TIM3_OR1) . . . . . . . . . . . . . . . . . . . . . . . . . . 1244 34.4.24 TIM2-tillvalsregister 2 (TIM2_OR2) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1245 34.4.25 TIM3-alternativregister 2 (TIM3_OR2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1245 34.4.26 TIMx-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1247
35
Allmänna timers (TIM15/TIM16/TIM17) . . . . . . . . . . . . . . . . . . . 1250
35.1 Introduktion till TIM15/TIM16/TIM17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1250
35.2 TIM15 huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1250
35.3 TIM16/TIM17 huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1251
35.4 Funktionsbeskrivning för TIM15/TIM16/TIM17 . . . . . . . . . . . . . . . . . . . . . . . 1254
35.4.1 Tidsbasenhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1254
35.4.2 Räknarelägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1256
35.4.3 Repetitionsräknare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1260
35.4.4 35.4.5 35.4.6 35.4.7
Klockval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1261 Spela in/jämföra kanaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1263 Inmatningsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1265 PWM-ingångsläge (endast för TIM15) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1266
RM0438 Rev 8
35/2187
54
Innehåll
RM0438
35.5
35.4.8 Tvångsstyrd utgångsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1267 35.4.9 Jämförelseläge för utgångar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1268 35.4.10 PWM-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1269 35.4.11 Kombinerat PWM-läge (endast TIM15) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1270 35.4.12 Kompletterande utgångar och dödtidsinsättning . . . . . . . . . . . . . . . . . 1271 35.4.13 Använda brytfunktionen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1273 35.4.14 Dubbelriktade brytingångar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1278 35.4.15 6-stegs PWM-generering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1279 35.4.16 Enpulsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1281 35.4.17 Omtriggarbart enpulsläge (endast TIM15) . . . . . . . . . . . . . . . . . . . . 1282 35.4.18 UIF-bitommappning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1283 35.4.19 Timeringång XOR-funktion (endast TIM15) . . . . . . . . . . . . . . . . . . . . . . . 1284 35.4.20 Extern triggersynkronisering (endast TIM15) . . . . . . . . . . . . . . . . . . 1285 35.4.21 Slavläge kombinerat återställning + triggerläge . . . . . . . . . . . . . . . . . . . 1287 35.4.22 DMA burst-läge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1287 35.4.23 Timersynkronisering (TIM15) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1289 35.4.24 Använda timerutgång som trigger för andra timers (TIM16/TIM17) . . . . . . 1289 35.4.25 Felsökningsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1289
TIM15-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1290
35.5.1 TIM15-kontrollregister 1 (TIM15_CR1) . . . . . . . . . . . . . . . . . . . . . . . . 1290 35.5.2 TIM15-kontrollregister 2 (TIM15_CR2) . . . . . . . . . . . . . . . . . . . . . . . 1291 35.5.3 TIM15-slavlägeskontrollregister (TIM15_SMCR) . . . . . . . . . . . . . 1293 35.5.4 TIM15 DMA/avbrottsaktiveringsregister (TIM15_DIER) . . . . . . . . . . . . 1294 35.5.5 TIM15 statusregister (TIM15_SR) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1295 35.5.6 TIM15 händelsegenereringsregister (TIM15_EGR) . . . . . . . . . . . . . . . 1297 35.5.7 TIM15 registrator 1 för inspelnings-/jämförelseläge (TIM15_CCMR1) . . . . . . . 1298 35.5.8 TIM15 register 1 för inspelnings-/jämförelseläge [alternativt] (TIM15_CCMR1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1299 35.5.9 TIM15 registrerings-/jämförelseaktiveringsregister (TIM15_CCER) . . . . . . . . . 1302 35.5.10 TIM15-räknare (TIM15_CNT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1305 35.5.11 TIM15-förskalning (TIM15_PSC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1305 35.5.12 TIM15 automatisk omladdningsregister (TIM15_ARR) . . . . . . . . . . . . . . . . . . . . . 1305 35.5.13 TIM15 repetitionsräknarregister (TIM15_RCR) . . . . . . . . . . . . . . . . 1306 35.5.14 TIM15 infångnings-/jämförelseregister 1 (TIM15_CCR1) . . . . . . . . . . . . . . 1306 35.5.15 TIM15 registrerings-/jämförelseregister 2 (TIM15_CCR2) . . . . . . . . . . . . . . . 1307 35.5.16 TIM15 bryt- och dödtidsregister (TIM15_BDTR) . . . . . . . . . . . . . 1307 35.5.17 TIM15 DMA-kontrollregister (TIM15_DCR) . . . . . . . . . . . . . . . . . . . . . 1310
36/2187
RM0438 Rev 8
RM0438
Innehåll
35.6
35.5.18 TIM15 DMA-adress för fullständig överföring (TIM15_DMAR) . . . . . . . . . . . . . 1310 35.5.19 TIM15-tillvalsregister 1 (TIM15_OR1) . . . . . . . . . . . . . . . . . . . . . . . . 1311 35.5.20 TIM15-tillvalsregister 2 (TIM15_OR2) . . . . . . . . . . . . . . . . . . . . . . . . . 1311 35.5.21 TIM15-registerkarta . . . . . . . . . . . . ... 1313
TIM16/TIM17-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1316
35.6.1 TIMx-kontrollregister 1 (TIMx_CR1)(x = 16 till 17) . . . . . . . . . . . . . . . . 1316 35.6.2 TIMx-kontrollregister 2 (TIMx_CR2)(x = 16 till 17) . . . . . . . . . . . . . . . 1317 35.6.3 TIMx DMA/avbrottsaktiveringsregister (TIMx_DIER)(x = 16 till 17) . . . . 1318 35.6.4 TIMx-statusregister (TIMx_SR)(x = 16 till 17) . . . . . . . . . . . . . . . . . . 1319 35.6.5 TIMx-händelsegenereringsregister (TIMx_EGR)(x = 16 till 17) . . . . . . . . . 1320 35.6.6 TIMx registrerings-/jämförelseläge 1
(TIMx_CCMR1)(x = 16 till 17) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1321 35.6.7 TIMx inspelnings-/jämförelseläge register 1 [alternerande] (TIMx_CCMR1)(x = 16 till 17) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1322 35.6.8 TIMx inspelnings-/jämförelseaktiveringsregister (TIMx_CCER)(x = 16 till 17) . 1324 35.6.9 TIMx-räknare (TIMx_CNT)(x = 16 till 17) . . . . . . . . . . . . . . . . . . . . . . . 1326 35.6.10 TIMx-förskalning (TIMx_PSC)(x = 16 till 17) . . . . . . . . . . . . . . . . . . . . . 1327 35.6.11 TIMx automatisk omladdningsregister (TIMx_ARR)(x = 16 till 17) . . . . . . . . . . . . . 1327 35.6.12 TIMx repetitionsräknarregister (TIMx_RCR)(x = 16 till 17) . . . . . . . . 1328 35.6.13 TIMx infångnings-/jämförelseregister 1 (TIMx_CCR1)(x = 16 till 17) . . . . . 1328 35.6.14 TIMx paus- och dödtidsregister (TIMx_BDTR)(x = 16 till 17) . . . . 1329 35.6.15 TIMx DMA-kontrollregister (TIMx_DCR)(x = 16 till 17) . . . . . . . . . . . . 1331 35.6.16 TIMx DMA-adress för fullständig överföring (TIMx_DMAR)(x = 16 till 17) . . . . 1332 35.6.17 TIM16 optionsregister 1 (TIM16_OR1) . . . . . . . . . . . . . . . . . . . . . . . . . 1332 35.6.18 TIM16 optionsregister 2 (TIM16_OR2) . . . . . . . . . . . . . . . . . . . . . . . . . 1333 35.6.19 TIM17 optionsregister 1 (TIM17_OR1) . . . . . . . . . . . . . . . . . . . . . . . . . 1334 35.6.20 TIM17-tillvalsregister 2 (TIM17_OR2) . . . . . . . . . . . . . . . . . . . . . . . . . . 1335 35.6.21 TIM16/TIM17-registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1337
36
Grundläggande timers (TIM6/TIM7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1339
36.1 Introduktion till TIM6/TIM7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1339
36.2 TIM6/TIM7 huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1339
36.3 Funktionsbeskrivning av TIM6/TIM7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1340
36.3.1 Tidsbasenhet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1340
36.3.2 Räkneläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1342
36.3.3 Ommappning av UIF-bitar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1345
36.3.4 Klockkälla . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1345
RM0438 Rev 8
37/2187
54
Innehåll
RM0438
36.4
36.3.5 Felsökningsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1346
TIM6/TIM7-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1346
36.4.1 TIMx-kontrollregister 1 (TIMx_CR1)(x = 6 till 7) . . . . . . . . . . . . . . . . . . 1346 36.4.2 TIMx-kontrollregister 2 (TIMx_CR2)(x = 6 till 7) . . . . . . . . . . . . . . . . . 1348 36.4.3 TIMx DMA/Avbrottsaktiveringsregister (TIMx_DIER)(x = 6 till 7) . . . . . . 1348 36.4.4 TIMx-statusregister (TIMx_SR)(x = 6 till 7) . . . . . . . . . . . . . . . . . . . . 1349 36.4.5 TIMx-händelsegenereringsregister (TIMx_EGR)(x = 6 till 7) . . . . . . . . . . . 1349 36.4.6 TIMx-räknare (TIMx_CNT)(x = 6 till 7) . . . . . . . . . . . . . . . . . . . . . . . . . . 1349 36.4.7 TIMx-förskalning (TIMx_PSC)(x = 6 till 7) . . . . . . . . . . . . . . . . . . . . . . . . . 1350 36.4.8 TIMx automatisk omladdningsregister (TIMx_ARR)(x = 6 till 7) . . . . . . . . . . . . . . . 1350 36.4.9 TIMx registerkarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1351
37
Lågströmstimer (LPTIM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1352
37.1 Introduktion till LPTIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1352
37.2 LPTIM huvudfunktioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1352
37.3 LPTIM-implementering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1352
37.4 Funktionsbeskrivning av LPTIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1353
37.4.1 LPTIM-blockschema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1353
37.4.2 LPTIM-stift och interna signaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1353
37.4.3 LPTIM-ingångs- och triggermappning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1354
37.4.4 LPTIM-återställning och klockor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1355
37.4.5 Glitch-filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1355
37.4.6 Förskalning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1356
37.4.7 Triggermultiplexer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1356
37.4.8 Driftläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1357
37.4.9 Timeout-funktion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1359
37.4.10 Vågformsgenerering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1359
37.4.11 Registeruppdatering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1360
37.4.12 Räknareläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1361
37.4.13 Timeraktivering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1362
37.4.14 Återställning av timerräknaren . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1362
37.4.15 Pulsgivarläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1363
37.4.16 Repetitionsräknare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1364
37.4.17 Felsökningsläge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1365
37.5 LPTIM lågenergilägen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1366
37.6 LPTIM-avbrott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1366
38/2187
RM0438 Rev 8
RM0438
Innehåll
37.7
LPTIM-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1367
37.7.1 LPTIM-avbrotts- och statusregister (LPTIM_ISR) . . . . . . . . . . . . . . . . 1367 37.7.2 LPTIM-avbrottsrensningsregister (LPTIM_ICR) . . . . . . . . . . . . . . . . . . . 1368 37.7.3 LPTIM-avbrottsaktiveringsregister (LPTIM_IER) . . . . . . . . . . . . . . . . . . 1369 37.7.4 LPTIM-konfigurationsregister (LPTIM_CFGR) . . . . . . . . . . . . . . . . . . . 1370 37.7.5 LPTIM-kontrollregister (LPTIM_CR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1373 37.7.6 LPTIM-jämförelse r
Dokument/resurser
![]() |
ST STM32L5-serien Mycket säker med låg strömförbrukning [pdf] Användarhandbok RM0438, STM32L5-serien Mycket säker med låg strömförbrukning, STM32L5-serien, Mycket säker med låg strömförbrukning, Låg strömförbrukning, Förbrukning |