RM0038-STM32L100-151-152-162

Introduction

This document is addressed to application developers. It provides complete information on how to use the STM32L151xx, STM32L152xx and STM32L162xx and STM32L100xx microcontroller memory and peripherals. These devices are referred to as STM32L1xxxx throughout the document, unless otherwise specified.

The STM32L1xxxx is a family of microcontrollers with different memory sizes, packages and peripherals.

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

For information on programming, erasing and protection of the internal non volatile memory, refer to Section 3: Flash program memory and data EEPROM (FLASH) .

For information on the Arm ® Cortex ® -M3 core, refer to the Cortex ® -M3 Technical Reference Manual .

Available from www.st.com :

Contents

3.7.1Readout protection (RDP) of the program and data EEPROMs . . . . .80
3.7.2Write protection (WRP) of the program memory . . . . .82
3.7.3Write protection error flag . . . . .82
3.7.4PCROP . . . . .82
3.8Interrupts . . . . .83
3.9Register description . . . . .83
3.9.1Access control register (FLASH_ACR) . . . . .83
3.9.2Program/erase control register (FLASH_PECR) . . . . .84
3.9.3Power down key register (FLASH_PDKEYR) . . . . .87
3.9.4Program/erase key register (FLASH_PEKEYR) . . . . .87
3.9.5Program memory key register (FLASH_PRGKEYR) . . . . .87
3.9.6Option byte key register (FLASH_OPTKEYR) . . . . .88
3.9.7Status register (FLASH_SR) . . . . .88
3.9.8Option byte register (FLASH_OBR) . . . . .90
3.9.9Write protection register (FLASH_WRP \( \text{Rx} \) ) . . . . .91
3.9.10Register map . . . . .91
4CRC calculation unit . . . . .94
4.1CRC introduction . . . . .94
4.2CRC main features . . . . .94
4.3CRC functional description . . . . .95
4.4CRC registers . . . . .95
4.4.1Data register (CRC_DR) . . . . .95
4.4.2Independent data register (CRC_IDR) . . . . .95
4.4.3Control register (CRC_CR) . . . . .96
4.4.4CRC register map . . . . .96
5Power control (PWR) . . . . .97
5.1Power supplies . . . . .97
5.1.1Independent A/D and DAC converter supply and reference voltage . . . . .98
5.1.2Independent LCD supply . . . . .99
5.1.3RTC and RTC backup registers . . . . .99
5.1.4Voltage regulator . . . . .100
5.1.5Dynamic voltage scaling management . . . . .100
5.1.6Dynamic voltage scaling configuration . . . . .102
5.1.7Voltage regulator and clock management when VDD drops below 2.0 V . . . . .103
5.1.8Voltage regulator and clock management when modifying the VCORE range . . . . .103
5.2Power supply supervisor . . . . .103
5.2.1Power on reset (POR)/power down reset (PDR) . . . . .105
5.2.2Brown out reset . . . . .106
5.2.3Programmable voltage detector (PVD) . . . . .107
5.2.4Internal voltage reference (VREFINT) . . . . .108
5.3Low-power modes . . . . .108
5.3.1Behavior of clocks in low-power modes . . . . .109
5.3.2Slowing down system clocks . . . . .110
5.3.3Peripheral clock gating . . . . .110
5.3.4Low-power run mode (LP run) . . . . .111
5.3.5Sleep mode . . . . .111
5.3.6Low-power sleep mode (LP sleep) . . . . .113
5.3.7Stop mode . . . . .114
5.3.8Standby mode . . . . .116
5.3.9Waking up the device from Stop and Standby modes using the RTC and comparators . . . . .117
5.4Power control registers . . . . .120
5.4.1PWR power control register (PWR_CR) . . . . .120
5.4.2PWR power control/status register (PWR_CSR) . . . . .123
5.4.3PWR register map . . . . .124
6Reset and clock control (RCC) . . . . .126
6.1Reset . . . . .126
6.1.1System reset . . . . .126
6.1.2Power reset . . . . .127
6.1.3RTC and backup registers reset . . . . .127
6.2Clocks . . . . .128
6.2.1HSE clock . . . . .130
6.2.2HSI clock . . . . .131
6.2.3MSI clock . . . . .132
6.2.4PLL . . . . .132
6.2.5LSE clock . . . . .133
6.2.6LSI clock . . . . .133
6.2.7System clock (SYSCLK) selection . . . . .134
6.2.8System clock source frequency versus voltage range . . . . .134
6.2.9Clock security system (CSS) . . . . .134
6.2.10Clock Security System on LSE . . . . .135
6.2.11RTC and LCD clock . . . . .135
6.2.12Watchdog clock . . . . .136
6.2.13Clock-out capability . . . . .136
6.2.14Internal/external clock measurement with TIM9/TIM10/TIM11 . . . . .136
6.2.15Clock-independent system clock sources for TIM9/TIM10/TIM11 . . . . .138
6.3RCC registers . . . . .139
6.3.1Clock control register (RCC_CR) . . . . .139
6.3.2Internal clock sources calibration register (RCC_ICSCR) . . . . .141
6.3.3Clock configuration register (RCC_CFGR) . . . . .141
6.3.4Clock interrupt register (RCC_CIR) . . . . .144
6.3.5AHB peripheral reset register (RCC_AHBRSTR) . . . . .147
6.3.6APB2 peripheral reset register (RCC_APB2RSTR) . . . . .149
6.3.7APB1 peripheral reset register (RCC_APB1RSTR) . . . . .150
6.3.8AHB peripheral clock enable register (RCC_AHBENR) . . . . .153
6.3.9APB2 peripheral clock enable register (RCC_APB2ENR) . . . . .155
6.3.10APB1 peripheral clock enable register (RCC_APB1ENR) . . . . .157
6.3.11AHB peripheral clock enable in low-power mode register
(RCC_AHBLPENR) . . . . .
159
6.3.12APB2 peripheral clock enable in low-power mode register
(RCC_APB2LPENR) . . . . .
161
6.3.13APB1 peripheral clock enable in low-power mode register
(RCC_APB1LPENR) . . . . .
163
6.3.14Control/status register (RCC_CSR) . . . . .165
6.3.15RCC register map . . . . .168
7General-purpose I/Os (GPIO) . . . . .171
7.1GPIO introduction . . . . .171
7.2GPIO main features . . . . .171
7.3GPIO functional description . . . . .171
7.3.1General-purpose I/O (GPIO) . . . . .174
7.3.2I/O pin multiplexer and mapping . . . . .174
7.3.3I/O port control registers . . . . .177
7.3.4I/O port data registers . . . . .177
7.3.5I/O data bitwise handling . . . . .177
7.3.6GPIO locking mechanism . . . . .177
7.3.7I/O alternate function input/output . . . . .178
7.3.8External interrupt/wakeup lines . . . . .178
7.3.9Input configuration . . . . .178
7.3.10Output configuration . . . . .179
7.3.11Alternate function configuration . . . . .180
7.3.12Analog configuration . . . . .181
7.3.13Using the OSC32_IN/OSC32_OUT pins as GPIO PC14/PC15 port pins . . . . .181
7.3.14Using the OSC_IN/OSC_OUT pins as GPIO PH0/PH1 port pins . . . . .181
7.3.15Selection of RTC_AF1 alternate functions . . . . .182
7.4GPIO registers . . . . .183
7.4.1GPIO port mode register (GPIOx_MODER) (x = A..H) . . . . .183
7.4.2GPIO port output type register (GPIOx_OTYPER) (x = A..H) . . . . .183
7.4.3GPIO port output speed register (GPIOx_OSPEEDR) (x = A..H) . . . . .184
7.4.4GPIO port pull-up/pull-down register (GPIOx_PUPDR) (x = A..H) . . . . .184
7.4.5GPIO port input data register (GPIOx_IDR) (x = A..H) . . . . .185
7.4.6GPIO port output data register (GPIOx_ODR) (x = A..H) . . . . .185
7.4.7GPIO port bit set/reset register (GPIOx_BRR) (x = A..H) . . . . .185
7.4.8GPIO port configuration lock register (GPIOx_LCKR) (x = A..H) . . . . .186
7.4.9GPIO alternate function low register (GPIOx_AFRL) (x = A..H) . . . . .187
7.4.10GPIO alternate function high register (GPIOx_AFRH) (x = A..H) . . . . .188
7.4.11GPIO bit reset register (GPIOx_BRR) (x = A..H) . . . . .188
7.4.12GPIO register map . . . . .189
8System configuration controller (SYSCFG) and routing interface (RI) . . . . .191
8.1SYSCFG and RI introduction . . . . .191
8.2RI main features . . . . .191
8.3RI functional description . . . . .195
8.3.1Special I/O configuration . . . . .195
8.3.2Input capture routing . . . . .199
8.3.3Reference voltage routing . . . . .200
8.4RI registers . . . . .201
8.4.1RI input capture register (RI_ICR) . . . . .201
8.4.2RI analog switches control register (RI_ASCR1) . . . . .203
8.4.3RI analog switch control register 2 (RI_ASCR2) . . . . .205
8.4.4RI hysteresis control register (RI_HYSCR1) . . . . .206
8.4.5RI Hysteresis control register (RI_HYSCR2) . . . . .206
8.4.6RI Hysteresis control register (RI_HYSCR3) . . . . .207
8.4.7RI Hysteresis control register (RI_HYSCR4) . . . . .208
8.4.8Analog switch mode register (RI_ASMR1) . . . . .208
8.4.9Channel mask register (RI_CMR1) . . . . .209
8.4.10Channel identification for capture register (RI_CICR1) . . . . .209
8.4.11Analog switch mode register (RI_ASMR2) . . . . .210
8.4.12Channel mask register (RI_CMR2) . . . . .210
8.4.13Channel identification for capture register (RI_CICR2) . . . . .211
8.4.14Analog switch mode register (RI_ASMR3) . . . . .211
8.4.15Channel mask register (RI_CMR3) . . . . .212
8.4.16Channel identification for capture register (RI_CICR3) . . . . .212
8.4.17Analog switch mode register (RI_ASMR4) . . . . .213
8.4.18Channel mask register (RI_CMR4) . . . . .213
8.4.19Channel identification for capture register (RI_CICR4) . . . . .214
8.4.20Analog switch mode register (RI_ASMR5) . . . . .214
8.4.21Channel mask register (RI_CMR5) . . . . .215
8.4.22Channel identification for capture register (RI_CICR5) . . . . .215
8.4.23RI register map . . . . .216
8.5SYSCFG registers . . . . .218
8.5.1SYSCFG memory remap register (SYSCFG_MEMRMP) . . . . .218
8.5.2SYSCFG peripheral mode configuration register (SYSCFG_PMC) . . . . .219
8.5.3SYSCFG external interrupt configuration register 1
(SYSCFG_EXTICR1) . . . . .
219
8.5.4SYSCFG external interrupt configuration register 2
(SYSCFG_EXTICR2) . . . . .
221
8.5.5SYSCFG external interrupt configuration register 3
(SYSCFG_EXTICR3) . . . . .
221
8.5.6SYSCFG external interrupt configuration register 4
(SYSCFG_EXTICR4) . . . . .
222
8.5.7SYSCFG register map . . . . .222
9Touch sensing I/Os . . . . .224
9.1Introduction . . . . .224
9.2Main features . . . . .224
11.4.1DMA interrupt status register (DMA_ISR) . . . . .257
11.4.2DMA interrupt flag clear register (DMA_IFCR) . . . . .258
11.4.3DMA channel x configuration register (DMA_CCRx) (x = 1..7, where x = channel number) . . . . .259
11.4.4DMA channel x number of data register (DMA_CNDTRx) (x = 1..7, where x = channel number) . . . . .260
11.4.5DMA channel x peripheral address register (DMA_CPARx) (x = 1..7, where x = channel number) . . . . .261
11.4.6DMA channel x memory address register (DMA_CMARx) (x = 1..7, where x = channel number) . . . . .261
11.4.7DMA register map . . . . .262
12Analog-to-digital converter (ADC) . . . . .265
12.1ADC introduction . . . . .265
12.2ADC main features . . . . .265
12.3ADC functional description . . . . .266
12.3.1ADC power on-off control . . . . .269
12.3.2ADC clock . . . . .269
12.3.3Channel selection . . . . .270
12.3.4Single conversion mode . . . . .271
12.3.5Continuous conversion mode . . . . .271
12.3.6Timing diagram . . . . .271
12.3.7Analog watchdog . . . . .272
12.3.8Scan mode . . . . .273
12.3.9Injected channel management . . . . .273
12.3.10Discontinuous mode . . . . .274
12.4Data alignment . . . . .275
12.5Channel-wise programmable sampling time . . . . .276
12.6Conversion on external trigger . . . . .277
12.7Aborting a conversion . . . . .278
12.7.1Injected channels . . . . .278
12.7.2Regular channels . . . . .279
12.8Conversion resolution . . . . .279
12.9Hardware freeze and delay insertion modes for slow conversions . . . . .279
12.9.1Inserting a delay after each regular conversion . . . . .280
12.9.2Inserting a delay after each sequence of auto-injected conversions . . . . .281
12.10Power saving . . . . .282
12.11Data management and overrun detection . . . . .284
12.11.1Using the DMA . . . . .284
12.11.2Managing a sequence of conversions without using the DMA . . . . .284
12.11.3Conversions without reading all the data . . . . .285
12.11.4Overrun detection . . . . .285
12.12Temperature sensor and internal reference voltage . . . . .285
12.13Internal reference voltage ( \( V_{REFINT} \) ) conversion . . . . .288
12.14ADC interrupts . . . . .288
12.15ADC registers . . . . .289
12.15.1ADC status register (ADC_SR) . . . . .289
12.15.2ADC control register 1 (ADC_CR1) . . . . .291
12.15.3ADC control register 2 (ADC_CR2) . . . . .293
12.15.4ADC sample time register 1 (ADC_SMPR1) . . . . .297
12.15.5ADC sample time register 2 (ADC_SMPR2) . . . . .297
12.15.6ADC sample time register 3 (ADC_SMPR3) . . . . .298
12.15.7ADC injected channel data offset register x (ADC_JOFRx)(x=1..4) . . . . .299
12.15.8ADC watchdog higher threshold register (ADC_HTR) . . . . .299
12.15.9ADC watchdog lower threshold register (ADC_LTR) . . . . .299
12.15.10ADC regular sequence register 1 (ADC_SQR1) . . . . .301
12.15.11ADC regular sequence register 2 (ADC_SQR2) . . . . .301
12.15.12ADC regular sequence register 3 (ADC_SQR3) . . . . .302
12.15.13ADC regular sequence register 4 (ADC_SQR4) . . . . .303
12.15.14ADC regular sequence register 5 (ADC_SQR5) . . . . .303
12.15.15ADC injected sequence register (ADC_JSQR) . . . . .304
12.15.16ADC injected data register x (ADC_JDRx) (x= 1..4) . . . . .304
12.15.17ADC regular data register (ADC_DR) . . . . .305
12.15.18ADC sample time register 0 (ADC_SMPR0) . . . . .305
12.15.19ADC common status register (ADC_CSR) . . . . .306
12.15.20ADC common control register (ADC_CCR) . . . . .306
12.15.21ADC register map . . . . .308
13Digital-to-analog converter (DAC) . . . . .311
13.1DAC introduction . . . . .311
13.2DAC main features . . . . .311
13.3DAC functional description . . . . .313
13.3.1DAC channel enable . . . . .313
13.3.2DAC output buffer enable . . . . .313
13.3.3DAC data format . . . . .313
13.3.4DAC conversion . . . . .314
13.3.5DAC output voltage . . . . .315
13.3.6DAC trigger selection . . . . .315
13.3.7DMA request . . . . .316
13.3.8Noise generation . . . . .316
13.3.9Triangle-wave generation . . . . .317
13.4Dual DAC channel conversion . . . . .318
13.4.1Independent trigger without wave generation . . . . .319
13.4.2Independent trigger with single LFSR generation . . . . .319
13.4.3Independent trigger with different LFSR generation . . . . .319
13.4.4Independent trigger with single triangle generation . . . . .320
13.4.5Independent trigger with different triangle generation . . . . .320
13.4.6Simultaneous software start . . . . .320
13.4.7Simultaneous trigger without wave generation . . . . .321
13.4.8Simultaneous trigger with single LFSR generation . . . . .321
13.4.9Simultaneous trigger with different LFSR generation . . . . .321
13.4.10Simultaneous trigger with single triangle generation . . . . .322
13.4.11Simultaneous trigger with different triangle generation . . . . .322
13.5DAC registers . . . . .323
13.5.1DAC control register (DAC_CR) . . . . .323
13.5.2DAC software trigger register (DAC_SWTRIGR) . . . . .326
13.5.3DAC channel1 12-bit right-aligned data holding register
(DAC_DHR12R1) . . . . .
326
13.5.4DAC channel1 12-bit left aligned data holding register
(DAC_DHR12L1) . . . . .
327
13.5.5DAC channel1 8-bit right aligned data holding register
(DAC_DHR8R1) . . . . .
327
13.5.6DAC channel2 12-bit right aligned data holding register
(DAC_DHR12R2) . . . . .
328
13.5.7DAC channel2 12-bit left aligned data holding register
(DAC_DHR12L2) . . . . .
328
13.5.8DAC channel2 8-bit right-aligned data holding register
(DAC_DHR8R2) . . . . .
328
13.5.9Dual DAC 12-bit right-aligned data holding register
(DAC_DHR12RD) . . . . .
329
13.5.10DUAL DAC 12-bit left aligned data holding register
(DAC_DHR12LD) . . . . .
329
13.5.11DUAL DAC 8-bit right aligned data holding register (DAC_DHR8RD) .....330
13.5.12DAC channel1 data output register (DAC_DOR1) .....330
13.5.13DAC channel2 data output register (DAC_DOR2) .....330
13.5.14DAC status register (DAC_SR) .....331
13.5.15DAC register map .....331
14Comparators (COMP) .....333
14.1Introduction .....333
14.2Main features .....333
14.3COMP clock .....333
14.4Comparator 1 (COMP1) .....334
14.5Comparator 2 (COMP2) .....337
14.6Comparators in Window mode .....339
14.7Low-power modes .....339
14.8Interrupts .....340
14.9COMP registers .....340
14.9.1COMP comparator control and status register (COMP_CSR) .....340
14.9.2COMP register map .....343
15Operational amplifiers (OPAMP) .....344
15.1OPAMP introduction .....344
15.2OPAMP main features .....344
15.3OPAMP functional description .....344
15.3.1Signal routing .....345
15.3.2Using the OPAMP outputs as ADC inputs .....346
15.3.3Calibration .....346
15.4OPAMP registers .....348
15.4.1OPAMP control/status register (OPAMP_CSR) .....348
15.4.2OPAMP offset trimming register for normal mode (OPAMP_OTR) .....351
15.4.3OPAMP offset trimming register for low-power mode (OPAMP_LPOTR) .....352
15.4.4OPAMP register map .....353
16Liquid crystal display controller (LCD) .....354
16.1Introduction .....354
16.2LCD main features . . . . .355
16.3Glossary . . . . .356
16.4LCD functional description . . . . .357
16.4.1General description . . . . .357
16.4.2Frequency generator . . . . .358
16.4.3Common driver . . . . .359
16.4.4Segment driver . . . . .362
16.4.5Voltage generator . . . . .366
16.4.6Deadtime . . . . .368
16.4.7Double buffer memory . . . . .368
16.4.8COM and SEG multiplexing . . . . .369
16.4.9Flowchart . . . . .373
16.5LCD registers . . . . .374
16.5.1LCD control register (LCD_CR) . . . . .374
16.5.2LCD frame control register (LCD_FCR) . . . . .375
16.5.3LCD status register (LCD_SR) . . . . .377
16.5.4LCD clear register (LCD_CLR) . . . . .378
16.5.5LCD display memory (LCD_RAM) . . . . .379
16.5.6LCD register map . . . . .379
17General-purpose timers (TIM2 to TIM5) . . . . .382
17.1TIM2 to TIM5 introduction . . . . .382
17.2TIM2 to TIM5 main features . . . . .382
17.3TIM2 to TIM5 functional description . . . . .384
17.3.1Time-base unit . . . . .384
17.3.2Counter modes . . . . .385
17.3.3Clock selection . . . . .395
17.3.4Capture/compare channels . . . . .398
17.3.5Input capture mode . . . . .400
17.3.6PWM input mode . . . . .401
17.3.7Forced output mode . . . . .402
17.3.8Output compare mode . . . . .402
17.3.9PWM mode . . . . .403
17.3.10One-pulse mode . . . . .406
17.3.11Clearing the OCxREF signal on an external event . . . . .407
17.3.12Encoder interface mode . . . . .408
17.3.13Timer input XOR function . . . . .411
17.3.14Timers and external trigger synchronization . . . . .411
17.3.15Timer synchronization . . . . .414
17.3.16Debug mode . . . . .418
17.4TIMx registers . . . . .419
17.4.1TIMx control register 1 (TIMx_CR1) . . . . .419
17.4.2TIMx control register 2 (TIMx_CR2) . . . . .421
17.4.3TIMx slave mode control register (TIMx_SMCR) . . . . .422
17.4.4TIMx DMA/Interrupt enable register (TIMx_DIER) . . . . .424
17.4.5TIMx status register (TIMx_SR) . . . . .425
17.4.6TIMx event generation register (TIMx_EGR) . . . . .427
17.4.7TIMx capture/compare mode register 1 (TIMx_CCMR1) . . . . .428
17.4.8TIMx capture/compare mode register 2 (TIMx_CCMR2) . . . . .431
17.4.9TIMx capture/compare enable register (TIMx_CCER) . . . . .432
17.4.10TIMx counter (TIMx_CNT) . . . . .434
17.4.11TIMx prescaler (TIMx_PSC) . . . . .434
17.4.12TIMx auto-reload register (TIMx_ARR) . . . . .434
17.4.13TIMx capture/compare register 1 (TIMx_CCR1) . . . . .435
17.4.14TIMx capture/compare register 2 (TIMx_CCR2) . . . . .435
17.4.15TIMx capture/compare register 3 (TIMx_CCR3) . . . . .435
17.4.16TIMx capture/compare register 4 (TIMx_CCR4) . . . . .436
17.4.17TIMx DMA control register (TIMx_DCR) . . . . .436
17.4.18TIMx DMA address for full transfer (TIMx_DMAR) . . . . .437
17.4.19TIM2 option register (TIM2_OR) . . . . .438
17.4.20TIM3 option register (TIM3_OR) . . . . .438
17.4.21TIMx register map . . . . .440
18General-purpose timers (TIM9/10/11) . . . . .442
18.1TIM9/10/11 introduction . . . . .442
18.2TIM9/10/11 main features . . . . .442
18.2.1TIM9 main features . . . . .442
18.2.2TIM10/TIM11 main features . . . . .443
18.3TIM9/10/11 functional description . . . . .446
18.3.1Time-base unit . . . . .446
18.3.2Counter modes . . . . .448
18.3.3Clock selection . . . . .451
18.3.4Capture/compare channels . . . . .453
18.3.5Input capture mode . . . . .454
18.3.6PWM input mode (only for TIM9) . . . . .456
18.3.7Forced output mode . . . . .457
18.3.8Output compare mode . . . . .457
18.3.9PWM mode . . . . .458
18.3.10One-pulse mode . . . . .459
18.3.11TIM9 external trigger synchronization . . . . .461
18.3.12Timer synchronization (TIM9) . . . . .464
18.3.13Debug mode . . . . .464
18.3.14Encoder interface mode (only for TIM9) . . . . .464
18.4TIM9 registers . . . . .465
18.4.1TIM9 control register 1 (TIMx_CR1) . . . . .465
18.4.2TIM9 control register 2 (TIMx_CR2) . . . . .467
18.4.3TIM9 slave mode control register (TIMx_SMCR) . . . . .468
18.4.4TIM9 Interrupt enable register (TIMx_DIER) . . . . .470
18.4.5TIM9 status register (TIMx_SR) . . . . .472
18.4.6TIM event generation register (TIMx_EGR) . . . . .473
18.4.7TIM capture/compare mode register 1 (TIMx_CCMR1) . . . . .474
18.4.8TIM9 capture/compare enable register (TIMx_CCER) . . . . .477
18.4.9TIM9 counter (TIMx_CNT) . . . . .478
18.4.10TIM9 prescaler (TIMx_PSC) . . . . .478
18.4.11TIM9 auto-reload register (TIMx_ARR) . . . . .478
18.4.12TIM9 capture/compare register 1 (TIMx_CCR1) . . . . .479
18.4.13TIM9 capture/compare register 2 (TIMx_CCR2) . . . . .479
18.4.14TIM9 option register 1 (TIM9_OR) . . . . .480
18.4.15TIM9 register map . . . . .480
18.5TIM10/11 registers . . . . .482
18.5.1TIM10/11 control register 1 (TIMx_CR1) . . . . .482
18.5.2TIM10/11 slave mode control register 1 (TIMx_SMCR) . . . . .483
18.5.3TIM10/11 Interrupt enable register (TIMx_DIER) . . . . .485
18.5.4TIM10/11 status register (TIMx_SR) . . . . .485
18.5.5TIM10/11 event generation register (TIMx_EGR) . . . . .486
18.5.6TIM10/11 capture/compare mode register 1 (TIMx_CCMR1) . . . . .486
18.5.7TIM10/11 capture/compare enable register (TIMx_CCER) . . . . .489
18.5.8TIM10/11 counter (TIMx_CNT) . . . . .490
18.5.9TIM10/11 prescaler (TIMx_PSC) . . . . .490
18.5.10TIM10/11 auto-reload register (TIMx_ARR) . . . . .490
18.5.11TIM10/11 capture/compare register 1 (TIMx_CCR1) . . . . .491
18.5.12TIM10 option register 1 (TIM10_OR) . . . . .491
18.5.13TIM11 option register 1 (TIM11_OR) . . . . .492
18.5.14TIM10/11 register map . . . . .493
19Basic timers (TIM6 and TIM7) . . . . .495
19.1TIM6 and TIM7 introduction . . . . .495
19.2TIM6 and TIM7 main features . . . . .495
19.3TIM6 and TIM7 functional description . . . . .496
19.3.1Time-base unit . . . . .496
19.3.2Counting mode . . . . .498
19.3.3Clock source . . . . .500
19.3.4Debug mode . . . . .501
19.4TIM6 and TIM7 registers . . . . .501
19.4.1TIM6 and TIM7 control register 1 (TIMx_CR1) . . . . .501
19.4.2TIM6 and TIM7 control register 2 (TIMx_CR2) . . . . .503
19.4.3TIM6 and TIM7 DMA/Interrupt enable register (TIMx_DIER) . . . . .503
19.4.4TIM6 and TIM7 status register (TIMx_SR) . . . . .504
19.4.5TIM6 and TIM7 event generation register (TIMx_EGR) . . . . .504
19.4.6TIM6 and TIM7 counter (TIMx_CNT) . . . . .504
19.4.7TIM6 and TIM7 prescaler (TIMx_PSC) . . . . .505
19.4.8TIM6 and TIM7 auto-reload register (TIMx_ARR) . . . . .505
19.4.9TIM6 and TIM7 register map . . . . .506
20Real-time clock (RTC) . . . . .507
20.1Introduction . . . . .507
20.2RTC main features . . . . .508
20.3RTC functional description . . . . .510
20.3.1Clock and prescalers . . . . .510
20.3.2Real-time clock and calendar . . . . .511
20.3.3Programmable alarms . . . . .511
20.3.4Periodic auto-wakeup . . . . .512
20.3.5RTC initialization and configuration . . . . .513
20.3.6Reading the calendar . . . . .514
20.3.7Resetting the RTC . . . . .515
20.3.8RTC synchronization (Cat.2, Cat.3, Cat.4, Cat.5 and Cat.6 devices only) . . . . .516
20.3.9RTC reference clock detection . . . . .516
20.3.10RTC coarse digital calibration . . . . .517
20.3.11RTC smooth digital calibration (Cat.2, Cat.3, Cat.4, Cat.5 and Cat.6 devices only) . . . . .518
20.3.12Timestamp function . . . . .520
20.3.13Tamper detection . . . . .521
20.3.14Calibration clock output . . . . .523
20.3.15Alarm output . . . . .523
20.4RTC and low-power modes . . . . .524
20.5RTC interrupts . . . . .524
20.6RTC registers . . . . .526
20.6.1RTC time register (RTC_TR) . . . . .526
20.6.2RTC date register (RTC_DR) . . . . .527
20.6.3RTC control register (RTC_CR) . . . . .528
20.6.4RTC initialization and status register (RTC_ISR) . . . . .530
20.6.5RTC prescaler register (RTC_PRER) . . . . .533
20.6.6RTC wakeup timer register (RTC_WUTR) . . . . .533
20.6.7RTC calibration register (RTC_CALIBR) . . . . .534
20.6.8RTC alarm A register (RTC_ALRMAR) . . . . .535
20.6.9RTC alarm B register (RTC_ALRMBR) . . . . .536
20.6.10RTC write protection register (RTC_WPR) . . . . .537
20.6.11RTC sub second register (RTC_SSR) . . . . .537
20.6.12RTC shift control register (RTC_SHIFT) . . . . .538
20.6.13RTC time stamp time register (RTC_TSTR) . . . . .539
20.6.14RTC time stamp date register (RTC_TSDR) . . . . .539
20.6.15RTC timestamp sub second register (RTC_TSSSR) . . . . .540
20.6.16RTC calibration register (RTC_CALR) . . . . .540
20.6.17RTC tamper and alternate function configuration register (RTC_TAFCR) . . . . .542
20.6.18RTC alarm A sub second register (RTC_ALRMASSR) . . . . .544
20.6.19RTC alarm B sub second register (RTC_ALRMBSSR) . . . . .545
20.6.20RTC backup registers (RTC_BKPxR) . . . . .546
20.6.21RTC register map . . . . .546
21Independent watchdog (IWDG) . . . . .549
21.1IWDG introduction . . . . .549
21.2IWDG main features . . . . .549
21.3IWDG functional description . . . . .549
21.3.1Hardware watchdog . . . . .549
21.3.2Register access protection . . . . .549
21.3.3Debug mode . . . . .550
21.4IWDG registers . . . . .551
21.4.1Key register (IWDG_KR) . . . . .551
21.4.2Prescaler register (IWDG_PR) . . . . .551
21.4.3Reload register (IWDG_RLR) . . . . .552
21.4.4Status register (IWDG_SR) . . . . .552
21.4.5IWDG register map . . . . .553
22Window watchdog (WWDG) . . . . .554
22.1WWDG introduction . . . . .554
22.2WWDG main features . . . . .554
22.3WWDG functional description . . . . .554
22.4How to program the watchdog timeout . . . . .556
22.5Debug mode . . . . .557
22.6WWDG registers . . . . .558
22.6.1Control register (WWDG_CR) . . . . .558
22.6.2Configuration register (WWDG_CFR) . . . . .559
22.6.3Status register (WWDG_SR) . . . . .559
22.6.4WWDG register map . . . . .560
23Advanced encryption standard hardware accelerator (AES) . . . . .561
23.1Introduction . . . . .561
23.2AES main features . . . . .561
23.3AES functional description . . . . .562
23.4Encryption and derivation keys . . . . .563
23.5AES chaining algorithms . . . . .564
23.5.1Electronic CodeBook (ECB) . . . . .564
23.5.2Cipher block chaining (CBC) . . . . .565
23.5.3Counter Mode (CTR) . . . . .569
23.6Data type . . . . .570
23.7Operating modes . . . . .573
23.7.1Mode 1: encryption . . . . .573
23.7.2Mode 2: key derivation . . . . .574
23.7.3Mode 3: decryption .....574
23.7.4Mode 4: key derivation and decryption .....575
23.8AES DMA interface .....575
23.9Error flags .....577
23.10Processing time .....577
23.11AES interrupts .....577
23.12AES registers .....578
23.12.1AES control register (AES_CR) .....578
23.12.2AES status register (AES_SR) .....580
23.12.3AES data input register (AES_DINR) .....581
23.12.4AES data output register (AES_DOUTR) .....581
23.12.5AES key register 0(AES_KEYR0) (LSB: key [31:0]) .....582
23.12.6AES key register 1 (AES_KEYR1) (Key[63:32]) .....582
23.12.7AES key register 2 (AES_KEYR2) (Key [95:64]) .....583
23.12.8AES key register 3 (AES_KEYR3) (MSB: key[127:96]) .....583
23.12.9AES initialization vector register 0 (AES_IVR0) (LSB: IVR[31:0]) .....583
23.12.10AES initialization vector register 1 (AES_IVR1) (IVR[63:32]) .....584
23.12.11AES initialization vector register 2 (AES_IVR2) (IVR[95:64]) .....585
23.12.12AES initialization vector register 3 (AES_IVR3) (MSB: IVR[127:96]) .....585
23.12.13AES register map .....585
24Universal serial bus full-speed device interface (USB) .....587
24.1USB introduction .....587
24.2USB main features .....587
24.3USB functional description .....587
24.3.1Description of USB blocks .....589
24.4Programming considerations .....590
24.4.1Generic USB device programming .....590
24.4.2System and power-on reset .....591
24.4.3Double-buffered endpoints .....596
24.4.4Isochronous transfers .....599
24.4.5Suspend/Resume events .....600
24.5USB registers .....602
24.5.1Common registers .....602
24.5.2Endpoint-specific registers .....609
24.5.3Buffer descriptor table .....613

