RM0551-STM32WL3R

ST logo

The ST logo, consisting of a stylized 'S' and 'T' in a dark blue color.

ST logo

RM0551
Reference manual

STM32WL3Rxx Arm®-based wireless MCUs with
sub-GHz radio solution

Introduction

This reference manual provides complete information on how to use the STM32WL3Rxx MCU memory and peripherals.

The STM32WL3Rxx are powerful and ultra-low-power microcontrollers with sub-GHz radio with an Arm® Cortex®-M0+ core which can operate with various clock sources.

The devices include ST state-of-the-art patented technology.

For information on device errata with respect to the datasheets and reference manuals:

Contents

1General information35
1.1List of abbreviations for registers35
1.2Glossary36
1.3Acronyms36
1.4Related documents39
2Memory and bus architecture40
2.1System architecture40
2.1.1S0: CPU (Cortex®-M0+) S-bus41
2.1.2S1: DMA-bus41
2.1.3S2-S5: Sub-1 GHz radio system-bus41
2.1.4Bus matrix41
2.2Memory organization42
2.2.1Introduction42
2.2.2Memory map and register boundary addresses44
2.3ARM® Cortex®-M0+47
2.3.1CPU memory remap47
2.3.2Interrupts48
3AHB up/down converter50
3.1AHB up/down converter description50
4I/O operating modes53
5Power controller (PWR)58
5.1Features58
5.2Power supply domains58
5.3Power voltage supervisor61
5.3.1Power On reset POR / Power Down reset (PDR) / Brown-Out reset (BOR)61
5.3.2BORH62
5.3.3Power voltage detection (PVD)62
5.4Operating modes62
5.4.1Run mode63
5.4.2Deepstop mode64
5.4.3Ultra Deepstop mode67
5.4.4Shutdown mode69
5.4.5Operating modes transition management71
5.5SMPS step down regulator71
5.5.1SMPS bypass on-the-fly (BOF)74
5.6PWR register descriptions75
5.6.1Control register 1 (PWR_CR1)75
5.6.2Control register 2 (PWR_CR2)76
5.6.3Internal source wakeup enable register (PWR_IWU)78
5.6.4Internal source wakeup polarity register (PWR_IWUP)79
5.6.5Internal source wakeup status register (PWR_IWUF)80
5.6.6Status register 2 (PWR_SR2)81
5.6.7Control register 5 (PWR_CR5)82
5.6.8I/O Port A pull-up control register (PWR_PUCRA)85
5.6.9I/O Port A pull-down control register (PWR_PDCRA)86
5.6.10I/O Port B pull-up control register (PWR_PUCRB)87
5.6.11I/O Port B pull-down control register (PWR_PDCRB)88
5.6.12Port A wakeup enable register (PWR_EWUA)89
5.6.13Port A wakeup polarity register (PWR_WUPA)90
5.6.14Port A wakeup status register (PWR_WUFA)91
5.6.15Port B wakeup enable register (PWR_EWUB)92
5.6.16Port B wakeup polarity register (PWR_WUPB)93
5.6.17Port B wakeup status register (PWR_WUFB)94
5.6.18Shutdown I/O wakeup enable register (PWR_SDWN_WUEN)95
5.6.19Shutdown I/O wakeup polarity register (PWR_SDWN_WUPOL)95
5.6.20Shutdown I/O Wakeup flag register (PWR_SDWN_WUF)96
5.6.21Bypass on-the-fly tuning register (PWR_BOF_TUNE)97
5.6.22Debug register (PWR_DBGR)98
5.6.23Extended status and reset register (PWR_EXTSRR)99
5.6.24Debug SMPS register (PWR_DBGSMPS)100
5.6.25Trimming values from engineering register (PWR_TRIMR)101
5.6.26Software trimming values register (PWR_ENGTRIM)102
5.7PWR register map103
5.8Programmer's model106
5.8.1Reset reason management106
5.8.2SMPS output level re-programming107
6Reset and clock controller (RCC)108
6.1Reset management108
6.1.1General description108
6.1.2Power reset109
6.1.3Watchdog reset109
6.1.4LOCKUP reset109
6.1.5System reset request109
6.1.6Deepstop exit109
6.2Clock management110
6.2.1Peripheral clock details112
6.2.2Slow clock frequency details114
6.3System frequency switch while MR_SUBG is used114
6.4Clock observation on external pad115
6.5IO booster116
6.6RCC register descriptions117
6.6.1Clock source control register (RCC_CR)117
6.6.2Clock configuration register (RCC_CFGR)119
6.6.3Clock source software calibration register (RCC_CSSWCR)122
6.6.4SMPS clock variable rate multiplier register (RCC_KRMR)123
6.6.5Clock interrupt enable register (RCC_CIER)124
6.6.6Clock Interrupt flag register (RCC_CIFR)126
6.6.7Clock switch command register (RCC_CSCMDR)128
6.6.8AHB0 macrocell reset register (RCC_AHBRSTR)130
6.6.9APB0 macrocell reset register (RCC_APB0RSTR)131
6.6.10APB1 macrocell reset register (RCC_APB1RSTR)133
6.6.11APB2 macrocell reset register (RCC_APB2RSTR)134
6.6.12AHB0 macrocell clock enable register (RCC_AHBENR)135
6.6.13APB0 macrocell clock enable register (RCC_APB0ENR)136
6.6.14APB1 macrocell clock enable register (RCC_APB1ENR)137
6.6.15APB2 macrocell clock enable register (RCC_APB2ENR)138
6.6.16V33 reset status register (RCC_CSR)139
6.6.17RF software high-speed external register (RCC_RFSWHSECR)140
6.6.18RF high speed external register (RCC_RFHSECR)141
6.6.19AHB sleep mode enable register (RCC_AHBSMENR)142
6.6.20APB0 sleep mode enable register (RCC_APB0SMENR)144
6.6.21APB1 sleep mode enable register (RCC_APB1SMENR)145
6.7RCC register map .....146
6.8Programmer's model .....150
6.8.1Switch the system on the PLL64M clock tree .....150
6.8.2Use the direct HSE instead of the RC64MPLL block .....150
6.8.3Changing the system clock frequency while the MR_SUBGHz is enabled .....150
7General-purpose I/Os (GPIO) .....152
7.1Introduction .....152
7.2GPIO main features .....152
7.3GPIO functional description .....152
7.3.1General-purpose I/O (GPIO) .....155
7.3.2I/O pin alternate function multiplexer and mapping .....155
7.3.3I/O port control registers .....156
7.3.4I/O port data registers .....156
7.3.5I/O data bitwise handling .....157
7.3.6GPIO locking mechanism .....157
7.3.7I/O alternate function input/output .....157
7.3.8External interrupt/wakeup lines .....158
7.3.9Input configuration .....158
7.3.10Output configuration .....159
7.3.11Alternate function configuration .....159
7.3.12Analog configuration .....160
7.3.13Using the LSE oscillator pins as GPIOs .....161
7.4GPIO registers .....162
7.4.1GPIOA port mode register (GPIOA_MODER) .....162
7.4.2GPIOB port mode register (GPIOB_MODER) .....163
7.4.3GPIOA port output type register (GPIOA_OTYPER) .....163
7.4.4GPIOB port output type register (GPIOB_OTYPER) .....164
7.4.5GPIOA port output speed register (GPIOA_OSPEEDR) .....165
7.4.6GPIOB port output speed register (GPIOB_OSPEEDR) .....165
7.4.7GPIOA port pull-up/pull-down register (GPIOA_PUPDR) .....166
7.4.8GPIOB port pull-up/pull-down register (GPIOB_PUPDR) .....166
7.4.9GPIOA port input data register (GPIOA_IDR) .....167
7.4.10GPIOB port input data register (GPIOB_IDR) .....167
7.4.11GPIOA port output data register (GPIOA_ODR) .....168
7.4.12GPIOB port output data register (GPIOB_ODR) .....169
7.4.13GPIOA port bit set/reset register (GPIOA_BSRR) . . . . .170
7.4.14GPIOB port bit reset register (GPIOB_BSRR) . . . . .171
7.4.15GPIOA port configuration lock register (GPIOA_LCKR) . . . . .172
7.4.16GPIOB port configuration lock register (GPIOB_LCKR) . . . . .174
7.4.17GPIOA alternate function low register (GPIOA_AFRL) . . . . .176
7.4.18GPIOB alternate function low register (GPIOB_AFRL) . . . . .177
7.4.19GPIOA alternate function high register (GPIOA_AFRH) . . . . .178
7.4.20GPIOB alternate function high register (GPIOB_AFRH) . . . . .178
7.4.21GPIOA port bit reset register (GPIOA_BRR) . . . . .179
7.4.22GPIOB port bit reset register (GPIOB_BRR) . . . . .180
7.5GPIO register map . . . . .181
8System controller (SYSCFG) . . . . .183
8.1SYSCFG main features . . . . .183
8.2System controller register descriptions . . . . .184
8.2.1Die ID register (DIE_ID) . . . . .184
8.2.2JTAG ID register (JTAG_ID) . . . . .185
8.2.3Fast-Mode Plus pin capability control register (I2C_FMP_CTRL) . . . . .186
8.2.4I/O Interrupt detection type register (IO_DTR) . . . . .187
8.2.5I/O interrupt edge register (IO_IBER) . . . . .188
8.2.6I/O interrupt polarity event register (IO_IEVR) . . . . .189
8.2.7I/O interrupt enable register (IO_IER) . . . . .190
8.2.8I/O interrupt status and clear register (IO_ISCR) . . . . .191
8.2.9Power controller interrupt enable register (PWR_IER) . . . . .192
8.2.10Power controller interrupt status and clear register (PWR_ISCR) . . . . .193
8.2.11I/O analog switch control register (GPIO_SWA_CTRL) . . . . .194
8.2.12Internal asynchronous interrupt detection type register (INTAI_DTR) . . . . .195
8.2.13Internal asynchronous interrupt edge register (INTAI_IBER) . . . . .196
8.2.14Internal asynchronous interrupt polarity event register (INTAI_IEVR) . . . . .197
8.2.15Internal asynchronous interrupt enable register (INTAI_IER) . . . . .198
8.2.16Internal asynchronous interrupt detection status and clear register (INTAI_ISCR) . . . . .199
8.2.17SYSCFG status register 1 (SYSCFG_SR1) . . . . .200
8.3System controller register map . . . . .201
9Embedded flash memory (FLASH) . . . . .204
9.1Flash main features . . . . .204
9.2Description .....205
9.3Flash controller register descriptions .....206
9.3.1Command register (COMMAND) .....206
9.3.2Configuration register (CONFIG) .....207
9.3.3Interrupt status register (IRQSTAT) .....208
9.3.4Interrupt mask register (IRQMASK) .....209
9.3.5Raw status register (IRQRAW) .....210
9.3.6Size register (SIZE) .....211
9.3.7Address register (ADDRESS) .....212
9.3.8Linear feedback shift register (LFSRVAL) .....213
9.4Main flash page protection registers 0 to 1 .....214
9.4.1Page protection register 0 (PAGEPROT0) .....214
9.4.2Page protection register 1 (PAGEPROT1) .....215
9.5Data registers 0 to 3 .....215
9.5.1Data 1 register (DATA1)) .....216
9.5.2Data 2 register (DATA2) .....216
9.5.3Data 3 register (DATA3) .....216
9.6Flash controller register map .....217
9.7Programmers model .....218
9.7.1General information .....218
9.7.2Write page protection example .....219
9.7.3Read function examples .....219
9.7.4Erase function examples .....220
9.7.5Enabling protection example .....221
9.7.6Write page protection example .....222
9.7.7Write function examples .....222
9.7.8Other command usage descriptions .....223
10DMA controller (DMA) .....224
10.1DMA introduction .....224
10.2DMA main features .....224
10.3DMA functional description .....224
10.3.1DMA transactions .....224
10.3.2Arbiter .....225
10.3.3DMA channels .....225
10.3.4Programmable data width, data alignment and endians .....227
10.3.5Error management .....228
10.3.6Interrupts .....229
10.3.7DMA request mapping .....229
10.4DMA registers .....230
10.4.1DMA interrupt status register (DMA_ISR) .....230
10.4.2DMA interrupt flag clear register (DMA_IFCR) .....231
10.4.3DMA channel x configuration register (DMA_CCRx) (x = 1..8,
where x = channel number) .....
232
10.4.4DMA channel x number of data register (DMA_CNDTRx) (x = 1..8,
where x = channel number) .....
234
10.4.5DMA channel x peripheral address register (DMA_CPARx) (x = 1..8,
where x = channel number) .....
234
10.4.6DMA channel x memory address register (DMA_CMARx) (x = 1..8,
where x = channel number) .....
235
10.5DMA register map .....236
11DMA request multiplexer (DMAMUX) .....239
11.1Introduction .....239
11.2DMAMUX main features .....239
11.3DMAMUX implementation .....239
11.3.1DMAMUX instantiation .....239
11.3.2DMAMUX mapping .....240
11.4DMAMUX functional description .....241
11.4.1DMAMUX block diagram .....241
11.4.2DMAMUX channels .....241
11.4.3DMAMUX request line multiplexer .....242
11.5DMAMUX registers .....242
11.5.1DMAMUX request line multiplexer Channel x Configuration Register
(DMAMUX_CxCR) .....
242
11.6DMAMUX register map .....243
12Analog digital converter (ADC) .....245
12.1Features .....245
12.2ADC presentation .....245
12.2.1Temperature sensor subsystem .....247
12.2.2ADC input modes conversion .....247
12.2.3Down sampler (DS) .....249
12.3Interrupts250
12.4DMA interface250
12.5ADC mode250
12.5.1ADC mode overview251
12.6ADC registers description253
12.6.1Version register (VERSION_ID)253
12.6.2ADC configuration register (CONF)253
12.6.3ADC control register (CTRL)255
12.6.4ADC input voltage switch selection register (SWITCH)256
12.6.5Down sampler configuration register (DS_CONF)257
12.6.6ADC sequence programming 1 register (SEQ_1)258
12.6.7ADC sequence programming 2 register (SEQ_2)259
12.6.8ADC gain and offset correction 1 register (COMP_1)260
12.6.9ADC gain and offset correction 2 register (COMP_2)260
12.6.10ADC gain and offset correction 3 register (COMP_3)260
12.6.11ADC gain and offset correction 4 register (COMP_4)261
12.6.12ADC gain and offset selection register (COMP_SEL)261
12.6.13ADC watchdog threshold register (WD_TH)263
12.6.14ADC watchdog configuration register (WD_CONF)263
12.6.15Down Sampler data out register (DS_DATAOUT)264
12.6.16ADC Interrupt status register (IRQ_STATUS)264
12.6.17ADC Interrupt enable register (IRQ_ENABLE)265
12.7ADC register map267
13Random number generator (RNG)269
13.1Features269
13.2RNG registers map269
13.3RNG registers description270
14AES hardware accelerator (AES)272
14.1Introduction272
14.2AES main features272
14.3AES implementation273
14.4AES functional description273
14.4.1AES block diagram273
14.4.2AES internal signals273
14.4.3AES cryptographic core .....274
14.4.4AES procedure to perform a cipher operation .....279
14.4.5AES decryption round key preparation .....282
14.4.6AES ciphertext stealing and data padding .....283
14.4.7AES task suspend and resume .....283
14.4.8AES basic chaining modes (ECB, CBC) .....284
14.4.9AES counter (CTR) mode .....289
14.4.10AES Galois/counter mode (GCM) .....291
14.4.11AES Galois message authentication code (GMAC) .....296
14.4.12AES counter with CBC-MAC (CCM) .....298
14.4.13AES data registers and data swapping .....303
14.4.14AES key registers .....305
14.4.15AES initialization vector registers .....305
14.4.16AES DMA interface .....306
14.4.17AES error management .....307
14.5AES interrupts .....308
14.6AES processing latency .....308
14.7AES registers .....310
14.7.1AES control register (AES_CR) .....310
14.7.2AES status register (AES_SR) .....313
14.7.3AES data input register (AES_DINR) .....314
14.7.4AES data output register (AES_DOUTR) .....315
14.7.5AES key register 0 (AES_KEYR0) .....316
14.7.6AES key register 1 (AES_KEYR1) .....316
14.7.7AES key register 2 (AES_KEYR2) .....317
14.7.8AES key register 3 (AES_KEYR3) .....317
14.7.9AES initialization vector register 0 (AES_IVR0) .....318
14.7.10AES initialization vector register 1 (AES_IVR1) .....318
14.7.11AES initialization vector register 2 (AES_IVR2) .....319
14.7.12AES initialization vector register 3 (AES_IVR3) .....319
14.7.13AES key register 4 (AES_KEYR4) .....319
14.7.14AES key register 5 (AES_KEYR5) .....320
14.7.15AES key register 6 (AES_KEYR6) .....320
14.7.16AES key register 7 (AES_KEYR7) .....320
14.7.17AES suspend registers (AES_SUSPxR) .....321
14.7.18AES register map .....322
15Cyclic redundancy check calculation unit (CRC) . . . . .324
15.1Introduction . . . . .324
15.2CRC main features . . . . .324
15.3CRC functional description . . . . .325
15.3.1CRC block diagram . . . . .325
15.3.2CRC operation . . . . .325
15.4CRC registers . . . . .327
15.4.1Data register (CRC_DR) . . . . .327
15.4.2Independent data register (CRC_IDR) . . . . .327
15.4.3Control register (CRC_CR) . . . . .328
15.4.4Initial CRC value (CRC_INIT) . . . . .329
15.4.5CRC polynomial (CRC_POL) . . . . .329
15.5CRC register map . . . . .330
16General purpose timer (TIM2) . . . . .331
16.1TIM2 introduction . . . . .331
16.2TIM2 main features . . . . .331
16.3TIM2 functional description . . . . .333
16.3.1Time-base unit . . . . .333
16.3.2Counter modes . . . . .334
16.3.3Repetition counter . . . . .342
16.3.4External trigger input . . . . .344
16.3.5Clock selection . . . . .345
16.3.6Capture/compare channels . . . . .348
16.3.7Input capture mode . . . . .349
16.3.8PWM input mode . . . . .350
16.3.9Forced output mode . . . . .351
16.3.10Output compare mode . . . . .351
16.3.11PWM mode . . . . .353
16.3.12Asymmetric PWM mode . . . . .356
16.3.13Combined PWM mode . . . . .356
16.3.14Clearing the OCxREF signal on an external event . . . . .357
16.3.15One-pulse mode . . . . .359
16.3.16Retriggerable one pulse mode (OPM) . . . . .360
16.3.17Encoder interface mode . . . . .361
16.3.18UIF bit remapping . . . . .363
16.3.19Timer input XOR function .....364
16.3.20Timers and external trigger synchronization .....364
16.3.21Timer synchronization .....367
16.3.22DMA burst mode .....371
16.3.23Debug mode .....372
16.4TIM2 registers .....373
16.4.1TIM2 control register 1 (TIMx_CR1) .....373
16.4.2TIM2 control register 2 (TIMx_CR2) .....375
16.4.3TIM2 slave mode control register (TIMx_SMCR) .....376
16.4.4TIM2 DMA/interrupt enable register (TIMx_DIER) .....379
16.4.5TIM2 status register (TIMx_SR) .....381
16.4.6TIM2 event generation register (TIMx_EGR) .....383
16.4.7TIM2 capture/compare mode register 1 (TIMx_CCMR1) .....384
16.4.8TIM2 capture/compare mode register 2 (TIMx_CCMR2) .....389
16.4.9TIM2 capture/compare enable register (TIMx_CCER) .....391
16.4.10TIM2 counter (TIMx_CNT) .....393
16.4.11TIM2 prescaler (TIMx_PSC) .....393
16.4.12TIM2 auto-reload register (TIMx_ARR) .....393
16.4.13TIM2 repetition counter register (TIMx_RCR) .....394
16.4.14TIM2 capture/compare register 1 (TIMx_CCR1) .....394
16.4.15TIM2 capture/compare register 2 (TIMx_CCR2) .....395
16.4.16TIM2 capture/compare register 3 (TIMx_CCR3) .....395
16.4.17TIM2 capture/compare register 4 (TIMx_CCR4) .....396
16.4.18TIM2 DMA control register (TIM2_DCR) .....396
16.4.19TIM2 DMA address for full transfer (TIM2_DMAR) .....397
16.4.20TIM2 option register 1 (TIM2_OR) .....397
16.4.21TIM2 alternate function option register 1 (TIM2_AF1) .....398
16.4.22TIM2 input selection register (TIM2_TISEL) .....399
16.5TIM2 register map .....400
17General-purpose timers (TIM16) .....402
17.1TIM16 introduction .....402
17.2TIM16 main features .....402
17.3TIM16 functional description .....404
17.3.1Time-base unit .....404
17.3.2Counter modes .....406
17.3.3Repetition counter .....409
17.3.4Clock selection .....410
17.3.5Capture/compare channels .....411
17.3.6Input capture mode .....413
17.3.7Forced output mode .....414
17.3.8Output compare mode .....414
17.3.9PWM mode .....416
17.3.10Complementary outputs and dead-time insertion .....417
17.3.11Using the break function .....419
17.3.12Bidirectional break inputs .....422
17.3.13One-pulse mode .....424
17.3.14Retriggerable one pulse mode (OPM) .....425
17.3.15UIF bit remapping .....426
17.3.16Timer16 and external trigger synchronization .....426
17.3.17Timer synchronization .....428
17.3.18DMA burst mode .....432
17.3.19Debug mode .....433
17.4TIM16 registers .....434
17.4.1TIM16 control register 1 (TIMx_CR1) .....434
17.4.2TIM16 control register 2 (TIMx_CR2) .....436
17.4.3TIM16 slave mode control register (TIM16_SMCR) .....437
17.4.4TIM16 DMA/interrupt enable register (TIMx_DIER) .....439
17.4.5TIM16 status register (TIMx_SR) .....440
17.4.6TIM16 event generation register (TIMx_EGR) .....442
17.4.7TIM16 capture/compare mode register 1 (TIMx_CCMR1) .....443
17.4.8TIM16 capture/compare enable register (TIMx_CCER) .....447
17.4.9TIM16 counter (TIMx_CNT) .....449
17.4.10TIM16 prescaler (TIMx_PSC) .....449
17.4.11TIM16 auto-reload register (TIMx_ARR) .....449
17.4.12TIM16 repetition counter register (TIMx_RCR) .....450
17.4.13TIM16 capture/compare register 1 (TIMx_CCR1) .....450
17.4.14TIM16 break and dead-time register (TIMx_BDTR) .....451
17.4.15TIM16 DMA control register (TIMx_DCR) .....454
17.4.16TIM16 DMA address for full transfer (TIMx_DMAR) .....454
17.4.17TIM16 option register 1 (TIM16_OR) .....455
17.4.18TIM16 alternate function option register 2 (TIMx_AF1) .....456
17.4.19TIM16 input selection register (TIM16_TISEL) .....457
17.4.20TIM16 register map .....458
18Real-time clock (RTC)460
18.1Introduction460
18.2RTC main features460
18.3RTC functional description461
18.3.1RTC block diagram461
18.3.2Clock and prescalers461
18.3.3Real-time clock and calendar462
18.3.4Programmable alarm462
18.3.5Periodic auto-wakeup463
18.3.6RTC initialization and configuration464
18.3.7Reading the calendar465
18.3.8Resetting the RTC466
18.3.9RTC synchronization466
18.3.10RTC smooth digital calibration467
18.3.11Time-stamp function469
18.3.12Tamper detection470
18.3.13Calibration clock output472
18.3.14Alarm output472
18.4RTC low power modes473
18.5RTC interrupts473
18.6RTC registers474
18.6.1RTC time register (RTC_TR)474
18.6.2RTC date register (RTC_DR)475
18.6.3RTC control register (RTC_CR)476
18.6.4RTC initialization and status register (RTC_ISR)479
18.6.5RTC prescaler register (RTC_PRER)482
18.6.6RTC wakeup timer register (RTC_WUTR)483
18.6.7RTC alarm A register (RTC_ALRMAR)484
18.6.8RTC write protection register (RTC_WPR)485
18.6.9RTC sub second register (RTC_SSR)485
18.6.10RTC shift control register (RTC_SHIFTR)486
18.6.11RTC timestamp time register (RTC_TSTR)487
18.6.12RTC timestamp date register (RTC_TSDR)488
18.6.13RTC time-stamp sub second register (RTC_TSSSR)488
18.6.14RTC calibration register (RTC_CALR)489
18.6.15RTC_TAMPCR register (RTC_TAMPCR)490
18.6.16RTC alarm A sub second register (RTC_ALRMASSR) .....492
18.6.17RTC option register (RTC_OR) .....493
18.6.18RTC backup registers (RTC_BKPxR) .....494
18.7RTC register map .....495
19Independent watchdog (IWDG) .....497
19.1Introduction .....497
19.2IWDG main features .....497
19.3IWDG functional description .....497
19.3.1Window option .....497
19.3.2Register access protection .....498
19.3.3Debug mode .....499
19.4IWDG registers .....499
19.4.1Key register (IWDG_KR) .....499
19.4.2Prescaler register (IWDG_PR) .....500
19.4.3Reload register (IWDG_RLR) .....501
19.4.4Status register (IWDG_SR) .....502
19.4.5Window register (IWDG_WINR) .....503
19.5IWDG register map .....504
20Inter-integrated circuit (I2C) interface .....505
20.1Introduction .....505
20.2I2C main features .....505
20.3I2C implementation .....506
20.4I2C functional description .....506
20.4.1I2C block diagram .....507
20.4.2I2C clock requirements .....508
20.4.3Mode selection .....508
20.4.4I2C initialization .....510
20.4.5Software reset .....514
20.4.6Data transfer .....514
20.4.7I2C target mode .....517
20.4.8I2C controller mode .....525
20.4.9I2C_TIMINGR register configuration examples .....537
20.4.10SMBus specific features .....537
20.4.11SMBus initialization .....540
20.4.12SMBus: I2C_TIMEOUTR register configuration examples542
20.4.13SMBus target mode543
20.4.14Error conditions549
20.4.15DMA requests550
20.5I2C interrupts551
20.6I2C registers553
20.6.1Control register 1 (I2C_CR1)553
20.6.2Control register 2 (I2C_CR2)556
20.6.3Own address 1 register (I2C_OAR1)559
20.6.4Own address 2 register (I2C_OAR2)560
20.6.5Timing register (I2C_TIMINGR)561
20.6.6Timeout register (I2C_TIMEOUTR)562
20.6.7Interrupt and status register (I2C_ISR)563
20.6.8Interrupt clear register (I2C_ICR)565
20.6.9PEC register (I2C_PECR)566
20.6.10Receive data register (I2C_RXDR)567
20.6.11Transmit data register (I2C_TXDR)567
20.7I2C register map568
21Universal synchronous asynchronous receiver transmitter (USART)570
21.1USART introduction570
21.2USART main features571
21.3USART extended features572
21.4USART implementation572
21.5USART functional description573
21.5.1USART character description574
21.5.2FIFOs and thresholds576
21.5.3Transmitter577
21.5.4Receiver581
21.5.5Baud rate generation587
21.5.6Tolerance of the USART receiver to clock deviation588
21.5.7Auto baud rate detection589
21.5.8Multiprocessor communication590
21.5.9Modbus communication592
21.5.10Parity control593
21.5.11LIN (local interconnection network) mode .....594
21.5.12USART synchronous mode .....596
21.5.13Single-wire half-duplex communication .....600
21.5.14Receiver Timeout .....600
21.5.15Smartcard mode .....600
21.5.16IrDA SIR ENDEC block .....605
21.5.17Continuous communication using DMA .....607
21.5.18RS232 Hardware flow control and RS485 Driver Enable .....610
21.6USART interrupts .....612
21.7USART registers .....613
21.7.1Control register 1 (USARTx_CR1) .....613
21.7.2Control register 2 (USARTx_CR2) .....616
21.7.3Control register 3 (USARTx_CR3) .....621
21.7.4Baud rate register (USARTx_BRR) .....625
21.7.5Guard time and prescaler register (USARTx_GTPR) .....626
21.7.6Receiver timeout register (USARTx_RTOR) .....627
21.7.7Request register (USARTx_RQR) .....628
21.7.8Interrupt & status register (USARTx_ISR) .....629
21.7.9Interrupt flag clear register (USARTx_ICR) .....635
21.7.10Receive data register (USART_RDR) .....636
21.7.11Transmit data register (USART_TDR) .....636
21.7.12Prescaler register (USARTx_PRESC) .....637
21.8USART register map .....638
22Low power universal asynchronous receiver transmitter (LPUART) 640
22.1LPUART introduction .....640
22.2LPUART main features .....641
22.3LPUART functional description .....642
22.3.1LPUART character description .....643
22.3.2FIFOs and thresholds .....645
22.3.3Transmitter .....646
22.3.4Receiver .....649
22.3.5Baud rate generation .....653
22.3.6Multiprocessor communication .....654
22.3.7Parity control .....656
22.3.8Single-wire half-duplex communication .....657
22.3.9Continuous communication using DMA .....657
22.3.10RS232 Hardware flow control and RS485 Driver Enable .....660
22.3.11Wakeup from Deepstop mode .....663
22.4LPUART interrupts .....665
22.5LPUART registers .....667
22.5.1Control register 1 (LPUART_CR1) .....667
22.5.2Control register 2 (LPUART_CR2) .....670
22.5.3Control register 3 (LPUART_CR3) .....672
22.5.4Baud rate register (LPUART_BRR) .....675
22.5.5Request register (LPUART_RQR) .....676
22.5.6Interrupt & status register (LPUART_ISR) .....676
22.5.7Interrupt flag clear register (LPUART_ICR) .....681
22.5.8Receive data register (LPUART_RDR) .....682
22.5.9Transmit data register (LPUART_TDR) .....682
22.5.10Prescaler register (LPUART_PRESC) .....683
22.5.11LPUART register map .....684
23Serial peripheral interface / inter-IC sound (SPI/I2S) .....685
23.1Introduction .....685
23.2SPI main features .....685
23.3I2S main features .....686
23.4SPI/I2S implementation .....686
23.5SPI functional description .....687
23.5.1General description .....687
23.5.2Communications between one master and one slave .....688
23.5.3Standard multi-slave communication .....690
23.5.4Slave select (NSS) pin management .....691
23.5.5Communication formats .....693
23.5.6Configuration of SPI .....695
23.5.7Procedure for enabling SPI .....696
23.5.8Data transmission and reception procedures .....696
23.5.9SPI status flags .....706
23.5.10SPI error flags .....707
23.5.11NSS pulse mode .....708
23.5.12TI mode .....708
23.5.13CRC calculation .....709
23.6SPI interrupts711
23.7I2S functional description712
23.7.1I2S general description712
23.7.2Supported audio protocols713
23.7.3Clock generator719
23.7.4I2S master mode724
23.7.5I2S slave mode725
23.7.6I2S error flags727
23.7.7DMA features728
23.8I2S interrupts728
23.9SPI and I2S registers729
23.9.1SPI control register 1 (SPIx_CR1)729
23.9.2SPI control register 2 (SPIx_CR2)731
23.9.3SPI status register (SPIx_SR)734
23.9.4SPI data register (SPIx_DR)736
23.9.5SPI CRC polynomial register (SPIx_CRCPR)736
23.9.6SPI Rx CRC register (SPIx_RXCRCR)737
23.9.7SPI Tx CRC register (SPIx_TXCRCR)737
23.9.8SPIx_I2S configuration register (SPIx_I2SCFGR)738
23.9.9SPIx_I2S prescaler register (SPIx_I2SPR)740
23.10SPI/I2S register map740
24Sub-GHz radio IP (MRSUBG)742
24.1Overview742
24.1.1MR_SubG IP overview742
24.1.2Miscellaneous feature: control of an external components through pads of the SoC743
24.2Interfacing with the MR_SubG IP745
24.2.1Interrupt lines to the CPU745
24.2.2Interface with the RAM embedded in the SoC745
24.2.3Interface with the power, clock and reset controllers746
24.2.4Interface with the SoC for busy information746
24.2.5Signals connected to SoC GPIOs747
24.3Packet and protocol construction747
24.3.1Packet structure748
24.3.2Sequence transformation and data coding753
24.3.3Protocols759
24.3.4Transmission and reception modes .....773
24.3.5Transmission modes .....774
24.3.6Reception modes .....776
24.3.7TX power control and configuration information .....782
24.3.8Guidelines on registers configuration for standard RF .....784
24.4Global registers .....788
24.4.1Register organization .....788
24.5STATIC_REG_BLOCK register descriptions .....789
24.5.1PCKT_CONFIG register (PCKT_CONFIG) .....790
24.5.2SYNC register (SYNC) .....792
24.5.3SEC_SYNC register (SEC_SYNC) .....792
24.5.4CRC_INIT register (CRC_INIT) .....793
24.5.5PCKT_CTRL register (PCKT_CTRL) .....794
24.5.6DATABUFFER0_PTR register (DATABUFFER0_PTR) .....796
24.5.7DATABUFFER1_PTR register (DATABUFFER1_PTR) .....797
24.5.8DATABUFFER_SIZE register (DATABUFFER_SIZE) .....797
24.5.9PA_LEVEL_3_0 register (PA_LEVEL_3_0) .....798
24.5.10PA_LEVEL_7_4 register (PA_LEVEL_7_4) .....799
24.5.11PA_CONFIG register (PA_CONFIG) .....800
24.5.12IF_CTRL register (IF_CTRL) .....801
24.5.13AS_QI_CTRL register (AS_QI_CTRL) .....802
24.5.14IQC_CONFIG register (IQC_CONFIG) .....803
24.5.15DSSS_CTRL register (DSSS_CTRL) .....804
24.5.16STATIC_REG_BLOCK register map .....805
24.6DYNAMIC_REG_BLOCK register descriptions .....807
24.6.1PCKTLEN_CONFIG register (PCKTLEN_CONFIG) .....808
24.6.2MOD0_CONFIG register (MOD0_CONFIG) .....809
24.6.3MOD1_CONFIG register (MOD1_CONFIG) .....810
24.6.4SYNTH_FREQ register (SYNTH_FREQ) .....811
24.6.5VCO_CAL_CONFIG register (VCO_CAL_CONFIG) .....812
24.6.6RX_TIMER register (RX_TIMER) .....813
24.6.7DATABUFFER_THR register (DATABUFFER_THR) .....814
24.6.8RFSEQ_IRQ_ENABLE register (RFSEQ_IRQ_ENABLE) .....815
24.6.9ADDITIONAL_CTRL register (ADDITIONAL_CTRL) .....817
24.6.10FAST_RX_TIMER register (FAST_RX_TIMER) .....818
24.6.11COMMAND register (COMMAND) .....819
24.6.12DYNAMIC_REG_BLOCK register map .....820
24.7READ-ONLY_REG_BLOCK register descriptions822
24.7.1RFSEQ_IRQ_STATUS register (RFSEQ_IRQ_STATUS)823
24.7.2RFSEQ_STATUS_DETAIL register (RFSEQ_STATUS_DETAIL)825
24.7.3RADIO_FSM_INFO register (RADIO_FSM_INFO)826
24.7.4RX_INDICATOR register (RX_INDICATOR)827
24.7.5RX_INFO_REG register (RX_INFO_REG)827
24.7.6RX_CRC_REG register (RX_CRC_REG)828
24.7.7QI_INFO register (QI_INFO)828
24.7.8DATABUFFER_INFO register (DATABUFFER_INFO)829
24.7.9TIME_CAPTURE register (TIME_CAPTURE)830
24.7.10IQC_CORRECTION_OUT register (IQC_CORRECTION_OUT)830
24.7.11PA_SAFEASK_OUT register (PA_SAFEASK_OUT)831
24.7.12VCO_CALIB_OUT register (VCO_CALIB_OUT)832
24.7.13SEQ_INFO register (SEQ_INFO)833
24.7.14SEQ_EVENT_STATUS register (SEQ_EVENT_STATUS)834
24.7.15READ-ONLY_REG_BLOCK register map and reset values835
24.8MISC_REG_BLOCK register descriptions837
24.8.1RFIP_VERSION register (RFIP_VERSION)838
24.8.2RRM_UDRA_CTRL register (RRM_UDRA_CTRL)839
24.8.3SEQUENCER_CTRL register (SEQUENCER_CTRL)840
24.8.4ABSOLUTE_TIME register (ABSOLUTE_TIME)841
24.8.5SCM_COUNTER_VAL register (SCM_COUNTER_VAL)841
24.8.6SCM_MIN_MAX register (SCM_MIN_MAX)842
24.8.7WAKEUP_IRQ_STATUS register (WAKEUP_IRQ_STATUS)843
24.8.8MISC_REG_BLOCK register map844
24.9RETAINED_REG_BLOCK register descriptions845
24.9.1RFIP_WAKEUPTIME register (RFIP_WAKEUPTIME)845
24.9.2CPU_WAKEUPTIME register (CPU_WAKEUPTIME)846
24.9.3WAKEUP_CTRL register (WAKEUP_CTRL)847
24.9.4RRM_CMDLIST_PTR register (RRM_CMDLIST_PTR)848
24.9.5SEQ_GLOBALTABLE_PTR register (SEQ_GLOBALTABLE_PTR)848
24.9.6RETAINED_REG_BLOCK register map849
24.10Radio register descriptions849
24.10.1Radio register overview850
24.10.2RF_FSM0_TIMEOUT register (RF_FSM0_TIMEOUT)853
24.10.3RF_FSM1_TIMEOUT register (RF_FSM1_TIMEOUT)853
24.10.4RF_FSM2_TIMEOUT register (RF_FSM2_TIMEOUT)854
24.10.5RF_FSM3_TIMEOUT register (RF_FSM3_TIMEOUT)854
24.10.6RF_FSM4_TIMEOUT register (RF_FSM4_TIMEOUT)855
24.10.7RF_FSM5_TIMEOUT register (RF_FSM5_TIMEOUT)855
24.10.8RF_FSM6_TIMEOUT register (RF_FSM6_TIMEOUT)856
24.10.9RF_FSM7_TIMEOUT register (RF_FSM7_TIMEOUT)856
24.10.10AFC0_CONFIG register (AFC0_CONFIG)857
24.10.11AFC1_CONFIG register (AFC1_CONFIG)857
24.10.12AFC2_CONFIG register (AFC2_CONFIG)858
24.10.13AFC3_CONFIG register (AFC3_CONFIG)859
24.10.14CLKREC_CTRL0 register (CLKREC_CTRL0)860
24.10.15CLKREC_CTRL1 register (CLKREC_CTRL1)861
24.10.16DCREM_CTRL0 register (DCREM_CTRL0)862
24.10.17DCREM_CTRL1 register (DCREM_CTRL1)862
24.10.18IQC_CTRL0 register (IQC_CTRL0)863
24.10.19IQC_CTRL1 register (IQC_CTRL1)863
24.10.20IQC_CTRL2 register (IQC_CTRL2)864
24.10.21IQC_CTRL3 register (IQC_CTRL3)864
24.10.22AGC_ANA_ENG register (AGC_ANA_ENG)865
24.10.23AGC0_CTRL register (AGC0_CTRL)866
24.10.24AGC1_CTRL register (AGC1_CTRL)866
24.10.25AGC2_CTRL register (AGC2_CTRL)867
24.10.26AGC3_CTRL register (AGC3_CTRL)868
24.10.27AGC4_CTRL register (AGC4_CTRL)868
24.10.28AGC_ATTEN0 register (AGC_ATTEN0)869
24.10.29AGC_ATTEN1 register (AGC_ATTEN1)870
24.10.30AGC_ATTEN2 register (AGC_ATTEN2)871
24.10.31AGC_ATTEN3 register (AGC_ATTEN3)872
24.10.32AGC_ATTEN4 register (AGC_ATTEN4)873
24.10.33AGC_ATTEN5 register (AGC_ATTEN5)874
24.10.34AGC_ATTEN6 register (AGC_ATTEN6)875
24.10.35AGC_ATTEN7 register (AGC_ATTEN7)876
24.10.36AGC_ATTEN8 register (AGC_ATTEN8)877
24.10.37AGC_ATTEN9 register (AGC_ATTEN9)878
24.10.38AGC1_ATTEN_TRIM register (AGC1_ATTEN_TRIM)879
24.10.39AGC2_ATTEN_TRIM register (AGC2_ATTEN_TRIM)879
24.10.40AGC3_ATTEN_TRIM register (AGC3_ATTEN_TRIM)880
24.10.41AGC4_ATTEN_TRIM register (AGC4_ATTEN_TRIM)880
24.10.42AGC_PGA_HWTRIM_OUT register (AGC_PGA_HWTRIM_OUT) . . .881
24.10.43PA_REG register (PA_REG) . . . . .881
24.10.44PA_HWTRIM_OUT register (PA_HWTRIM_OUT) . . . . .882
24.10.45RSSI_FLT register (RSSI_FLT) . . . . .883
24.10.46RXADC_HWDELAYTRIM_OUT register
(RXADC_HWDELAYTRIM_OUT) . . . . .
884
24.10.47RX_AAF_HWTRIM_OUT register (RX_AAF_HWTRIM_OUT) . . . . .884
24.10.48SINGEN_ANA_ENG register (SINGEN_ANA_ENG) . . . . .885
24.10.49RF_INFO_OUT register (RF_INFO_OUT) . . . . .886
24.10.50RFANA_PLL_IN register (RFANA_PLL_IN) . . . . .886
24.10.51RF_FSM8_TIMEOUT register (RF_FSM8_TIMEOUT) . . . . .887
24.10.52RF_FSM9_TIMEOUT register (RF_FSM9_TIMEOUT) . . . . .887
24.10.53RF_FSM10_TIMEOUT register (RF_FSM10_TIMEOUT) . . . . .888
24.10.54SUBG_DIG_CTRL0 register (SUBG_DIG_CTRL0) . . . . .888
24.10.55RADIO_REG_REG_BLOCK register map . . . . .889
24.11frequency deviation value, thatReceive block . . . . .896
24.11.1Automatic gain control (AGC) . . . . .898
24.11.2DC removal block . . . . .902
24.11.3I/Q mismatch compensation . . . . .903
24.11.4RSSI . . . . .906
24.11.5Carrier sense . . . . .907
24.11.6Antenna switching . . . . .908
24.11.7Automatic frequency compensation (AFC) . . . . .909
24.11.8Symbol timing recovery . . . . .911
24.12Radio register manager (RRM) . . . . .912
24.12.1Overview . . . . .912
24.12.2UDRA . . . . .913
24.12.3Direct APB access . . . . .917
24.12.4RRM arbiter . . . . .917
24.13Radio FSM . . . . .917
24.13.1Radio FSM sequence . . . . .917
24.13.2Radio FSM states overview . . . . .920
24.13.3Timeout durations used by the Radio FSM . . . . .922
24.14Radio controller . . . . .923
24.14.1Commands . . . . .924
24.14.2BACK2ACTIVE2 and BACK2LOCKON bits . . . . .930
24.14.3RX Timer . . . . .931
24.14.4Fast RX termination933
24.14.5Hardware analog failure information933
24.14.6Time capture feature935
24.15Data buffers935
24.15.1Data buffer mechanism936
24.15.2Data buffer manager overview937
24.15.3Programming procedure939
24.15.4Error handling940
24.16Sequencer941
24.16.1Sequencer overview941
24.16.2Sequence description943
24.16.3Next action mask management946
24.16.4Sequencer RAM tables948
24.17GlobalConfiguration RAM table overview949
24.18GlobalConfiguration RAM table register descriptions951
24.18.1Word 0 register (WORD0)951
24.18.2Word1 register (WORD1)952
24.18.3Word N register N = 2 to 16 (WORDN)953
24.19ActionConfiguration RAM table overview954
24.20ActionConfiguration RAM table register descriptions957
24.20.1Word 0 register (WORD0)957
24.20.2Word 1 register (WORD1)957
24.20.3Word 2 register (WORD2)958
24.20.4Word 3 register (WORD3)959
24.20.5Word 4 register (WORD4)960
24.20.6Word 5 register (WORD5)960
24.20.7Word 6 register (WORD6)961
24.20.8Word 7 register (WORD7)962
24.20.9Word 8 register (WORD8)963
24.20.10Word N register N = 2 to 16 (WORDN)963
24.21Time management unit (TMU)964
24.21.1Slow clock period measurement964
24.21.2Time interpolation966
24.22Wakeup and sleep management967
24.22.1Sleep management967
24.22.2Wakeup block967
24.23Uses-cases: examples of scenarios with the Sequencer . . . . .970
24.23.1Reception with auto-acknowledge . . . . .970
24.23.2Sniff mode . . . . .973
24.23.3Listen before talk (LBT) . . . . .976
25Debug support (DBG) . . . . .980
25.1SWD debug features . . . . .980
25.2MCU debug component (DBG) . . . . .980
25.2.1Debug support for low-power modes . . . . .981
25.2.2Debug support for timers, watchdog and I2C . . . . .981
25.3DBG registers . . . . .981
25.3.1DBG configuration register (DBG_CR) . . . . .981
25.3.2DBG APB0 freeze register (DBG_APB0_FZ) . . . . .983
25.3.3DBG APB1 freeze register (DBG_APB1_FZ) . . . . .984
25.4DBG register map . . . . .985
26Device electronic signature (DESIG) . . . . .986
26.1DESIG registers . . . . .986
26.1.1Unique device ID register 1 (UID64_R1) . . . . .986
26.1.2Unique device ID register 2 (UID64_R2) . . . . .986
27Important security notice . . . . .987
28Revision history . . . . .988

