Contents
7.3
CRS implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
7.4
CRS functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
7.4.1
7.4.2
7.4.3
7.4.4
7.4.5
7.5
CRS low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
7.6
CRS interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
7.7
CRS registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
7.7.1
7.7.2
7.7.3
7.7.4
7.7.5
8
General-purpose I/Os (GPIO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
8.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
8.2
GPIO main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
8.3
GPIO functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
8.3.1
8.3.2
8.3.3
8.3.4
8.3.5
8.3.6
8.3.7
8.3.8
8.3.9
8.3.10
8.3.11
8.3.12
8.3.13
8.3.14
8.3.15
8.4
GPIO registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
8/2301
CRS block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Synchronization input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Frequency error measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Frequency error evaluation and automatic trimming . . . . . . . . . . . . . . 324
CRS initialization and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
CRS control register (CRS_CR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
CRS configuration register (CRS_CFGR) . . . . . . . . . . . . . . . . . . . . . . 327
CRS interrupt and status register (CRS_ISR) . . . . . . . . . . . . . . . . . . . 328
CRS interrupt flag clear register (CRS_ICR) . . . . . . . . . . . . . . . . . . . . 330
CRS register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
General-purpose I/O (GPIO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
I/O pin alternate function multiplexer and mapping . . . . . . . . . . . . . . . 335
I/O port control registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
I/O port data registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
I/O data bitwise handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
GPIO locking mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
I/O alternate function input/output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
External interrupt/wakeup lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Input configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Output configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Alternate function configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Analog configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
Using the HSE or LSE oscillator pins as GPIOs . . . . . . . . . . . . . . . . . 340
Using the GPIO pins in the RTC supply domain . . . . . . . . . . . . . . . . . 340
Using PH3 as GPIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
RM0432 Rev 6
RM0432
Need help?
Do you have a question about the STM32L4+ Series and is the answer not in the manual?