24.5.4 USB register map ..... 616

25 Flexible static memory controller (FSMC) ..... 618

25.1 FSMC main features ..... 618

25.2 Block diagram ..... 619

25.3 AHB interface ..... 619

25.3.1 Supported memories and transactions ..... 620

25.4 External device address mapping ..... 620

25.4.1 NOR/PSRAM address mapping ..... 621

25.5 NOR flash/PSRAM controller ..... 622

25.5.1 External memory interface signals ..... 623

25.5.2 Supported memories and transactions ..... 624

25.5.3 General timing rules ..... 626

25.5.4 NOR flash/PSRAM controller asynchronous transactions ..... 626

25.5.5 Synchronous transactions ..... 644

25.5.6 NOR/PSRAM control registers ..... 650

25.5.7 FSMC register map ..... 658

26 Inter-integrated circuit (I2C) interface ..... 660

26.1 I 2 C introduction ..... 660

26.2 I 2 C main features ..... 660

26.3 I 2 C functional description ..... 661

26.3.1 Mode selection ..... 661

26.3.2 I2C slave mode ..... 663

26.3.3 I2C master mode ..... 666

26.3.4 Error conditions ..... 671

26.3.5 SDA/SCL line control ..... 672

26.3.6 SMBus ..... 673

26.3.7 DMA requests ..... 675