List of tables

Table 1.List of acronyms .....36
Table 2.Document references .....39
Table 3.Memory map and peripheral register boundary addresses .....44
Table 4.SRAM0 reserved locations .....46
Table 5.Address remapping depending on the REMAP bit .....46
Table 6.Address remapping depending on REMAP bit .....47
Table 7.Interrupt vectors .....48
Table 8.GPIO alternate options AF0 - AF3 .....53
Table 9.GPIO alternate options AF4 - AF6 .....55
Table 10.I/O Analog feature mapping .....56
Table 11.I/O Additional function mapping .....57
Table 12.SMPS BOM information .....72
Table 13.PWR register map and reset values .....103
Table 14.Flags versus CPU reboot reason .....106
Table 15.Wakeup reason flags .....107
Table 16.System clock versus Radio IPs clock dependency .....113
Table 17.RCC register map and reset values .....146
Table 18.Port bit configuration table .....154
Table 19.GPIO register map and reset values .....181
Table 20.SYSCFG register map and reset values .....201
Table 21.Flash memory section address .....205
Table 22.Command list available for customer .....206
Table 23.Flash size information .....211
Table 24.Flash controller register map and reset values .....217
Table 25.System memory protection .....221
Table 26.Programmable data width and endian behavior (when PINC=MINC=1 and NDT=4) .....227
Table 27.DMA interrupt requests .....229
Table 28.DMA register map and reset values .....236
Table 29.DMAMUX instantiation .....239
Table 30.DMAMUX: assignment of multiplexer inputs to resource .....240
Table 31.DMAMUX register map and reset values .....243
Table 32.ADC interrupt requests .....250
Table 33.ADC DTB configuration details .....267
Table 34.ADC register map and reset values .....267
Table 35.RNG register list .....270
Table 36.RNG_CR register description .....270
Table 37.RNG_SR register description .....271
Table 38.RNG_VAL register description .....271
Table 39.AES internal input/output signals .....273
Table 40.CTR mode initialization vector definition .....290
Table 41.GCM last block definition .....292
Table 42.Initialization of AES_IVRx registers in GCM mode .....293
Table 43.Initialization of AES_IVRx registers in CCM mode .....300
Table 44.Key endianness in AES_KEYRx registers (128- or 256-bit key length) .....305
Table 45.AES interrupt requests .....308
Table 46.Processing latency for ECB, CBC and CTR .....308
Table 47.Processing latency for GCM and CCM (in clock cycles) .....309
Table 48.AES register map and reset values .....322
Table 49.CRC register map and reset values . . . . .330
Table 50.Counting direction versus encoder signals . . . . .362
Table 51.Output control bits for OCx channels . . . . .392
Table 52.TIM2 register map and reset values . . . . .400
Table 53.Break protection disarming conditions . . . . .422
Table 54.TIM16 internal trigger connection . . . . .438
Table 55.Output control bits for complementary OCx and OCxN channels with break feature . . . . .448
Table 56.TIM16 register map and reset values . . . . .458
Table 57.RTC register map and reset values . . . . .495
Table 58.IWDG register map and reset values . . . . .504
Table 59.I2C implementation . . . . .506
Table 60.I2C-SMBUS specification data setup and hold times . . . . .513
Table 61.I2C configuration table . . . . .516
Table 62.I2C-SMBUS specification clock timings . . . . .527
Table 63.Examples of timings settings for fI2CCLK = 16 MHz . . . . .537
Table 64.SMBus timeout specifications . . . . .539
Table 65.SMBUS with PEC configuration . . . . .541
Table 66.Examples of TIMEOUTA settings (max tTIMEOUT = 25 ms) . . . . .542
Table 67.Example of TIMEOUTB settings . . . . .542
Table 68.Example of TIMEOUTA settings (max tIDLE = 50 μs) . . . . .542
Table 69.I2C Interrupt requests . . . . .551
Table 70.I2C register map and reset values . . . . .568
Table 71.USART / LPUART features . . . . .572
Table 72.Noise detection from sampled data . . . . .586
Table 73.Tolerance of the USART receiver when BRR [3:0] = 0000
(high-density devices) . . . . .
589
Table 74.Tolerance of the USART receiver when BRR[3:0] is different from 0000
(high-density devices) . . . . .
589
Table 75.Frame formats . . . . .593
Table 76.USART interrupt requests . . . . .612
Table 77.USART register map and reset values . . . . .638
Table 78.Error calculation for programmed baudrates at fck = 32,768 KHz . . . . .653
Table 79.Error calculation for programmed baudrates at fck = 16 MHz . . . . .654
Table 80.Frame formats . . . . .656
Table 82.LPUART interrupt requests . . . . .665
Table 83.LPUART register map and reset values . . . . .684
Table 84.SPI implementation . . . . .686
Table 85.SPI interrupt requests . . . . .711
Table 86.Audio frequency precision using I2SCLK = 64 MHz . . . . .721
Table 87.Audio frequency precision using I2SCLK = 32 MHz . . . . .722
Table 88.Audio frequency precision using I2SCLK = 16 MHz . . . . .723
Table 89.I2S interrupt requests . . . . .728
Table 90.SPI register map and reset values . . . . .740
Table 91.PREAMBLE pattern selection . . . . .748
Table 92.PHR frame . . . . .752
Table 93.3-out-of-6 coding table . . . . .759
Table 94.Constellation mapping for 2-(G)FSK . . . . .761
Table 95.Constellation mapping for 4-(G)FSK . . . . .762
Table 96.DSSS codes . . . . .763
Table 97.PA Bessel filter programming . . . . .765
Table 98.Frequency bands . . . . .769
Table 99.Data rate range versus modulation . . . . .770
Table 100.Channel filter bandwidth (in kHz) programming . . . . .771
Table 101.TX mode summary . . . . .774
Table 102.RX mode summary . . . . .776
Table 103.Global registers sub-groups base address . . . . .788
Table 104.STATIC_REG_BLOCK register list. . . . .789
Table 105.STATIC_REG_BLOCK register map and reset values. . . . .805
Table 106.DYNAMIC_REG_BLOCK register list. . . . .807
Table 107.DYNAMIC_REG_BLOCK register map and reset values. . . . .820
Table 108.READ-ONLY_REG_BLOCK register list. . . . .822
Table 109.READ-ONLY_REG_BLOCK register map and reset values. . . . .835
Table 110.MISC_REG_BLOCK register list . . . . .837
Table 111.MISC_REG_BLOCK register map and reset values. . . . .844
Table 112.RETAINED_REG_BLOCK register list. . . . .845
Table 113.RETAINED_REG_BLOCK register map and reset values . . . . .849
Table 114.RADIO_REG_BLOCK register list . . . . .850
Table 115.RADIO_REG_BLOCK register map and reset values . . . . .889
Table 116.DC attenuation per sample versus the filter order n (for FSYS=16 MHz). . . . .902
Table 117.IQC correction available configurations . . . . .904
Table 118.UDRA command format in RAM. . . . .914
Table 119.Radio FSM state details . . . . .920
Table 120.Timeout versus Radio FSM state exit. . . . .922
Table 121.Command list . . . . .924
Table 122.Concurrent command behavior overview . . . . .925
Table 123.RX Timer duration versus slow clock frequency. . . . .932
Table 124.DBM initial internal FIFO prefetch. . . . .938
Table 125.Sequencer internal events bus overview . . . . .947
Table 126.GlobalConfiguration RAM table . . . . .950
Table 127.GlobalConfiguration RAM table registers . . . . .951
Table 128.ActionConfiguration RAM table. . . . .954
Table 129.ActionConfiguration RAM table registers list . . . . .956
Table 130.DBG register map and reset values . . . . .985
Table 131.Document revision history . . . . .988