26.3.8 Packet error checking ..... 677

26.4 I 2 C interrupts ..... 677

26.5 I 2 C debug mode ..... 679

26.6 I 2 C registers ..... 679

26.6.1 I 2 C Control register 1 (I2C_CR1) ..... 679

26.6.2 I 2 C Control register 2 (I2C_CR2) ..... 681

26.6.3 I 2 C Own address register 1 (I2C_OAR1) ..... 683

26.6.4I 2 C Own address register 2 (I2C_OAR2) .....683
26.6.5I 2 C Data register (I2C_DR) .....684
26.6.6I 2 C Status register 1 (I2C_SR1) .....684
26.6.7I 2 C Status register 2 (I2C_SR2) .....687
26.6.8I 2 C Clock control register (I2C_CCR) .....689
26.6.9I 2 C TRISE register (I2C_TRISE) .....690
26.6.10I2C register map .....691
27Universal synchronous asynchronous receiver transmitter (USART) .....692
27.1USART introduction .....692
27.2USART main features .....692
27.3USART functional description .....693
27.3.1USART character description .....696
27.3.2Transmitter .....697
27.3.3Receiver .....700
27.3.4Fractional baud rate generation .....705
27.3.5USART receiver tolerance to clock deviation .....714
27.3.6Multiprocessor communication .....715
27.3.7Parity control .....717
27.3.8LIN (local interconnection network) mode .....718
27.3.9USART synchronous mode .....720
27.3.10Single-wire half-duplex communication .....722
27.3.11Smartcard .....723
27.3.12IrDA SIR ENDEC block .....725
27.3.13Continuous communication using DMA .....727
27.3.14Hardware flow control .....729
27.4USART interrupts .....732
27.5USART mode configuration .....733
27.6USART registers .....733
27.6.1Status register (USART_SR) .....733
27.6.2Data register (USART_DR) .....736
27.6.3Baud rate register (USART_BRR) .....736
27.6.4Control register 1 (USART_CR1) .....736
27.6.5Control register 2 (USART_CR2) .....739
27.6.6Control register 3 (USART_CR3) .....740
27.6.7Guard time and prescaler register (USART_GTPR) .....742
27.6.8USART register map . . . . .743
28Serial peripheral interface (SPI) . . . . .744
28.1SPI introduction . . . . .744
28.2SPI and I 2 S main features . . . . .745
28.2.1SPI features . . . . .745
28.2.2I 2 S features . . . . .746
28.3SPI functional description . . . . .747
28.3.1General description . . . . .747
28.3.2Configuring the SPI in slave mode . . . . .751
28.3.3Configuring the SPI in master mode . . . . .753
28.3.4Configuring the SPI for half-duplex communication . . . . .755
28.3.5Data transmission and reception procedures . . . . .756
28.3.6CRC calculation . . . . .762
28.3.7Status flags . . . . .764
28.3.8Disabling the SPI . . . . .765
28.3.9SPI communication using DMA (direct memory addressing) . . . . .766
28.3.10Error flags . . . . .768
28.3.11SPI interrupts . . . . .769
28.4I 2 S functional description . . . . .770
28.4.1I 2 S general description . . . . .770
28.4.2Supported audio protocols . . . . .771
28.4.3Clock generator . . . . .778
28.4.4I 2 S master mode . . . . .780
28.4.5I 2 S slave mode . . . . .782
28.4.6Status flags . . . . .784
28.4.7Error flags . . . . .785
28.4.8I 2 S interrupts . . . . .786
28.5SPI and I 2 S registers . . . . .787
28.5.1SPI control register 1 (SPI_CR1)(not used in I 2 S mode) . . . . .787
28.5.2SPI control register 2 (SPI_CR2) . . . . .789
28.5.3SPI status register (SPI_SR) . . . . .790
28.5.4SPI data register (SPI_DR) . . . . .791
28.5.5SPI CRC polynomial register (SPI_CRCPR)(not used in I 2 S mode) . . . . .792
28.5.6SPI RX CRC register (SPI_RXCRCR)(not used in I 2 S mode) . . . . .792
28.5.7SPI TX CRC register (SPI_TXCRCR)(not used in I 2 S mode) . . . . .793
28.5.8SPI_I 2 S configuration register (SPI_I2SCFGR) . . . . .793
28.5.9SPI_I 2 S prescaler register (SPI_I2SPR) . . . . .795
28.5.10SPI register map . . . . .796
29Secure digital input/output interface (SDIO) . . . . .797
29.1SDIO main features . . . . .797
29.2SDIO bus topology . . . . .798
29.3SDIO functional description . . . . .800
29.3.1SDIO adapter . . . . .801
29.3.2SDIO APB2 interface . . . . .811
29.4Card functional description . . . . .812
29.4.1Card identification mode . . . . .812
29.4.2Card reset . . . . .812
29.4.3Operating voltage range validation . . . . .812
29.4.4Card identification process . . . . .813
29.4.5Block write . . . . .814
29.4.6Block read . . . . .815
29.4.7Stream access, stream write and stream read
(MultiMediaCard only) . . . . .
815
29.4.8Erase: group erase and sector erase . . . . .817
29.4.9Wide bus selection or deselection . . . . .817
29.4.10Protection management . . . . .817
29.4.11Card status register . . . . .820
29.4.12SD status register . . . . .823
29.4.13SD I/O mode . . . . .827
29.4.14Commands and responses . . . . .828
29.5Response formats . . . . .832
29.5.1R1 (normal response command) . . . . .832
29.5.2R1b . . . . .832
29.5.3R2 (CID, CSD register) . . . . .832
29.5.4R3 (OCR register) . . . . .833
29.5.5R4 (Fast I/O) . . . . .833
29.5.6R4b . . . . .834
29.5.7R5 (interrupt request) . . . . .834
29.5.8R6 . . . . .835
29.6SDIO I/O card-specific operations . . . . .835
29.6.1SDIO I/O read wait operation by SDIO_D2 signaling . . . . .836

30.4.4Using serial wire and releasing the unused debug pins as GPIOs . . .859
30.5STM32L1xxxx JTAG TAP connection . . . . .859
30.6ID codes and locking mechanism . . . . .861
30.6.1MCU device ID code . . . . .861
30.6.2Boundary scan TAP . . . . .862
30.6.3Cortex ® -M3 TAP . . . . .862
30.6.4Cortex ® -M3 JEDEC-106 ID code . . . . .862
30.7JTAG debug port . . . . .862
30.8SW debug port . . . . .864
30.8.1SW protocol introduction . . . . .864
30.8.2SW protocol sequence . . . . .864
30.8.3SW-DP state machine (reset, idle states, ID code) . . . . .865
30.8.4DP and AP read/write accesses . . . . .865
30.8.5SW-DP registers . . . . .866
30.8.6SW-AP registers . . . . .866
30.9AHB-AP (AHB access port) - valid for both JTAG-DP
and SW-DP . . . . .
867
30.10Core debug . . . . .868
30.11Capability of the debugger host to connect under system reset . . . . .869
30.12FPB (Flash patch breakpoint) . . . . .869
30.13DWT (data watchpoint trigger) . . . . .870
30.14ITM (instrumentation trace macrocell) . . . . .870
30.14.1General description . . . . .870
30.14.2Time stamp packets, synchronization and overflow packets . . . . .870
30.15ETM (Embedded Trace Macrocell ) . . . . .872
30.15.1ETM general description . . . . .872
30.15.2ETM signal protocol and packet types . . . . .872
30.15.3Main ETM registers . . . . .873
30.15.4ETM configuration example . . . . .873
30.16MCU debug component (DBGMCU) . . . . .873
30.16.1Debug support for low-power modes . . . . .873
30.16.2Debug support for timers, watchdog and I 2 C . . . . .874
30.16.3Debug MCU configuration register . . . . .874
30.16.4Debug MCU APB1 freeze register (DBGMCU_APB1_FZ) . . . . .875
30.16.5Debug MCU APB2 freeze register (DBGMCU_APB2_FZ) . . . . .877
30.17TPIU (trace port interface unit) . . . . .878