List of figures

Figure 1.System architecture41
Figure 2.Memory map43
Figure 3.AHB up/down converter51
Figure 4.Power supply domain overview60
Figure 5.Power on reset/power down reset waveform61
Figure 6.Power regulators and SMPS configuration in Run mode63
Figure 7.Power regulators and SMPS configuration in Deepstop mode66
Figure 8.Power regulators and SMPS configuration in Ultra Deepstop mode68
Figure 9.Power regulators and SMPS configuration in Shutdown mode70
Figure 10.PWR state machine for operating mode transitions71
Figure 11.Power supply configuration72
Figure 12.PWR SMPS state machine overview73
Figure 13.Reset generation108
Figure 14.System clock details111
Figure 15.LCO / MCO output clocks115
Figure 16.Basic structure of a mixed analog/digital five-volt tolerant I/O port bit153
Figure 17.Basic structure of a digital only five-volt tolerant I/O port bit154
Figure 18.Input floating/pull up/pull down configurations158
Figure 19.Output configuration159
Figure 20.Alternate function configuration160
Figure 21.High impedance-analog configuration160
Figure 22.DMAMUX block diagram241
Figure 23.ADC top level diagram246
Figure 24.ADC sampling time Tsw and sampling period Ts248
Figure 25.Effect of analog source resistance249
Figure 26.AES block diagram273
Figure 27.ECB encryption and decryption principle275
Figure 28.CBC encryption and decryption principle276
Figure 29.CTR encryption and decryption principle277
Figure 30.GCM encryption and authentication principle278
Figure 31.GMAC authentication principle278
Figure 32.CCM encryption and authentication principle279
Figure 33.Encryption key derivation for ECB/CBC decryption (Mode 2)282
Figure 34.Example of suspend mode management283
Figure 35.ECB encryption284
Figure 36.ECB decryption284
Figure 37.CBC encryption285
Figure 38.CBC decryption285
Figure 39.ECB/CBC encryption (Mode 1)286
Figure 40.ECB/CBC decryption (Mode 3)287
Figure 41.Message construction in CTR mode289
Figure 42.CTR encryption290
Figure 43.CTR decryption290
Figure 44.Message construction in GCM292
Figure 45.GCM authenticated encryption293
Figure 46.Message construction in GMAC mode297
Figure 47.GMAC authentication mode297
Figure 48.Message construction in CCM mode298
Figure 49.CCM mode authenticated encryption . . . . .300
Figure 50.128-bit block construction with respect to data swap . . . . .304
Figure 51.DMA transfer of a 128-bit data block during input phase . . . . .306
Figure 52.DMA transfer of a 128-bit data block during output phase . . . . .307
Figure 53.CRC calculation unit block diagram . . . . .325
Figure 54.General purpose timer block diagram. . . . .332
Figure 55.Counter timing diagram with prescaler division change from 1 to 2 . . . . .334
Figure 56.Counter timing diagram with prescaler division change from 1 to 4 . . . . .334
Figure 57.Counter timing diagram, internal clock divided by 1 . . . . .335
Figure 58.Counter timing diagram, internal clock divided by 2 . . . . .335
Figure 59.Counter timing diagram, internal clock divided by 4 . . . . .336
Figure 60.Counter timing diagram, internal clock divided by N. . . . .336
Figure 61.Counter timing diagram, update event when ARPE=0 (TIMx_ARR not preloaded) . . . . .336
Figure 62.Counter timing diagram, update event when ARPE=1 (TIMx_ARR preloaded) . . . . .337
Figure 63.Counter timing diagram, internal clock divided by 1 . . . . .338
Figure 64.Counter timing diagram, internal clock divided by 2 . . . . .338
Figure 65.Counter timing diagram, internal clock divided by 4 . . . . .338
Figure 66.Counter timing diagram, internal clock divided by N. . . . .339
Figure 67.Counter timing diagram, update event when repetition counter is not used. . . . .339
Figure 68.Counter timing diagram, internal clock divided by 1, TIMx_ARR = 0x6 . . . . .340
Figure 69.Counter timing diagram, internal clock divided by 2 . . . . .341
Figure 70.Counter timing diagram, internal clock divided by 4, TIMx_ARR=0x36 . . . . .341
Figure 71.Counter timing diagram, internal clock divided by N. . . . .341
Figure 72.Counter timing diagram, update event with ARPE=1 (counter underflow) . . . . .342
Figure 73.Counter timing diagram, Update event with ARPE=1 (counter overflow) . . . . .342
Figure 74.Update rate examples depending on mode and TIMx_RCR register settings . . . . .343
Figure 75.External trigger input block . . . . .344
Figure 76.TIM2 ETR input circuitry . . . . .344
Figure 77.Control circuit in normal mode, internal clock divided by 1 . . . . .345
Figure 78.TI2 external clock connection example. . . . .345
Figure 79.Control circuit in external clock mode 1 . . . . .346
Figure 80.External trigger input block . . . . .347
Figure 81.Control circuit in external clock mode 2 . . . . .347
Figure 82.Capture/compare channel (example: channel 1 input stage) . . . . .348
Figure 83.Capture/compare channel 1 main circuit . . . . .348
Figure 84.Output stage of capture/compare channel (channels 1, 2, 3, 4) . . . . .349
Figure 85.PWM input mode timing . . . . .351
Figure 86.Output compare mode, toggle on OC1 . . . . .352
Figure 87.Edge-aligned PWM waveforms (ARR=8) . . . . .354
Figure 88.Center-aligned PWM waveforms (ARR=8) . . . . .355
Figure 89.Generation of 2 phase-shifted PWM signals with 50% duty cycle . . . . .356
Figure 90.Combined PWM mode on channel 1 and 3 . . . . .357
Figure 91.Clearing TIMx OCxREF . . . . .358
Figure 92.Example of one pulse mode. . . . .359
Figure 93.Retrigerrable one pulse mode . . . . .361
Figure 94.Example of counter operation in encoder interface mode. . . . .362
Figure 95.Example of encoder interface mode with TI1FP1 polarity inverted. . . . .363
Figure 96.Measuring time interval between edges on 3 signals . . . . .364
Figure 97.Control circuit in reset mode . . . . .365
Figure 98.Control circuit in gated mode . . . . .365
Figure 99.Control circuit in trigger mode. . . . .366
Figure 100.Control circuit in external clock mode 2 + trigger mode . . . . .367
Figure 101. Master/slave timers example . . . . .368
Figure 102. Gating TIM16 with OC1REF of TIM2 . . . . .369
Figure 103. Gating TIM16 with Enable of TIM2 . . . . .370
Figure 104. Triggering TIM16 with update of TIM2 . . . . .370
Figure 105. Triggering TIM16 with Enable of TIM2 . . . . .371
Figure 106. TIM16 block diagram . . . . .403
Figure 107. Counter timing diagram with prescaler division change from 1 to 2 . . . . .405
Figure 108. Counter timing diagram with prescaler division change from 1 to 4 . . . . .405
Figure 109. Counter timing diagram, internal clock divided by 1 . . . . .406
Figure 110. Counter timing diagram, internal clock divided by 2 . . . . .407
Figure 111. Counter timing diagram, internal clock divided by 4 . . . . .407
Figure 112. Counter timing diagram, internal clock divided by N . . . . .407
Figure 113. Counter timing diagram, update event when ARPE=0 (TIMx_ARR not
preloaded). . . . .
408
Figure 114. Counter timing diagram, update event when ARPE=1 (TIMx_ARR
preloaded). . . . .
408
Figure 115. Update rate examples depending on mode and TIMx_RCR register settings . . . . .409
Figure 116. Control circuit in normal mode, internal clock divided by 1 . . . . .410
Figure 117. TI1 external clock connection example. . . . .410
Figure 118. Control circuit in external clock mode 1 . . . . .411
Figure 119. Capture/compare channel (example: channel 1 input stage) . . . . .412
Figure 120. Capture/compare channel 1 main circuit . . . . .412
Figure 121. Output stage of capture/compare channel (channel 1). . . . .413
Figure 122. Output compare mode, toggle on OC1. . . . .416
Figure 123. Edge-aligned PWM waveforms (ARR=8) . . . . .417
Figure 124. Complementary output with dead-time insertion. . . . .418
Figure 125. Dead-time waveforms with delay greater than the negative pulse. . . . .418
Figure 126. Dead-time waveforms with delay greater than the positive pulse. . . . .418
Figure 127. Output behavior in response to a break . . . . .421
Figure 128. Output redirection . . . . .423
Figure 129. Example of one pulse mode. . . . .424
Figure 130. Retriggerable one pulse mode . . . . .425
Figure 131. Control circuit in reset mode . . . . .427
Figure 132. Control circuit in gated mode . . . . .427
Figure 133. Control circuit in trigger mode. . . . .428
Figure 134. Master/slave timers example . . . . .429
Figure 135. Gating TIM2 with OC1REF of TIM16 . . . . .430
Figure 136. Gating TIM2 with Enable of TIM16 . . . . .431
Figure 137. Triggering TIM2 with update of TIM16 . . . . .431
Figure 138. Triggering TIM2 with Enable of TIM16 . . . . .432
Figure 139. RTC block diagram . . . . .461
Figure 140. Independent watchdog block diagram . . . . .499
Figure 141. I2C block diagram. . . . .507
Figure 142. I2C bus protocol . . . . .509
Figure 143. Setup and hold timings . . . . .511
Figure 144. I2C initialization flowchart . . . . .514
Figure 145. Data reception . . . . .515
Figure 146. Data transmission . . . . .515
Figure 147. Target initialization flowchart . . . . .519
Figure 148. Transfer sequence flowchart for I2C target transmitter, NOSTRETCH=0 . . . . .520
Figure 149. Transfer sequence flowchart for I2C target transmitter, NOSTRETCH=1 . . . . .521
Figure 150. Transfer bus diagrams for I2C target transmitter . . . . .522
Figure 151. Transfer sequence flowchart for target receiver with NOSTRETCH=0523
Figure 152. Transfer sequence flowchart for target receiver with NOSTRETCH=1524
Figure 153. Transfer bus diagrams for I2C target receiver524
Figure 154. Controller clock generation526
Figure 155. Controller initialization flowchart528
Figure 156. 10-bit address read access with HEAD10R=1528
Figure 157. Transfer sequence flowchart for I2C controller transmitter for N≤255 bytes530
Figure 158. Transfer sequence flowchart for I2C controller transmitter for N>255 bytes531
Figure 159. Transfer bus diagrams for I2C controller transmitter532
Figure 160. Transfer sequence flowchart for I2C controller receiver for N≤255 bytes534
Figure 161. Transfer sequence flowchart for I2C controller receiver for N >255 bytes535
Figure 162. Transfer bus diagrams for I2C controller receiver536
Figure 163. Timeout intervals for tLOW:SEXT, tLOW:MEXT540
Figure 164. Transfer sequence flowchart for SMBus target transmitter N bytes + PEC543
Figure 165. Transfer bus diagrams for SMBus target transmitter (SBC=1)544
Figure 166. Transfer sequence flowchart for SMBus target receiver N Bytes + PEC545
Figure 167. Bus transfer diagrams for SMBus target receiver (SBC=1)546
Figure 168. Bus transfer diagrams for SMBus controller transmitter547
Figure 169. Bus transfer diagrams for SMBus controller receiver548
Figure 170. I2C interrupt mapping diagram552
Figure 171. USART block diagram574
Figure 172. Word length programming576
Figure 173. Configurable stop bits578
Figure 174. TC/TXE behavior when transmitting580
Figure 175. Start bit detection when oversampling by 16 or 8581
Figure 176. usart_ker_ck clock divider block diagram584
Figure 177. Data sampling when oversampling by 16585
Figure 178. Data sampling when oversampling by 8586
Figure 179. Mute mode using Idle line detection591
Figure 180. Mute mode using address mark detection592
Figure 181. Break detection in LIN mode (11-bit break length - LBDL bit is set)595
Figure 182. Break detection in LIN mode vs. Framing error detection596
Figure 183. USART example of synchronous Master transmission597
Figure 184. USART data clock timing diagram (M=0)597
Figure 185. USART data clock timing diagram (M bits = 01)598
Figure 186. RX data setup/hold time598
Figure 187. ISO 7816-3 asynchronous protocol601
Figure 188. Parity error detection using the 1.5 stop bits603
Figure 189. IrDA SIR ENDEC- block diagram607
Figure 190. IrDA data modulation (3/16) -Normal Mode607
Figure 191. Transmission using DMA608
Figure 192. Reception using DMA609
Figure 193. Hardware flow control between 2 USARTs610
Figure 194. RS232 RTS flow control610
Figure 195. RS232 CTS flow control611
Figure 196. LPUART Block diagram643
Figure 197. LPUART Word length programming645
Figure 198. Configurable stop bits647
Figure 199. TC/TXE behavior when transmitting649
Figure 200. Mute mode using Idle line detection655
Figure 201. Mute mode using address mark detection656
Figure 202. Transmission using DMA658
Figure 203.Reception using DMA659
Figure 204.Hardware flow control between 2 LPUARTs660
Figure 205.RS232 RTS flow control660
Figure 206.RS232 CTS flow control661
Figure 207.SPI block diagram687
Figure 208.Full-duplex single master/ single slave application688
Figure 209.Half-duplex single master/ single slave application689
Figure 210.Simplex single master/single slave application (master in transmit-only/
slave in receive-only mode)
690
Figure 211.Master and three independent slaves691
Figure 212.Hardware/software slave select management692
Figure 213.Data clock timing diagram694
Figure 214.Data alignment when data length is not equal to 8-bit or 16-bit695
Figure 215.Packing data in FIFO for transmission and reception699
Figure 216.Master full duplex communication702
Figure 217.Slave full duplex communication703
Figure 218.Master full duplex communication with CRC704
Figure 219.Master full duplex communication in packed mode705
Figure 220.NSSP pulse generation in Motorola SPI master mode708
Figure 221.TI mode transfer709
Figure 222.I2S block diagram712
Figure 223.I2S Philips protocol waveforms (16/32-bit full accuracy, CPOL = 0)714
Figure 224.I2S Philips standard waveforms (24-bit frame with CPOL = 0)714
Figure 225.Transmitting 0x8EAA33714
Figure 226.Receiving 0x8EAA33715
Figure 227.I2S Philips standard (16-bit extended to 32-bit packet frame
with CPOL = 0)
715
Figure 228.Example of 16-bit data frame extended to 32-bit channel frame715
Figure 229.MSB Justified 16-bit or 32-bit full-accuracy length with CPOL = 0716
Figure 230.MSB justified 24-bit frame length with CPOL = 0716
Figure 231.MSB justified 16-bit extended to 32-bit packet frame with CPOL = 0716
Figure 232.LSB justified 16-bit or 32-bit full-accuracy with CPOL = 0717
Figure 233.LSB justified 24-bit frame length with CPOL = 0717
Figure 234.Operations required to transmit 0x3478AE717
Figure 235.Operations required to receive 0x3478AE717
Figure 236.LSB justified 16-bit extended to 32-bit packet frame with CPOL = 0718
Figure 237.Example of 16-bit data frame extended to 32-bit channel frame718
Figure 238.PCM standard waveforms (16-bit)719
Figure 239.PCM standard waveforms (16-bit extended to 32-bit packet frame)719
Figure 240.Audio sampling frequency definition720
Figure 241.I2S clock generator architecture720
Figure 242.MR_SubG IP block diagram742
Figure 243.Basic packet format751
Figure 244.802.15.4 packet format752
Figure 245.Data whitening scheme for Basic packets754
Figure 246.Data whitening scheme for 802.15.4 packets755
Figure 247.FEC scheme for Basic packet format756
Figure 248.FEC schemes for 802.15.4 packets757
Figure 249.Interleave scheme758
Figure 250.Transmission path for 2-(G)FSK modulation760
Figure 251.Transmission path for 4-(G)FSK modulation760
Figure 252.Transmission path for ASK/OOK modulation765
Figure 253. DBPSK modulation emulation through Polar TX mode .....767
Figure 254. Transmission path for Polar TX modulation .....767
Figure 255. Simplified RX data path .....777
Figure 256. TX and TX HP pin connections, TX PA drive mode, VBATT > 1.7 V .....782
Figure 257. TX and TX HP pin connections, TX + TX HP PA drive mode, VBATT > 2.4 V .....783
Figure 258. TX and TX HP pin connections, TX HP PA drive mode, VBATT = 3.3 V .....783
Figure 259. W-MBUS frame format .....787
Figure 260. AGC block diagram .....898
Figure 261. AGC attenuation example .....899
Figure 262. AGC high attenuation mode versus normal mode .....899
Figure 263. RRM overview .....913
Figure 264. Overview of a possible UDRA command list in RAM .....916
Figure 265. Radio FSM overview .....919
Figure 266. Data Buffer Manager overview .....937
Figure 267. Sequencer actions list example .....942
Figure 268. SeqAction flow at Sequencer level .....945
Figure 269. NextActionxMask mechanism overview (with x = 1 or 2) .....946
Figure 270. Time Management Unit overview .....964
Figure 271. Wakeup block overview .....968
Figure 272. Sequencer wakeup event generation .....969
Figure 273. CPU wakeup event generation .....970
Figure 274. RX with Auto-Ack use-case through Sequencer example .....972
Figure 275. Sniff mode use-case through Sequencer example .....974
Figure 276. LBT use-case through Sequencer example .....977

Chapters