List of tables

Table 1.Product categories and memory size overview . . . . .40
Table 2.STM32L100xx product categories . . . . .40
Table 3.STM32L15xxx product categories . . . . .40
Table 4.STM32L162xx product categories . . . . .41
Table 5.Register boundary addresses . . . . .47
Table 6.Boot modes . . . . .50
Table 7.Memory mapping vs. boot mode/physical remap . . . . .51
Table 8.NVM module organization (Cat.1 and Cat.2 devices) . . . . .53
Table 9.NVM module organization (Cat.3 devices) . . . . .54
Table 10.NVM module organization (Cat.4 devices) . . . . .55
Table 11.NVM module organization (Cat.5 devices) . . . . .56
Table 12.NVM module organization (Cat.6 devices) . . . . .58
Table 13.Number of wait states (WS) according to CPU clock (HCLK) frequency . . . . .59
Table 14.Allowed configuration in FLASH_ACR . . . . .61
Table 15.Data EEPROM programming times . . . . .70
Table 16.Read While Write Summary . . . . .71
Table 17.Prohibited operations . . . . .72
Table 18.Option byte organization . . . . .73
Table 19.Description of the option bytes . . . . .75
Table 20.Programming/erase functions (Cat.1, Cat.2 and Cat.3 devices) . . . . .77
Table 21.Programming/erase functions (Cat.4, Cat.5 and Cat.6 devices) . . . . .79
Table 22.Flash memory module protection according to RDP and its complement . . . . .81
Table 23.Interrupts . . . . .83
Table 24.Register map and reset values . . . . .91
Table 25.CRC calculation unit register map and reset values . . . . .96
Table 26.Performance versus VCORE ranges . . . . .101
Table 27.Summary of low-power modes . . . . .109
Table 28.Sleep-now . . . . .112
Table 29.Sleep-on-exit . . . . .112
Table 30.Sleep-now . . . . .114
Table 31.Sleep-on-exit . . . . .114
Table 32.Stop mode . . . . .116
Table 33.Standby mode . . . . .117
Table 34.PWR - register map and reset values . . . . .124
Table 35.System clock source frequency . . . . .134
Table 36.RCC register map and reset values . . . . .168
Table 37.Port bit configuration table . . . . .173
Table 38.Flexible SWJ-DP pin assignment . . . . .175
Table 39.RTC_AF1 pin . . . . .182
Table 40.GPIO register map and reset values . . . . .189
Table 41.I/O groups and selection . . . . .196
Table 42.Input capture mapping . . . . .199
Table 43.Timer selection . . . . .200
Table 44.Input capture selection . . . . .200
Table 45.RI register map and reset values . . . . .216
Table 46.SYSCFG register map and reset values . . . . .222
Table 47.Acquisition switching sequence summary . . . . .226
Table 48.Channel and sampling capacitor I/Os configuration summary . . . . .228
Table 49.Vector table (Cat.1 and Cat.2 devices) . . . . .230
Table 50.Vector table (Cat.3 devices) . . . . .232
Table 51.Vector table (Cat.4, Cat.5 and Cat.6 devices) . . . . .235
Table 52.External interrupt/event controller register map and reset values. . . . .244
Table 53.Programmable data width and endian behavior (when bits PINC = MINC = 1) . . . . .252
Table 54.DMA interrupt requests . . . . .253
Table 55.Summary of DMA1 requests for each channel . . . . .255
Table 56.Summary of DMA2 requests for each channel . . . . .256
Table 57.DMA register map and reset values . . . . .262
Table 58.ADC pins. . . . .267
Table 59.Analog watchdog channel selection . . . . .273
Table 60.Configuring the trigger edge detection . . . . .277
Table 61.External trigger for regular channels. . . . .277
Table 62.External trigger for injected channels . . . . .278
Table 63.ADC interrupts . . . . .289
Table 64.ADC global register map. . . . .308
Table 65.ADC register map and reset values . . . . .308
Table 66.ADC register map and reset values (common registers) . . . . .310
Table 67.DAC pins. . . . .312
Table 68.External triggers . . . . .315
Table 69.DAC register map . . . . .331
Table 70.Comparator behavior in the low-power modes . . . . .339
Table 71.COMP register map and reset values. . . . .343
Table 72.Operating modes and calibration . . . . .347
Table 73.OPAMP register map . . . . .353
Table 74.Example of frame rate calculation . . . . .358
Table 75.Blink frequency . . . . .366
Table 76.V LCDrail connections to GPIO pins . . . . .368
Table 77.Remapping capability . . . . .370
Table 78.LCD register map and reset values . . . . .379
Table 79.Counting direction versus encoder signals. . . . .409
Table 80.TIMx internal trigger connection . . . . .424
Table 81.Output control bit for standard OCx channels. . . . .433
Table 82.TIMx register map and reset values . . . . .440
Table 83.TIMx internal trigger connection . . . . .470
Table 84.Output control bit for standard OCx channels. . . . .478
Table 85.TIM9 register map and reset values . . . . .480
Table 86.Output control bit for standard OCx channels. . . . .489
Table 87.TIM10/11 register map and reset values . . . . .493
Table 88.TIM6 and TIM7 register map and reset values . . . . .506
Table 89.Effect of low-power modes on RTC . . . . .524
Table 90.Interrupt control bits . . . . .525
Table 91.RTC register map and reset values . . . . .546
Table 92.Min/max IWDG timeout period (in ms) at 37 kHz (LSI). . . . .550
Table 93.IWDG register map and reset values . . . . .553
Table 94.Minimum and maximum timeout values @32 MHz (f PCLK1 ). . . . .557
Table 95.WWDG register map and reset values . . . . .560
Table 96.Processing time (in clock cycle) . . . . .577
Table 97.AES interrupt requests . . . . .577
Table 98.AES register map . . . . .586
Table 99.Double-buffering buffer flag definition. . . . .597
Table 100.Bulk double-buffering memory buffers usage . . . . .598
Table 101.Isochronous memory buffers usage . . . . .599
Table 102.Resume event detection . . . . .601
Table 103.Reception status encoding . . . . .612
Table 104.Endpoint type encoding . . . . .612
Table 105.Endpoint kind meaning . . . . .612
Table 106.Transmission status encoding . . . . .613
Table 107.Definition of allocated buffer memory . . . . .616
Table 108.USB register map and reset values . . . . .616
Table 109.NOR/PSRAM bank selection . . . . .621
Table 110.External memory address . . . . .621
Table 111.Programmable NOR/PSRAM access parameters . . . . .622
Table 112.Nonmultiplexed I/O NOR flash . . . . .623
Table 113.Multiplexed I/O NOR flash . . . . .623
Table 114.Nonmultiplexed I/Os PSRAM/SRAM . . . . .624
Table 115.Multiplexed I/O PSRAM . . . . .624
Table 116.NOR flash/PSRAM controller: example of supported memories and transactions . . . . .625
Table 117.FSMC_BCRx bit fields . . . . .628
Table 118.FSMC_BTRx bit fields . . . . .628
Table 119.FSMC_BCRx bit fields . . . . .630
Table 120.FSMC_BTRx bit fields . . . . .630
Table 121.FSMC_BWTRx bit fields . . . . .631
Table 122.FSMC_BCRx bit fields . . . . .633
Table 123.FSMC_BTRx bit fields . . . . .633
Table 124.FSMC_BWTRx bit fields . . . . .634
Table 125.FSMC_BCRx bit fields . . . . .635
Table 126.FSMC_BTRx bit fields . . . . .636
Table 127.FSMC_BWTRx bit fields . . . . .636
Table 128.FSMC_BCRx bit fields . . . . .638
Table 129.FSMC_BTRx bit fields . . . . .638
Table 130.FSMC_BWTRx bit fields . . . . .639
Table 131.FSMC_BCRx bit fields . . . . .640
Table 132.FSMC_BTRx bit fields . . . . .641
Table 133.FSMC_BCRx bit fields . . . . .646
Table 134.FSMC_BTRx bit fields . . . . .647
Table 135.FSMC_BCRx bit fields . . . . .648
Table 136.FSMC_BTRx bit fields . . . . .649
Table 137.FSMC register map . . . . .658
Table 138.SMBus vs. I2C . . . . .673
Table 139.I2C Interrupt requests . . . . .677
Table 140.I2C register map and reset values . . . . .691
Table 141.Noise detection from sampled data . . . . .704
Table 142.Error calculation for programmed baud rates at \( f_{PCLK} = 8 \) MHz or \( f_{PCLK} = 12 \) MHz, oversampling by 16. . . . .707
Table 143.Error calculation for programmed baud rates at \( f_{PCLK} = 8 \) MHz or \( f_{PCLK} = 12 \) MHz, oversampling by 8. . . . .708
Table 144.Error calculation for programmed baud rates at \( f_{PCLK} = 16 \) MHz or \( f_{PCLK} = 24 \) MHz, oversampling by 16. . . . .708
Table 145.Error calculation for programmed baud rates at \( f_{PCLK} = 16 \) MHz or \( f_{PCLK} = 24 \) MHz, oversampling by 8. . . . .709
Table 146.Error calculation for programmed baud rates at \( f_{PCLK} = 1 \) MHz or \( f_{PCLK} = 8 \) MHz, oversampling by 16. . . . .710
Table 147.Error calculation for programmed baud rates at \( f_{PCLK} = 1 \) MHz or \( f_{PCLK} = 8 \) MHz, oversampling by 8. . . . .711
oversampling by 8. . . . .710
Table 148. Error calculation for programmed baud rates at \( f_{PCLK} = 16 \) MHz or \( f_{PCLK} = 32 \) MHz), oversampling by 16. . . . .711
Table 149. Error calculation for programmed baud rates at \( f_{PCLK} = 16 \) MHz or \( f_{PCLK} = 32 \) MHz), oversampling by 8. . . . .712
Table 150. Error calculation for programmed baud rates at \( f_{PCLK} = 1 \) MHz or \( f_{PCLK} = 8 \) MHz), oversampling by 8. . . . .712
Table 151. Error calculation for programmed baud rates at \( f_{PCLK} = 16 \) MHz or \( f_{PCLK} = 32 \) MHz), oversampling by 16. . . . .713
Table 152. Error calculation for programmed baud rates at \( f_{PCLK} = 16 \) MHz or \( f_{PCLK} = 32 \) MHz), oversampling by 8. . . . .714
Table 153. USART receiver's tolerance when DIV fraction is 0 . . . . .715
Table 154. USART receiver tolerance when DIV_Fraction is different from 0 . . . . .715
Table 155. Frame formats . . . . .717
Table 156. USART interrupt requests. . . . .732
Table 157. USART mode configuration . . . . .733
Table 158. USART register map and reset values . . . . .743
Table 159. SPI interrupt requests. . . . .769
Table 160. Audio-frequency precision using standard 8 MHz HSE (Cat.3, Cat.4, Cat.5 and Cat.6 devices only) . . . . .779
Table 161. I 2 S interrupt requests . . . . .786
Table 162. SPI register map and reset values . . . . .796
Table 163. SDIO I/O definitions . . . . .801
Table 164. Command format . . . . .805
Table 165. Short response format . . . . .806
Table 166. Long response format. . . . .806
Table 167. Command path status flags . . . . .806
Table 168. Data token format. . . . .809
Table 169. Transmit FIFO status flags . . . . .810
Table 170. Receive FIFO status flags . . . . .811
Table 171. Card status . . . . .821
Table 172. SD status . . . . .824
Table 173. Speed class code field . . . . .825
Table 174. Performance move field . . . . .825
Table 175. AU_SIZE field . . . . .826
Table 176. Maximum AU size. . . . .826
Table 177. Erase size field . . . . .826
Table 178. Erase timeout field . . . . .827
Table 179. Erase offset field. . . . .827
Table 180. Block-oriented write commands . . . . .829
Table 181. Block-oriented write protection commands. . . . .830
Table 182. Erase commands . . . . .830
Table 183. I/O mode commands . . . . .831
Table 184. Lock card . . . . .831
Table 185. Application-specific commands . . . . .831
Table 186. R1 response . . . . .832
Table 187. R2 response . . . . .833
Table 188. R3 response . . . . .833
Table 189. R4 response . . . . .833
Table 190. R4b response . . . . .834
Table 191. R5 response . . . . .834
Table 192. R6 response . . . . .835
Table 193.Response type and SDIO_RESPx registers.842
Table 194.SDIO register map852
Table 195.SWJ debug port pins857
Table 196.Flexible SWJ-DP pin assignment857
Table 197.JTAG debug port data registers862
Table 198.32-bit debug port registers addressed through the shifted value A[3:2]863
Table 199.Packet request (8-bits)864
Table 200.ACK response (3 bits)865
Table 201.DATA transfer (33 bits)865
Table 202.SW-DP registers866
Table 203.Cortex®-M3 AHB-AP registers867
Table 204.Core debug registers868
Table 205.Main ITM registers871
Table 206.Main ETM registers873
Table 207.Asynchronous TRACE pin assignment879
Table 208.Synchronous TRACE pin assignment879
Table 209.Flexible TRACE pin assignment880
Table 210.Important TPIU registers882
Table 211.DBG register map and reset values884
Table 212.Document revision history888

List of figures

Figure 1.System architecture (Cat.1 and Cat.2 devices) . . . . .42
Figure 2.System architecture (Cat.3 devices) . . . . .43
Figure 3.System architecture (Cat.4 devices) . . . . .44
Figure 4.System architecture (Cat.5 and Cat.6 devices) . . . . .45
Figure 5.Sequential 32 bits instructions execution . . . . .61
Figure 6.RDP levels . . . . .81
Figure 7.CRC calculation unit block diagram . . . . .94
Figure 8.Power supply overview . . . . .98
Figure 9.STM32L1xxxx performance versus VDD and VCORE range. . . . .102
Figure 10.Power supply supervisors . . . . .104
Figure 11.Power on reset/power down reset waveform . . . . .105
Figure 12.BOR thresholds . . . . .107
Figure 13.PVD thresholds . . . . .108
Figure 14.Simplified diagram of the reset circuit. . . . .127
Figure 15.Clock tree . . . . .129
Figure 16.HSE/ LSE clock sources. . . . .130
Figure 17.Using the TIM9/TIM10/TIM11 channel 1 input capture to measure frequencies . . . . .137
Figure 18.Basic structure of a standard I/O port bit . . . . .172
Figure 19.Basic structure of a five-volt tolerant I/O port bit. . . . .173
Figure 20.Selecting an alternate function . . . . .176
Figure 21.Input floating/pull up/pull down configurations . . . . .179
Figure 22.Output configuration . . . . .180
Figure 23.Alternate function configuration . . . . .180
Figure 24.High impedance-analog configuration . . . . .181
Figure 25.Routing interface (RI) block diagram for Cat.1 and Cat.2 devices . . . . .192
Figure 26.Routing interface (RI) block diagram for Cat.3 devices . . . . .193
Figure 27.Routing interface (RI) block diagram for Cat.4, Cat.5 and Cat.6 devices . . . . .194
Figure 28.Internal reference voltage output . . . . .200
Figure 29.Surface charge transfer analog IO group structure . . . . .225
Figure 30.Sampling capacitor charge overview . . . . .227
Figure 31.Timer mode acquisition logic . . . . .228
Figure 32.External interrupt/event controller block diagram . . . . .238
Figure 33.External interrupt/event GPIO mapping . . . . .240
Figure 34.DMA block diagram in Cat.1 and Cat.2 STM32L1xxxx devices . . . . .247
Figure 35.DMA block diagram in Cat.3 STM32L1xxxx devices . . . . .248
Figure 36.DMA block diagram in Cat.4, Cat.5 and Cat.6 STM32L1xxxx devices . . . . .249
Figure 37.DMA1 request mapping . . . . .254
Figure 38.DMA2 request mapping . . . . .256
Figure 39.ADC block diagram (Cat.1 and Cat.2 devices) . . . . .266
Figure 40.ADC block diagram (Cat.3, Cat.4, Cat.5 and Cat.6 devices) . . . . .268
Figure 41.Timing diagram (normal mode, PDI=0). . . . .272
Figure 42.Analog watchdog's guarded area . . . . .272
Figure 43.Injected conversion latency . . . . .274
Figure 44.Right alignment of 12-bit data. . . . .276
Figure 45.Left alignment of 12-bit data . . . . .276
Figure 46.Left alignment of 6-bit data . . . . .276
Figure 47.ADC freeze mode . . . . .280
Figure 48.Continuous regular conversions with a delay . . . . .281
Figure 49.Continuous conversions with a delay between each conversion . . . . .282
Figure 50.Automatic power-down control: example 1 . . . . .283
Figure 51.Automatic power-down control: example 2 . . . . .283
Figure 52.Automatic power-down control: example 3 . . . . .284
Figure 53.Temperature sensor and VREFINT channel block diagram . . . . .286
Figure 54.ADC flags and interrupts . . . . .288
Figure 55.DAC channel block diagram . . . . .312
Figure 56.Data registers in single DAC channel mode . . . . .314
Figure 57.Data registers in dual DAC channel mode . . . . .314
Figure 58.Timing diagram for conversion with trigger disabled TEN = 0 . . . . .315
Figure 59.DAC LFSR register calculation algorithm . . . . .317
Figure 60.DAC conversion (SW trigger enabled) with LFSR wave generation . . . . .317
Figure 61.DAC triangle wave generation . . . . .318
Figure 62.DAC conversion (SW trigger enabled) with triangle wave generation . . . . .318
Figure 63.COMP1 interconnections (Cat.1 and Cat.2 devices) . . . . .334
Figure 64.COMP1 interconnections (Cat.3, Cat.4, Cat.5 and Cat.6 devices) . . . . .335
Figure 65.COMP2 interconnections (Cat.1 and Cat.2 devices) . . . . .337
Figure 66.COMP2 interconnections (Cat.3, Cat.4, Cat.5 and Cat.6 devices) . . . . .337
Figure 67.Redirecting the COMP2 output . . . . .338
Figure 68.Comparators in Window mode . . . . .339
Figure 69.OPAMP1 signal routing . . . . .345
Figure 70.OPAMP2 signal routing . . . . .345
Figure 71.OPAMP3 signal routing (Cat.4 devices only) . . . . .346
Figure 72.LCD controller block diagram . . . . .357
Figure 73.1/3 bias, 1/4 duty . . . . .359
Figure 74.Static duty . . . . .360
Figure 75.Static duty . . . . .361
Figure 76.1/2 duty, 1/2 bias . . . . .362
Figure 77.1/3 duty, 1/3 bias . . . . .363
Figure 78.1/4 duty, 1/3 bias . . . . .364
Figure 79.1/8 duty, 1/4 bias . . . . .365
Figure 80.LCD voltage control . . . . .367
Figure 81.Deadtime . . . . .368
Figure 82.SEG/COM mux feature example . . . . .372
Figure 83.Flowchart example . . . . .373
Figure 84.General-purpose timer block diagram . . . . .383
Figure 85.Counter timing diagram with prescaler division change from 1 to 2 . . . . .385
Figure 86.Counter timing diagram with prescaler division change from 1 to 4 . . . . .385
Figure 87.Counter timing diagram, internal clock divided by 1 . . . . .386
Figure 88.Counter timing diagram, internal clock divided by 2 . . . . .386
Figure 89.Counter timing diagram, internal clock divided by 4 . . . . .387
Figure 90.Counter timing diagram, internal clock divided by N . . . . .387
Figure 91.Counter timing diagram, Update event when ARPE=0 (TIMx_ARR not preloaded) . . . . .388
Figure 92.Counter timing diagram, Update event when ARPE=1 (TIMx_ARR preloaded) . . . . .388
Figure 93.Counter timing diagram, internal clock divided by 1 . . . . .389
Figure 94.Counter timing diagram, internal clock divided by 2 . . . . .390
Figure 95.Counter timing diagram, internal clock divided by 4 . . . . .390
Figure 96.Counter timing diagram, internal clock divided by N . . . . .390
Figure 97.Counter timing diagram, Update event . . . . .391
Figure 98.Counter timing diagram, internal clock divided by 1, TIMx_ARR=0x6 . . . . .392
Figure 99.Counter timing diagram, internal clock divided by 2 . . . . .392
Figure 100. Counter timing diagram, internal clock divided by 4, TIMx_ARR=0x36 . . . . .393
Figure 101. Counter timing diagram, internal clock divided by N . . . . .393
Figure 102. Counter timing diagram, Update event with ARPE=1 (counter underflow) . . . . .394
Figure 103. Counter timing diagram, Update event with ARPE=1 (counter overflow) . . . . .394
Figure 104. Control circuit in normal mode, internal clock divided by 1 . . . . .395
Figure 105. TI2 external clock connection example . . . . .396
Figure 106. Control circuit in external clock mode 1 . . . . .397
Figure 107. External trigger input block . . . . .397
Figure 108. Control circuit in external clock mode 2 . . . . .398
Figure 109. Capture/compare channel (example: channel 1 input stage) . . . . .398
Figure 110. Capture/compare channel 1 main circuit . . . . .399
Figure 111. Output stage of capture/compare channel (channel 1) . . . . .399
Figure 112. PWM input mode timing . . . . .401
Figure 113. Output compare mode, toggle on OC1 . . . . .403
Figure 114. Edge-aligned PWM waveforms (ARR=8) . . . . .404
Figure 115. Center-aligned PWM waveforms (ARR=8) . . . . .405
Figure 116. Example of one-pulse mode . . . . .406
Figure 117. Clearing TIMx_OCxREF . . . . .408
Figure 118. Example of counter operation in encoder interface mode . . . . .410
Figure 119. Example of encoder interface mode with TI1FP1 polarity inverted . . . . .410
Figure 120. Control circuit in reset mode . . . . .411
Figure 121. Control circuit in gated mode . . . . .412
Figure 122. Control circuit in trigger mode . . . . .413
Figure 123. Control circuit in external clock mode 2 + trigger mode . . . . .414
Figure 124. Master/Slave timer example . . . . .414
Figure 125. Gating TIM2 with OC1REF of TIM3 . . . . .415
Figure 126. Gating TIM2 with Enable of TIM3 . . . . .416
Figure 127. Triggering TIM2 with update of TIM3 . . . . .417
Figure 128. Triggering TIM2 with Enable of TIM3 . . . . .417
Figure 129. Triggering TIM3 and TIM2 with TIM3 TI1 input . . . . .418
Figure 130. General-purpose timer block diagram (TIM9) . . . . .443
Figure 131. General-purpose timer block diagram (TIM10) . . . . .444
Figure 132. General-purpose timer block diagram (TIM11) . . . . .445
Figure 133. Counter timing diagram with prescaler division change from 1 to 2 . . . . .447
Figure 134. Counter timing diagram with prescaler division change from 1 to 4 . . . . .447
Figure 135. Counter timing diagram, internal clock divided by 1 . . . . .448
Figure 136. Counter timing diagram, internal clock divided by 2 . . . . .449
Figure 137. Counter timing diagram, internal clock divided by 4 . . . . .449
Figure 138. Counter timing diagram, internal clock divided by N . . . . .449
Figure 139. Counter timing diagram, update event when ARPE=0 (TIMx_ARR not preloaded) . . . . .450
Figure 140. Counter timing diagram, update event when ARPE=1 (TIMx_ARR preloaded) . . . . .450
Figure 141. Control circuit in normal mode, internal clock divided by 1 . . . . .451
Figure 142. TI2 external clock connection example . . . . .452
Figure 143. Control circuit in external clock mode 1 . . . . .452
Figure 144. Capture/compare channel (example: channel 1 input stage) . . . . .453
Figure 145. Capture/compare channel 1 main circuit . . . . .454
Figure 146. Output stage of capture/compare channel (channel 1) . . . . .454
Figure 147. PWM input mode timing . . . . .456
Figure 148. Output compare mode, toggle on OC1 . . . . .458
Figure 149. Edge-aligned PWM waveforms (ARR=8) . . . . .459
Figure 150. Example of one pulse mode . . . . .460
Figure 151. Control circuit in reset mode . . . . .462
Figure 152. Control circuit in gated mode . . . . .463
Figure 153. Control circuit in trigger mode . . . . .463
Figure 154. Basic timer block diagram. . . . .495
Figure 155. Counter timing diagram with prescaler division change from 1 to 2 . . . . .497
Figure 156. Counter timing diagram with prescaler division change from 1 to 4 . . . . .497
Figure 157. Counter timing diagram, internal clock divided by 1 . . . . .498
Figure 158. Counter timing diagram, internal clock divided by 2 . . . . .499
Figure 159. Counter timing diagram, internal clock divided by 4 . . . . .499
Figure 160. Counter timing diagram, internal clock divided by N . . . . .499
Figure 161. Counter timing diagram, update event when ARPE=0 (TIMx_ARR not preloaded). . . . .500
Figure 162. Counter timing diagram, update event when ARPE=1 (TIMx_ARR preloaded). . . . .500
Figure 163. Control circuit in normal mode, internal clock divided by 1 . . . . .501
Figure 164. RTC block diagram (Cat.1 devices) . . . . .509
Figure 165. RTC block diagram (Cat.2, Cat.3, Cat.4, Cat.5 and Cat.6 devices) . . . . .510
Figure 166. Independent watchdog block diagram . . . . .550
Figure 167. Watchdog block diagram . . . . .555
Figure 168. Window watchdog timing diagram . . . . .556
Figure 169. Block diagram . . . . .562
Figure 170. ECB encryption mode . . . . .564
Figure 171. ECB decryption mode . . . . .565
Figure 172. CBC mode encryption . . . . .566
Figure 173. CBC mode decryption . . . . .566
Figure 174. Example of suspend mode management . . . . .568
Figure 175. CTR mode encryption . . . . .569
Figure 176. CTR mode decryption . . . . .569
Figure 177. 32-bit counter + nonce organization . . . . .570
Figure 178. 128-bit block construction according to the data type. . . . .572
Figure 179. 128-bit block construction according to the data type (continued) . . . . .573
Figure 180. Mode 1: encryption . . . . .573
Figure 181. Mode 2: key derivation . . . . .574
Figure 182. Mode 3: decryption . . . . .575
Figure 183. Mode 4: key derivation and decryption . . . . .575
Figure 184. DMA requests and data transfers during Input phase (AES_IN) . . . . .576
Figure 185. DMA requests during Output phase (AES_OUT) . . . . .576
Figure 186. USB peripheral block diagram . . . . .588
Figure 187. Packet buffer areas with examples of buffer description table locations . . . . .593
Figure 188. FSMC block diagram . . . . .619
Figure 189. FSMC memory banks . . . . .621
Figure 190. Mode1 read accesses. . . . .627
Figure 191. Mode1 write accesses . . . . .627
Figure 192. ModeA read accesses . . . . .629
Figure 193. ModeA write accesses . . . . .629
Figure 194. Mode2 and mode B read accesses . . . . .631
Figure 195. Mode2 write accesses . . . . .632
Figure 196. Mode B write accesses . . . . .632
Figure 197. Mode C read accesses . . . . .634
Figure 198. Mode C write accesses . . . . .635
Figure 199. Mode D read accesses . . . . .637
Figure 200. Mode D write accesses . . . . .637
Figure 201. Multiplexed read accesses . . . . .639
Figure 202. Multiplexed write accesses . . . . .640
Figure 203. Asynchronous wait during a read access . . . . .642
Figure 204. Asynchronous wait during a write access . . . . .643
Figure 205. Wait configurations . . . . .645
Figure 206. Synchronous multiplexed read mode - NOR, PSRAM (CRAM) . . . . .646
Figure 207. Synchronous multiplexed write mode - PSRAM (CRAM) . . . . .648
Figure 208. I2C bus protocol . . . . .662
Figure 209. I2C block diagram . . . . .663
Figure 210. Transfer sequence diagram for slave transmitter . . . . .665
Figure 211. Transfer sequence diagram for slave receiver . . . . .666
Figure 212. Transfer sequence diagram for master transmitter . . . . .669
Figure 213. Transfer sequence diagram for master receiver . . . . .670
Figure 214. I2C interrupt mapping diagram . . . . .678
Figure 215. USART block diagram . . . . .695
Figure 216. Word length programming . . . . .696
Figure 217. Configurable stop bits . . . . .698
Figure 218. TC/TXE behavior when transmitting . . . . .699
Figure 219. Start bit detection when oversampling by 16 or 8 . . . . .700
Figure 220. Data sampling when oversampling by 16 . . . . .703
Figure 221. Data sampling when oversampling by 8 . . . . .704
Figure 222. Mute mode using Idle line detection . . . . .716
Figure 223. Mute mode using address mark detection . . . . .717
Figure 224. Break detection in LIN mode (11-bit break length - LBDL bit is set) . . . . .719
Figure 225. Break detection in LIN mode vs. Framing error detection. . . . .720
Figure 226. USART example of synchronous transmission. . . . .721
Figure 227. USART data clock timing diagram (M=0) . . . . .721
Figure 228. USART data clock timing diagram (M=1) . . . . .722
Figure 229. RX data setup/hold time . . . . .722
Figure 230. ISO 7816-3 asynchronous protocol . . . . .723
Figure 231. Parity error detection using the 1.5 stop bits . . . . .724
Figure 232. IrDA SIR ENDEC- block diagram . . . . .726
Figure 233. IrDA data modulation (3/16) -Normal mode . . . . .726
Figure 234. Transmission using DMA . . . . .728
Figure 235. Reception using DMA . . . . .729
Figure 236. Hardware flow control between 2 USARTs . . . . .729
Figure 237. RTS flow control . . . . .730
Figure 238. CTS flow control . . . . .731
Figure 239. USART interrupt mapping diagram . . . . .732
Figure 240. SPI block diagram. . . . .747
Figure 241. Single master/ single slave application . . . . .748
Figure 242. Data clock timing diagram . . . . .750
Figure 243. TI mode - Slave mode, single transfer . . . . .752
Figure 244. TI mode - Slave mode, continuous transfer . . . . .753
Figure 245. TI mode - master mode, single transfer . . . . .754
Figure 246. TI mode - master mode, continuous transfer . . . . .755
Figure 247. TXE/RXNE/BSY behavior in Master / full-duplex mode (BIDIMODE=0 and RXONLY=0) in case of continuous transfers . . . . .758
Figure 248. TXE/RXNE/BSY behavior in Slave / full-duplex mode (BIDIMODE=0, RXONLY=0) in case of continuous transfers . . . . .759
Figure 249. TXE/BSY behavior in Master transmit-only mode (BIDIMODE=0 and RXONLY=0) in case of continuous transfers . . . . .760
Figure 250. TXE/BSY in Slave transmit-only mode (BIDIMODE=0 and RXONLY=0) in case of
continuous transfers . . . . .760
Figure 251. RXNE behavior in receive-only mode (BIDIRMODE=0 and RXONLY=1)
in case of continuous transfers . . . . .
761
Figure 252. TXE/BSY behavior when transmitting (BIDIRMODE=0 and RXONLY=0)
in case of discontinuous transfers . . . . .
762
Figure 253. Transmission using DMA . . . . .767
Figure 254. Reception using DMA . . . . .767
Figure 255. TI mode frame format error detection . . . . .769
Figure 256. I 2 S block diagram . . . . .770
Figure 257. I 2 S Philips protocol waveforms (16/32-bit full accuracy, CPOL = 0) . . . . .772
Figure 258. I 2 S Philips standard waveforms (24-bit frame with CPOL = 0) . . . . .772
Figure 259. Transmitting 0x8EAA33 . . . . .773
Figure 260. Receiving 0x8EAA33 . . . . .773
Figure 261. I 2 S Philips standard (16-bit extended to 32-bit packet frame with CPOL = 0) . . . . .773
Figure 262. Example . . . . .773
Figure 263. MSB justified 16-bit or 32-bit full-accuracy length with CPOL = 0 . . . . .774
Figure 264. MSB justified 24-bit frame length with CPOL = 0 . . . . .774
Figure 265. MSB justified 16-bit extended to 32-bit packet frame with CPOL = 0 . . . . .775
Figure 266. LSB justified 16-bit or 32-bit full-accuracy with CPOL = 0 . . . . .775
Figure 267. LSB justified 24-bit frame length with CPOL = 0 . . . . .775
Figure 268. Operations required to transmit 0x3478AE . . . . .776
Figure 269. Operations required to receive 0x3478AE . . . . .776
Figure 270. LSB justified 16-bit extended to 32-bit packet frame with CPOL = 0 . . . . .776
Figure 271. Example of LSB justified 16-bit extended to 32-bit packet frame . . . . .777
Figure 272. PCM standard waveforms (16-bit) . . . . .777
Figure 273. PCM standard waveforms (16-bit extended to 32-bit packet frame) . . . . .778
Figure 274. Audio sampling frequency definition . . . . .778
Figure 275. I 2 S clock generator architecture . . . . .779
Figure 276. SDIO “no response” and “no data” operations . . . . .798
Figure 277. SDIO (multiple) block read operation . . . . .798
Figure 278. SDIO (multiple) block write operation . . . . .799
Figure 279. SDIO sequential read operation . . . . .799
Figure 280. SDIO sequential write operation . . . . .799
Figure 281. SDIO block diagram . . . . .800
Figure 282. SDIO adapter . . . . .801
Figure 283. Control unit . . . . .802
Figure 284. SDIO adapter command path . . . . .803
Figure 285. Command path state machine (CPSM) . . . . .804
Figure 286. SDIO command transfer . . . . .805
Figure 287. Data path . . . . .807
Figure 288. Data path state machine (DPSM) . . . . .808
Figure 289. Block diagram of STM32 MCU and Cortex ® -M3-level debug support . . . . .854
Figure 290. SWJ debug port . . . . .856
Figure 291. JTAG TAP connections . . . . .860
Figure 292. TPIU block diagram . . . . .878

Chapters