Sign In
Upload
Manuals
Brands
ST Manuals
Microcontrollers
RM0390
User Manuals: ST RM0390 STM32F446xx microcontrollers
Manuals and User Guides for ST RM0390 STM32F446xx microcontrollers. We have
1
ST RM0390 STM32F446xx microcontrollers manual available for free PDF download: Reference Manual
ST RM0390 Reference Manual (1328 pages)
advanced Arm-based 32-bit MCUs
Brand:
ST
| Category:
Microcontrollers
| Size: 16 MB
Table of Contents
Table of Contents
2
SYSCFG External Interrupt Configuration Register
4
Documentation Conventions
51
List of Abbreviations for Registers
51
Glossary
52
Peripheral Availability
52
Memory and Bus Architecture
53
System Architecture
53
I-Bus
54
D-Bus
54
S-Bus
54
DMA Memory Bus
54
Figure 1. System Architecture for Stm32F446Xx Devices
54
AHB/APB Bridges (APB)
55
Busmatrix
55
USB OTG HS DMA Bus
55
DMA Peripheral Bus
55
Memory Organization
56
Introduction
56
Memory Map and Register Boundary Addresses
56
Figure 2. Memory Map
56
Table 1. Stm32F446Xx Register Boundary Addresses
57
Embedded SRAM
60
Flash Memory Overview
60
Bit Banding
60
Boot Configuration
61
Table 2. Boot Modes
61
Table 3. Memory Mapping Vs. Boot Mode/Physical Remap in Stm32F446Xx
62
Figure 3. Flash Memory Interface Connection Inside System Architecture
64
Main Features
64
Introduction
64
Embedded Flash Memory Interface
64
Embedded Flash Memory
65
Table 4. Flash Module Organization
65
Read Interface
66
Relation between CPU Clock Frequency and Flash Memory Read Time
66
Table 5. Number of Wait States According to CPU Clock (HCLK) Frequency
66
Adaptive Real-Time Memory Accelerator (ART Accelerator™)
67
Figure 4. Sequential 32-Bit Instruction Execution
68
Erase and Program Operations
69
Unlocking the Flash Control Register
69
Program/Erase Parallelism
70
Erase
70
Table 6. Program/Erase Parallelism
70
Programming
71
Interrupts
72
Option Bytes
72
Description of User Option Bytes
72
Table 7. Flash Interrupt Request
72
Table 8. Option Byte Organization
72
Table 9. Description of the Option Bytes
73
Programming User Option Bytes
74
Read Protection (RDP)
74
Table 10. Access Versus Read Protection Level
76
Write Protections
77
Figure 5. RDP Levels
77
Proprietary Code Readout Protection (PCROP)
78
Figure 6. PCROP Levels
79
One-Time Programmable Bytes
79
Table 11. OTP Area Organization
79
Flash Interface Registers
80
Flash Access Control Register (FLASH_ACR)
80
Flash Key Register (FLASH_KEYR)
81
Flash Option Key Register (FLASH_OPTKEYR)
81
Flash Status Register (FLASH_SR)
82
Flash Control Register (FLASH_CR)
83
Flash Option Control Register (FLASH_OPTCR)
85
Flash Interface Register Map
87
Table 12. Flash Register Map and Reset Value
87
Figure 7. CRC Calculation Unit Block Diagram
88
CRC Functional Description
88
CRC Main Features
88
CRC Introduction
88
CRC Calculation Unit
88
CRC Registers
89
Data Register (CRC_DR)
89
Independent Data Register (CRC_IDR)
90
Control Register (CRC_CR)
90
CRC Register Map
91
Table 13. CRC Calculation Unit Register Map and Reset Values
91
Power Controller (PWR)
92
Power Supplies
92
Figure 8. Power Supply Overview for Stm32F446Xx
92
Independent A/D Converter Supply and Reference Voltage
93
Battery Backup Domain
93
Table 24. RTC_AF1 Pin
93
Figure 9. Backup Domain
95
Voltage Regulator
95
Table 14. Voltage Regulator Configuration Mode Versus Device Operating Mode
96
Power Supply Supervisor
98
Power-On Reset (Por)/Power-Down Reset (PDR)
98
Figure 10. Power-On Reset/Power-Down Reset Waveform
98
Brownout Reset (BOR)
99
Programmable Voltage Detector (PVD)
99
Figure 11. BOR Thresholds
99
Low-Power Modes
100
Figure 12. PVD Thresholds
100
Slowing down System Clocks
101
Peripheral Clock Gating
101
Table 15. Low-Power Mode Summary
101
Sleep Mode
102
Low Power Mode
102
Stop Mode
103
Table 16. Sleep-Now Entry and Exit
103
Table 17. Stop Operating Modes
104
Standby Mode
106
Table 18. Stop Mode Entry and Exit for Stm32F446Xx
106
Table 19. Standby Mode Entry and Exit
107
Programming the RTC Alternate Functions to Wake up the Device from the Stop and Standby Modes
108
Power Control Registers
111
PWR Power Control Register (PWR_CR)
111
PWR Power Control/Status Register (PWR_CSR)
113
PWR Register Map
115
Table 20. PWR - Register Map and Reset Values
115
Power Reset
116
Reset
116
System Reset
116
Reset and Clock Control (RCC)
116
Backup Domain Reset
117
Clocks
117
Figure 13. Simplified Diagram of the Reset Circuit
117
Figure 14. Clock Tree
118
HSE Clock
120
Figure 15. HSE/ LSE Clock Sources (Hardware Configuration)
120
HSI Clock
121
PLL Configuration
121
LSE Clock
122
LSI Clock
122
System Clock (SYSCLK) Selection
122
RTC/AWU Clock
123
Clock Security System (CSS)
123
Watchdog Clock
124
Clock-Out Capability
124
Internal/External Clock Measurement Using TIM5/TIM11
125
Figure 16. Frequency Measurement with TIM5 in Input Capture Mode
125
Figure 17. Frequency Measurement with TIM11 in Input Capture Mode
126
RCC Registers
127
RCC Clock Control Register (RCC_CR)
127
RCC PLL Configuration Register (RCC_PLLCFGR)
129
RCC Clock Configuration Register (RCC_CFGR)
131
RCC Clock Interrupt Register (RCC_CIR)
133
RCC AHB1 Peripheral Reset Register (RCC_AHB1RSTR)
136
RCC AHB2 Peripheral Reset Register (RCC_AHB2RSTR)
138
RCC AHB3 Peripheral Reset Register (RCC_AHB3RSTR)
138
RCC APB1 Peripheral Reset Register (RCC_APB1RSTR)
139
RCC APB2 Peripheral Reset Register (RCC_APB2RSTR)
142
RCC AHB1 Peripheral Clock Enable Register (RCC_AHB1ENR)
144
RCC AHB2 Peripheral Clock Enable Register (RCC_AHB2ENR)
145
RCC AHB3 Peripheral Clock Enable Register (RCC_AHB3ENR)
146
RCC APB1 Peripheral Clock Enable Register (RCC_APB1ENR)
146
RCC APB2 Peripheral Clock Enable Register (RCC_APB2ENR)
149
RCC AHB1 Peripheral Clock Enable in Low Power Mode Register (RCC_AHB1LPENR)
151
RCC AHB2 Peripheral Clock Enable in Low Power Mode Register (RCC_AHB2LPENR)
153
RCC AHB3 Peripheral Clock Enable in Low Power Mode Register (RCC_AHB3LPENR)
154
RCC APB1 Peripheral Clock Enable in Low Power Mode Register (RCC_APB1LPENR)
154
RCC APB2 Peripheral Clock Enabled in Low Power Mode Register (RCC_APB2LPENR)
158
RCC Backup Domain Control Register (RCC_BDCR)
159
RCC Clock Control & Status Register (RCC_CSR)
161
RCC Spread Spectrum Clock Generation Register (RCC_SSCGR)
162
RCC PLLI2S Configuration Register (RCC_PLLI2SCFGR)
163
RCC PLL Configuration Register (RCC_PLLSAICFGR)
166
RCC Dedicated Clock Configuration Register (RCC_DCKCFGR)
167
RCC Clocks Gated Enable Register (CKGATENR)
169
RCC Dedicated Clocks Configuration Register 2 (DCKCFGR2)
170
RCC Register Map
172
Table 21. RCC Register Map and Reset Values
172
General-Purpose I/Os (GPIO)
176
GPIO Introduction
176
GPIO Main Features
176
GPIO Functional Description
176
Table 22. Port Bit Configuration Table
177
Figure 18. Basic Structure of a 5 V Tolerant I/O Port Bit
177
I/O Pin Multiplexer and Mapping
178
General-Purpose I/O (GPIO)
178
Table 23. Flexible SWJ-DP Pin Assignment
179
I/O Port Control Registers
180
Figure 19. Selecting an Alternate Function on Stm32F446Xx
180
I/O Port Data Registers
181
I/O Data Bitwise Handling
181
GPIO Locking Mechanism
181
I/O Alternate Function Input/Output
182
External Interrupt/Wakeup Lines
182
Input Configuration
182
Output Configuration
183
Figure 20. Input Floating/Pull Up/Pull down Configurations
183
Figure 22. Alternate Function Configuration
184
Figure 21. Output Configuration
184
Alternate Function Configuration
184
Analog Configuration
185
Using the OSC32_IN/OSC32_OUT Pins as GPIO PC14/PC15
185
Port Pins
185
Using the OSC_IN/OSC_OUT Pins as GPIO PH0/PH1 Port Pins
185
Figure 23. High Impedance-Analog Configuration
185
Selection of RTC Additional_Af1 and RTC_AF2 Alternate Functions
186
GPIO Registers
187
GPIO Port Mode Register (Gpiox_Moder) (X = A..H
187
Table 25. RTC_AF2 Pin
187
GPIO Port Output Type Register (Gpiox_Otyper) (X = A..H
188
GPIO Port Output Speed Register (Gpiox_Ospeedr) (X = A..H
188
GPIO Port Pull-Up/Pull-Down Register (Gpiox_Pupdr) (X = A..H
189
GPIO Port Input Data Register (Gpiox_Idr) (X = A..H
189
GPIO Port Configuration Lock Register (Gpiox_Lckr) (X = A..H
190
GPIO Port Bit Set/Reset Register (Gpiox_Bsrr) (X = A..H
190
GPIO Port Output Data Register (Gpiox_Odr) (X = A..H
190
GPIO Alternate Function High Register (Gpiox_Afrh) (X = a
192
GPIO Alternate Function Low Register (Gpiox_Afrl) (X = a
192
GPIO Register Map
193
Table 26. GPIO Register Map and Reset Values
193
System Configuration Controller (SYSCFG)
195
I/O Compensation Cell
195
SYSCFG Registers
195
SYSCFG Memory Remap Register (SYSCFG_MEMRMP)
195
SYSCFG Peripheral Mode Configuration Register (SYSCFG_PMC)
197
SYSCFG External Interrupt Configuration Register 1
197
(Syscfg_Exticr1)
197
SYSCFG External Interrupt Configuration Register 2
198
(Syscfg_Exticr2)
198
(Syscfg_Exticr4)
199
SYSCFG External Interrupt Configuration Register 3
199
(Syscfg_Exticr3)
199
Compensation Cell Control Register (SYSCFG_CMPCR)
200
SYSCFG Configuration Register (SYSCFG_CFGR)
200
SYSCFG Register Maps
202
Table 27. SYSCFG Register Map and Reset Values
202
Direct Memory Access Controller (DMA)
203
DMA Introduction
203
DMA Main Features
203
DMA Functional Description
205
DMA Block Diagram
205
DMA Overview
205
Figure 24. DMA Block Diagram
205
Figure 25. Channel Selection
206
Channel Selection
206
DMA Transactions
206
Table 28. DMA1 Request Mapping
207
Table 29. DMA2 Request Mapping
207
Arbiter
208
DMA Streams
208
Source, Destination and Transfer Modes
208
Table 30. Source and Destination Address
208
Figure 26. Peripheral-To-Memory Mode
209
Figure 27. Memory-To-Peripheral Mode
210
Pointer Incrementation
211
Figure 28. Memory-To-Memory Mode
211
Circular Mode
212
Double-Buffer Mode
212
Table 31. Source and Destination Address Registers in Double-Buffer Mode (DBM = 1)
213
Programmable Data Width, Packing/Unpacking, Endianness
213
Table 32. Packing/Unpacking and Endian Behavior (Bit PINC = MINC = 1)
214
Table 33. Restriction on NDT Versus PSIZE and MSIZE
214
Single and Burst Transfers
215
Fifo
215
Figure 29. FIFO Structure
215
Table 34. FIFO Threshold Configurations
216
DMA Transfer Completion
218
DMA Transfer Suspension
219
Flow Controller
219
Summary of the Possible DMA Configurations
220
Table 35. Possible DMA Configurations
220
Stream Configuration Procedure
221
Error Management
222
Table 36. DMA Interrupt Requests
223
DMA Interrupts
223
DMA Registers
224
DMA Low Interrupt Status Register (DMA_LISR)
224
DMA High Interrupt Status Register (DMA_HISR)
225
DMA Low Interrupt Flag Clear Register (DMA_LIFCR)
226
DMA High Interrupt Flag Clear Register (DMA_HIFCR)
226
DMA Stream X Configuration Register (Dma_Sxcr) (X = 0
227
DMA Stream X Number of Data Register (Dma_Sxndtr) (X = 0
230
DMA Stream X Peripheral Address Register (Dma_Sxpar) (X = 0
231
DMA Stream X Memory 0 Address Register (Dma_Sxm0Ar) (X = 0
231
DMA Stream X Memory 1 Address Register (Dma_Sxm1Ar) (X = 0
232
DMA Stream X FIFO Control Register (Dma_Sxfcr) (X = 0
232
DMA Register Map
234
Table 37. DMA Register Map and Reset Values
234
Interrupt and Exception Vectors
238
Table 38. Vector Table for Stm32F446Xx
238
External Interrupt/Event Controller (EXTI)
238
Interrupts and Events
238
Systick Calibration Value Register
238
NVIC Features
238
Nested Vectored Interrupt Controller (NVIC)
238
EXTI Main Features
242
EXTI Block Diagram
243
Wakeup Event Management
243
Functional Description
243
Figure 30. External Interrupt/Event Controller Block Diagram
243
External Interrupt/Event Line Mapping
245
Figure 31. External Interrupt/Event GPIO Mapping
245
Event Mask Register (EXTI_EMR)
246
EXTI Registers
246
Interrupt Mask Register (EXTI_IMR)
246
Rising Trigger Selection Register (EXTI_RTSR)
247
Falling Trigger Selection Register (EXTI_FTSR)
247
Software Interrupt Event Register (EXTI_SWIER)
248
Pending Register (EXTI_PR)
248
EXTI Register Map
249
Table 39. External Interrupt/Event Controller Register Map and Reset Values
249
Flexible Memory Controller (FMC)
250
FMC Main Features
250
FMC Block Diagram
251
Figure 32. FMC Block Diagram
251
AHB Interface
252
Supported Memories and Transactions
252
Figure 33. FMC Memory Banks
254
External Device Address Mapping
254
NAND Flash Memory Address Mapping
255
Table 40. NOR/PSRAM Bank Selection
255
Table 41. NOR/PSRAM External Memory Address
255
Table 42. NAND Memory Mapping and Timing Registers
255
NOR/PSRAM Address Mapping
255
SDRAM Address Mapping
256
Table 43. NAND Bank Selection
256
Table 44. SDRAM Bank Selection
256
Table 45. SDRAM Address Mapping
256
Table 46. SDRAM Address Mapping with 8-Bit Data Bus Width
257
NOR Flash/Psram Controller
258
Table 47. SDRAM Address Mapping with 16-Bit Data Bus Width
258
Table 48. Programmable NOR/PSRAM Access Parameters
259
Table 50. 16-Bit Multiplexed I/O nor Flash Memory
260
External Memory Interface Signals
260
Table 49. Non-Multiplexed I/O nor Flash Memory
260
Supported Memories and Transactions
261
Table 51. Non-Multiplexed I/Os PSRAM/SRAM
261
Table 52. 16-Bit Multiplexed I/O PSRAM
261
Table 53. nor Flash/Psram: Example of Supported Memories and Transactions
262
General Timing Rules
263
NOR Flash/Psram Controller Asynchronous Transactions
263
Figure 34. Mode1 Read Access Waveforms
264
Figure 35. Mode1 Write Access Waveforms
264
Table 54. Fmc_Bcrx Bit Fields
265
Table 55. Fmc_Btrx Bit Fields
265
Figure 36. Modea Read Access Waveforms
266
Figure 37. Modea Write Access Waveforms
266
Table 56. Fmc_Bcrx Bit Fields
267
Table 57. Fmc_Btrx Bit Fields
267
Table 58. Fmc_Bwtrx Bit Fields
268
Figure 38. Mode2 and Mode B Read Access Waveforms
268
Figure 39. Mode2 Write Access Waveforms
269
Figure 40. Modeb Write Access Waveforms
269
Table 59. Fmc_Bcrx Bit Fields
270
Table 60. Fmc_Btrx Bit Fields
270
Table 61. Fmc_Bwtrx Bit Fields
271
Figure 41. Modec Read Access Waveforms
271
Table 62. Fmc_Bcrx Bit Fields
272
Figure 42. Modec Write Access Waveforms
272
Table 63. Fmc_Btrx Bit Fields
273
Table 64. Fmc_Bwtrx Bit Fields
273
Figure 43. Moded Read Access Waveforms
274
Figure 44. Moded Write Access Waveforms
274
Table 65. Fmc_Bcrx Bit Fields
275
Table 66. Fmc_Btrx Bit Fields
275
Table 67. Fmc_Bwtrx Bit Fields
276
Figure 45. Muxed Read Access Waveforms
276
Table 68. Fmc_Bcrx Bit Fields
277
Figure 46. Muxed Write Access Waveforms
277
Table 69. Fmc_Btrx Bit Fields
278
Figure 47. Asynchronous Wait During a Read Access Waveforms
279
Synchronous Transactions
280
Figure 48. Asynchronous Wait During a Write Access Waveforms
280
Figure 49. Wait Configuration Waveforms
282
Figure 50. Synchronous Multiplexed Read Mode Waveforms - NOR, PSRAM (CRAM)
283
Table 70. Fmc_Bcrx Bit Fields
283
Table 71. Fmc_Btrx Bit Fields
284
Table 72. Fmc_Bcrx Bit Fields
285
Figure 51. Synchronous Multiplexed Write Mode Waveforms - PSRAM (CRAM)
285
Table 73. Fmc_Btrx Bit Fields
286
NOR/PSRAM Controller Registers
287
NAND Flash Controller
294
External Memory Interface Signals
294
Table 74. Programmable NAND Flash Access Parameters
294
Table 75. 8-Bit NAND Flash
294
Table 76. 16-Bit NAND Flash
295
NAND Flash Supported Memories and Transactions
296
Timing Diagrams for NAND Flash Memory
296
Table 77. Supported Memories and Transactions
296
Figure 52. NAND Flash Controller Waveforms for Common Memory Access
297
NAND Flash Operations
297
NAND Flash Prewait Functionality
298
Figure 53. Access to Non 'CE Don't Care' NAND-Flash
298
Computation of the Error Correction Code (ECC) in NAND Flash Memory
299
NAND Flash Controller Registers
300
Table 78. ECC Result Relevant Bits
305
SDRAM Controller
306
SDRAM Controller Main Features
306
SDRAM External Memory Interface Signals
306
Table 79. SDRAM Signals
306
SDRAM Controller Functional Description
307
Figure 54. Burst Write SDRAM Access Waveforms
308
Figure 55. Burst Read SDRAM Access
309
Figure 56. Logic Diagram of Read Access with RBURST Bit Set (CAS=1, RPIPE=0)
310
Figure 57. Read Access Crossing Row Boundary
312
Figure 58. Write Access Crossing Row Boundary
312
Low-Power Modes
313
Figure 59. Self-Refresh Mode
314
SDRAM Controller Registers
315
Figure 60. Power-Down Mode
315
FMC Register Map
323
Table 80. FMC Register Map
323
Quad-SPI Interface (QUADSPI)
325
Introduction
325
QUADSPI Main Features
325
QUADSPI Functional Description
325
QUADSPI Block Diagram
325
Figure 61. QUADSPI Block Diagram When Dual-Flash Mode Is Disabled
325
Figure 62. QUADSPI Block Diagram When Dual-Flash Mode Is Enabled
326
Table 81. QUADSPI Pins
326
QUADSPI Pins
326
QUADSPI Command Sequence
327
Figure 63. an Example of a Read Command in Quad Mode
327
QUADSPI Signal Interface Protocol Modes
329
Figure 64. an Example of a DDR Command in Quad Mode
330
QUADSPI Indirect Mode
331
QUADSPI Status Flag Polling Mode
333
QUADSPI Memory-Mapped Mode
333
QUADSPI Flash Memory Configuration
334
QUADSPI Delayed Data Sampling
334
QUADSPI Configuration
334
QUADSPI Usage
335
QUADSPI Error Management
337
Sending the Instruction Only Once
337
QUADSPI Busy Bit and Abort Functionality
338
Ncs Behavior
338
Figure 65. Ncs When CKMODE = 0 (T = CLK Period)
338
Figure 66. Ncs When CKMODE = 1 in SDR Mode (T = CLK Period)
338
Figure 67. Ncs When CKMODE = 1 in DDR Mode (T = CLK Period)
339
Figure 68. Ncs When CKMODE = 1 with an Abort (T = CLK Period)
339
QUADSPI Interrupts
340
Table 82. QUADSPI Interrupt Requests
340
QUADSPI Registers
341
QUADSPI Control Register (QUADSPI_CR)
341
QUADSPI Device Configuration Register (QUADSPI_DCR)
344
QUADSPI Status Register (QUADSPI_SR)
345
QUADSPI Flag Clear Register (QUADSPI_FCR)
346
QUADSPI Data Length Register (QUADSPI_DLR)
346
QUADSPI Communication Configuration Register (QUADSPI_CCR)
347
QUADSPI Address Register (QUADSPI_AR)
349
QUADSPI Alternate Bytes Registers (QUADSPI_ABR)
350
QUADSPI Data Register (QUADSPI_DR)
350
QUADSPI Polling Status Mask Register (QUADSPI
351
QUADSPI Polling Status Match Register (QUADSPI
351
QUADSPI Polling Interval Register (QUADSPI
352
QUADSPI Low-Power Timeout Register (QUADSPI_LPTR)
352
QUADSPI Register Map
353
Table 83. QUADSPI Register Map and Reset Values
353
Analog-To-Digital Converter (ADC)
354
ADC Introduction
354
ADC Main Features
354
ADC Functional Description
354
Figure 69. Single ADC Block Diagram
355
ADC On-Off Control
356
Table 84. ADC Pins
356
ADC1/2 and ADC3 Connectivity
357
Figure 70. ADC1 Connectivity
357
Figure 71. ADC2 Connectivity
358
Figure 72. ADC3 Connectivity
359
ADC Clock
360
Channel Selection
360
Single Conversion Mode
361
Continuous Conversion Mode
361
Timing Diagram
361
Analog Watchdog
362
Table 85. Analog Watchdog Channel Selection
362
Figure 73. Timing Diagram
362
Figure 74. Analog Watchdog's Guarded Area
362
Injected Channel Management
363
Scan Mode
363
Figure 75. Injected Conversion Latency
364
Discontinuous Mode
364
Data Alignment
365
Channel-Wise Programmable Sampling Time
366
Figure 76. Right Alignment of 12-Bit Data
366
Figure 77. Left Alignment of 12-Bit Data
366
Figure 78. Left Alignment of 6-Bit Data
366
Conversion on External Trigger and Trigger Polarity
367
Table 86. Configuring the Trigger Polarity
367
Table 87. External Trigger for Regular Channels
367
Fast Conversion Mode
368
Table 88. External Trigger for Injected Channels
368
Managing a Sequence of Conversions Without Using the DMA
369
Data Management
369
Using the DMA
369
Conversions Without DMA and Without Overrun Detection
370
Multi ADC Mode
370
Figure 79. Multi ADC Block Diagram (1)
371
Injected Simultaneous Mode
373
Regular Simultaneous Mode
374
Figure 80. Injected Simultaneous Mode on 4 Channels: Dual ADC Mode
374
Figure 81. Injected Simultaneous Mode on 4 Channels: Triple ADC Mode
374
Interleaved Mode
375
Figure 82. Regular Simultaneous Mode on 16 Channels: Dual ADC Mode
375
Figure 83. Regular Simultaneous Mode on 16 Channels: Triple ADC Mode
375
Figure 84. Interleaved Mode on 1 Channel in Continuous Conversion Mode: Dual ADC Mode
376
Figure 85. Interleaved Mode on 1 Channel in Continuous Conversion Mode: Triple ADC Mode
377
Alternate Trigger Mode
377
Figure 86. Alternate Trigger: Injected Group of each ADC
378
Figure 87. Alternate Trigger: 4 Injected Channels (each ADC) in Discontinuous Mode
378
Combined Regular/Injected Simultaneous Mode
379
Combined Regular Simultaneous + Alternate Trigger Mode
379
Figure 88. Alternate Trigger: Injected Group of each ADC
379
Temperature Sensor
380
Figure 89. Alternate + Regular Simultaneous
380
Figure 90. Case of Trigger Occurring During Injected Conversion
380
Figure 91. Temperature Sensor and VREFINT Channel Block Diagram
381
Battery Charge Monitoring
382
ADC Interrupts
382
Table 89. ADC Interrupts
382
ADC Status Register (ADC_SR)
383
ADC Registers
383
ADC Control Register 1 (ADC_CR1)
384
ADC Control Register 2 (ADC_CR2)
386
ADC Sample Time Register 1 (ADC_SMPR1)
388
ADC Sample Time Register 2 (ADC_SMPR2)
388
ADC Injected Channel Data Offset Register X (Adc_Jofrx) (X=1
389
ADC Watchdog Higher Threshold Register (ADC_HTR)
389
ADC Watchdog Lower Threshold Register (ADC_LTR)
390
ADC Regular Sequence Register 1 (ADC_SQR1)
390
ADC Regular Sequence Register 2 (ADC_SQR2)
391
ADC Regular Sequence Register 3 (ADC_SQR3)
392
ADC Injected Sequence Register (ADC_JSQR)
393
ADC Injected Data Register X (Adc_Jdrx) (X= 1
393
ADC Regular Data Register (ADC_DR)
394
ADC Common Status Register (ADC_CSR)
394
ADC Common Control Register (ADC_CCR)
395
13.13.17 ADC Common Regular Data Register for Dual and Triple Modes
398
Table 91. ADC Register Map and Reset Values for each ADC
398
(Adc_Cdr)
398
13.13.18 ADC Register Map
398
Table 90. ADC Global Register Map
398
Table 92. ADC Register Map and Reset Values (Common ADC Registers)
400
Digital-To-Analog Converter (DAC)
401
DAC Introduction
401
DAC Main Features
401
DAC Functional Description
402
DAC Channel Enable
402
Table 93. DAC Pins
402
Figure 92. DAC Channel Block Diagram
402
Figure 93. DAC Output Buffer Connection
403
DAC Data Format
403
DAC Output Buffer Enable
403
Figure 94. Data Registers in Single DAC Channel Mode
404
Figure 95. Data Registers in Dual DAC Channel Mode
404
DAC Conversion
404
DAC Output Voltage
405
DAC Trigger Selection
405
Table 94. External Triggers
405
Figure 96. Timing Diagram for Conversion with Trigger Disabled TEN = 0
405
DMA Request
406
Noise Generation
406
Triangle-Wave Generation
407
Figure 97. DAC LFSR Register Calculation Algorithm
407
Figure 98. DAC Conversion (SW Trigger Enabled) with LFSR Wave Generation
407
Figure 100. DAC Conversion (SW Trigger Enabled) with Triangle Wave Generation
408
Dual DAC Channel Conversion
408
Figure 99. DAC Triangle Wave Generation
408
Independent Trigger Without Wave Generation
409
Independent Trigger with Different LFSR Generation
409
Independent Trigger with Single LFSR Generation
409
DAC_DHR12LD or DAC_DHR8RD)
410
Independent Trigger with Different Triangle Generation
410
Independent Trigger with Single Triangle Generation
410
Load the Dual DAC Channel Data into the Desired DHR Register
410
Set the Two DAC Channel Trigger Enable Bits TEN1 and TEN2
410
Simultaneous Software Start
410
TSEL2[2:0] Bits
410
Simultaneous Trigger with Different LFSR Generation
411
Simultaneous Trigger with Single LFSR Generation
411
Simultaneous Trigger Without Wave Generation
411
DAC_DHR12LD or DAC_DHR8RD)
412
Load the Dual DAC Channel Data into the Desired DHR Register
412
MAMP2[3:0], Is Added to the DHR2 Register and the Sum Is Transferred into DAC_DOR2
412
Simultaneous Trigger with Different Triangle Generation
412
Simultaneous Trigger with Single Triangle Generation
412
DAC Control Register (DAC_CR)
413
DAC Registers
413
DAC Channel1 12-Bit Right-Aligned Data Holding Register (DAC_DHR12R1)
416
DAC Software Trigger Register (DAC_SWTRIGR)
416
(Dac_Dhr12L1)
417
DAC Channel1 12-Bit Left Aligned Data Holding Register
417
DAC Channel1 8-Bit Right Aligned Data Holding Register (DAC_DHR8R1)
417
(Dac_Dhr12L2)
418
DAC Channel2 12-Bit Left Aligned Data Holding Register
418
DAC Channel2 12-Bit Right Aligned Data Holding Register (DAC_DHR12R2)
418
DAC Channel2 8-Bit Right-Aligned Data Holding Register (DAC_DHR8R2)
418
(Dac_Dhr12Ld)
419
DUAL DAC 12-Bit Left Aligned Data Holding Register
419
Dual DAC 12-Bit Right-Aligned Data Holding Register (DAC_DHR12RD)
419
(Dac_Dhr8Rd)
420
DAC Channel1 Data Output Register (DAC_DOR1)
420
DAC Channel2 Data Output Register (DAC_DOR2)
420
DUAL DAC 8-Bit Right Aligned Data Holding Register
420
DAC Status Register (DAC_SR)
421
DAC Register Map
422
Table 95. DAC Register Map
422
DCMI Clocks
423
DCMI Introduction
423
DCMI Main Features
423
Digital Camera Interface (DCMI)
423
DCMI Block Diagram
424
DCMI Functional Overview
424
Figure 101. DCMI Block Diagram
424
DCMI Physical Interface
425
DMA Interface
425
Figure 102. Top-Level Block Diagram
425
Table 96. DCMI External Signals
425
Figure 103. DCMI Signal Waveforms
426
Table 97. Positioning of Captured Data Bytes in 32-Bit Words (8-Bit Width)
426
Table 98. Positioning of Captured Data Bytes in 32-Bit Words (10-Bit Width)
426
Synchronization
427
Table 100. Positioning of Captured Data Bytes in 32-Bit Words (14-Bit Width)
427
Table 99. Positioning of Captured Data Bytes in 32-Bit Words (12-Bit Width)
427
Figure 104. Timing Diagram
428
Capture Modes
430
Figure 105. Frame Capture Waveforms in Snapshot Mode
430
Crop Feature
431
Figure 106. Frame Capture Waveforms in Continuous Grab Mode
431
Figure 107. Coordinates and Size of the Window after Cropping
431
Fifo
432
Figure 108. Data Capture Waveforms
432
JPEG Format
432
Data Format Description
433
Data Formats
433
Figure 109. Pixel Raster Scan Order
433
Monochrome Format
433
Table 101. Data Storage in Monochrome Progressive Video Format
433
RGB Format
434
Table 102. Data Storage in RGB Progressive Video Format
434
Table 103. Data Storage in Ycbcr Progressive Video Format
434
Ycbcr Format
434
Ycbcr Format - y Only
434
DCMI Control Register (DCMI_CR)
435
DCMI Interrupts
435
DCMI Register Description
435
Half Resolution Image Extraction
435
Table 104. Data Storage in Ycbcr Progressive Video Format - y Extraction Mode
435
Table 105. DCMI Interrupts
435
DCMI Status Register (DCMI_SR)
439
DCMI Raw Interrupt Status Register (DCMI_RIS)
440
DCMI Interrupt Enable Register (DCMI_IER)
441
DCMI Masked Interrupt Status Register (DCMI_MIS)
442
DCMI Interrupt Clear Register (DCMI_ICR)
443
DCMI Embedded Synchronization Code Register (DCMI_ESCR)
444
DCMI Embedded Synchronization Unmask Register (DCMI_ESUR)
445
DCMI Crop Window Size (DCMI_CWSIZE)
446
DCMI Crop Window Start (DCMI_CWSTRT)
446
DCMI Data Register (DCMI_DR)
447
DCMI Register Map
448
Table 106. DCMI Register Map and Reset Values
448
Advanced-Control Timers (TIM1&TIM8)
449
TIM1&TIM8 Introduction
449
TIM1&TIM8 Main Features
449
Figure 110. Advanced-Control Timer Block Diagram
450
TIM1&TIM8 Functional Description
451
Time-Base Unit
451
Figure 111. Counter Timing Diagram with Prescaler Division Change from 1 to 2
452
Figure 112. Counter Timing Diagram with Prescaler Division Change from 1 to 4
452
Counter Modes
453
Figure 113. Counter Timing Diagram, Internal Clock Divided by 1
453
Figure 114. Counter Timing Diagram, Internal Clock Divided by 2
454
Figure 115. Counter Timing Diagram, Internal Clock Divided by 4
454
Figure 116. Counter Timing Diagram, Internal Clock Divided by N
454
Figure 117. Counter Timing Diagram, Update Event When ARPE=0
455
Figure 118. Counter Timing Diagram, Update Event When ARPE=1
455
Figure 119. Counter Timing Diagram, Internal Clock Divided by 1
457
Figure 120. Counter Timing Diagram, Internal Clock Divided by 2
457
Figure 121. Counter Timing Diagram, Internal Clock Divided by 4
458
Figure 122. Counter Timing Diagram, Internal Clock Divided by N
458
Figure 123. Counter Timing Diagram, Update Event When Repetition Counter Is Not Used
459
Figure 124. Counter Timing Diagram, Internal Clock Divided by 1, Timx_Arr = 0X6
460
Figure 125. Counter Timing Diagram, Internal Clock Divided by 2
460
Figure 126. Counter Timing Diagram, Internal Clock Divided by 4, Timx_Arr=0X36
461
Figure 127. Counter Timing Diagram, Internal Clock Divided by N
461
Figure 128. Counter Timing Diagram, Update Event with ARPE=1 (Counter Underflow)
462
Figure 129. Counter Timing Diagram, Update Event with ARPE=1 (Counter Overflow)
462
Repetition Counter
462
Figure 130. Update Rate Examples Depending on Mode and Timx_Rcr Register Settings
464
Clock Selection
465
Figure 131. Control Circuit in Normal Mode, Internal Clock Divided by 1
465
Figure 132. TI2 External Clock Connection Example
466
Figure 133. Control Circuit in External Clock Mode 1
467
Figure 134. External Trigger Input Block
467
Capture/Compare Channels
468
Figure 135. Control Circuit in External Clock Mode 2
468
Figure 136. Capture/Compare Channel (Example: Channel 1 Input Stage)
469
Figure 137. Capture/Compare Channel 1 Main Circuit
469
Figure 138. Output Stage of Capture/Compare Channel (Channels 1 to 3)
470
Figure 139. Output Stage of Capture/Compare Channel (Channel 4)
470
Input Capture Mode
471
Figure 140. PWM Input Mode Timing
472
Forced Output Mode
472
PWM Input Mode
472
Output Compare Mode
473
Figure 141. Output Compare Mode, Toggle on OC1
474
PWM Mode
474
Figure 142. Edge-Aligned PWM Waveforms (ARR=8)
475
Figure 143. Center-Aligned PWM Waveforms (ARR=8)
476
Complementary Outputs and Dead-Time Insertion
477
Figure 144. Complementary Output with Dead-Time Insertion
478
Figure 145. Dead-Time Waveforms with Delay Greater than the Negative Pulse
478
Figure 146. Dead-Time Waveforms with Delay Greater than the Positive Pulse
478
Using the Break Function
479
Figure 147. Output Behavior in Response to a Break
481
Clearing the Ocxref Signal on an External Event
482
Figure 148. Clearing Timx Ocxref
482
6-Step PWM Generation
483
Figure 149. 6-Step Generation, COM Example (OSSR=1)
483
Figure 150. Example of One Pulse Mode
484
One-Pulse Mode
484
Encoder Interface Mode
485
Table 107. Counting Direction Versus Encoder Signals
486
Figure 151. Example of Counter Operation in Encoder Interface Mode
487
Figure 152. Example of Encoder Interface Mode with TI1FP1 Polarity Inverted
487
Interfacing with Hall Sensors
488
Timer Input XOR Function
488
Figure 153. Example of Hall Sensor Interface
489
Figure 154. Control Circuit in Reset Mode
490
Timx and External Trigger Synchronization
490
Figure 155. Control Circuit in Gated Mode
491
Figure 156. Control Circuit in Trigger Mode
492
Debug Mode
493
Figure 157. Control Circuit in External Clock Mode 2 + Trigger Mode
493
Timer Synchronization
493
TIM1&TIM8 Control Register 1 (Timx_Cr1)
494
TIM1&TIM8 Registers
494
TIM1&TIM8 Control Register 2 (Timx_Cr2)
495
TIM1&TIM8 Slave Mode Control Register (Timx_Smcr)
497
Table 108. Timx Internal Trigger Connection
499
TIM1&TIM8 Dma/Interrupt Enable Register (Timx_Dier)
499
TIM1&TIM8 Status Register (Timx_Sr)
501
TIM1&TIM8 Event Generation Register (Timx_Egr)
502
TIM1&TIM8 Capture/Compare Mode Register 1 (Timx_Ccmr1)
504
TIM1&TIM8 Capture/Compare Mode Register 2 (Timx_Ccmr2)
507
TIM1&TIM8 Capture/Compare Enable Register (Timx_Ccer)
508
Table 109. Output Control Bits for Complementary Ocx and Ocxn Channels
511
TIM1&TIM8 Auto-Reload Register (Timx_Arr)
512
TIM1&TIM8 Counter (Timx_Cnt)
512
TIM1&TIM8 Prescaler (Timx_Psc)
512
TIM1&TIM8 Capture/Compare Register 1 (Timx_Ccr1)
513
TIM1&TIM8 Repetition Counter Register (Timx_Rcr)
513
TIM1&TIM8 Capture/Compare Register 2 (Timx_Ccr2)
514
TIM1&TIM8 Capture/Compare Register 3 (Timx_Ccr3)
514
TIM1&TIM8 Break and Dead-Time Register (Timx_Bdtr)
515
TIM1&TIM8 Capture/Compare Register 4 (Timx_Ccr4)
515
TIM1&TIM8 DMA Control Register (Timx_Dcr)
517
TIM1&TIM8 DMA Address for Full Transfer (Timx_Dmar)
518
Table 110. TIM1&TIM8 Register Map and Reset Values
519
TIM1&TIM8 Register Map
519
General-Purpose Timers (TIM2 to TIM5)
521
TIM2 to TIM5 Introduction
521
TIM2 to TIM5 Main Features
521
Figure 158. General-Purpose Timer Block Diagram
522
TIM2 to TIM5 Functional Description
522
Time-Base Unit
522
Figure 159. Counter Timing Diagram with Prescaler Division Change from 1 to 2
523
Counter Modes
524
Figure 160. Counter Timing Diagram with Prescaler Division Change from 1 to 4
524
Figure 161. Counter Timing Diagram, Internal Clock Divided by 1
525
Figure 162. Counter Timing Diagram, Internal Clock Divided by 2
525
Figure 163. Counter Timing Diagram, Internal Clock Divided by 4
525
Figure 164. Counter Timing Diagram, Internal Clock Divided by N
526
Figure 165. Counter Timing Diagram, Update Event When ARPE=0 (Timx_Arr Not Preloaded)
526
Figure 166. Counter Timing Diagram, Update Event When ARPE=1 (Timx_Arr Preloaded)
527
Figure 167. Counter Timing Diagram, Internal Clock Divided by 1
528
Figure 168. Counter Timing Diagram, Internal Clock Divided by 2
528
Figure 169. Counter Timing Diagram, Internal Clock Divided by 4
528
Figure 170. Counter Timing Diagram, Internal Clock Divided by N
529
Figure 171. Counter Timing Diagram, Update Event
529
Figure 172. Counter Timing Diagram, Internal Clock Divided by 1, Timx_Arr=0X6
530
Figure 173. Counter Timing Diagram, Internal Clock Divided by 2
531
Figure 174. Counter Timing Diagram, Internal Clock Divided by 4, Timx_Arr=0X36
531
Figure 175. Counter Timing Diagram, Internal Clock Divided by N
531
Figure 176. Counter Timing Diagram, Update Event with ARPE=1 (Counter Underflow)
532
Figure 177. Counter Timing Diagram, Update Event with ARPE=1 (Counter Overflow)
532
Clock Selection
533
Figure 178
533
Figure 178. Control Circuit in Normal Mode, Internal Clock Divided by 1
533
For more Details
533
Internal Clock Source (CK_INT)
533
Without Prescaler
533
Figure 179. TI2 External Clock Connection Example
534
Figure 180. Control Circuit in External Clock Mode 1
535
Figure 181. External Trigger Input Block
535
Capture/Compare Channels
536
Figure 182. Control Circuit in External Clock Mode 2
536
Figure 183. Capture/Compare Channel (Example: Channel 1 Input Stage)
537
Figure 184. Capture/Compare Channel 1 Main Circuit
537
Figure 185. Output Stage of Capture/Compare Channel (Channel 1)
538
Input Capture Mode
538
PWM Input Mode
539
Figure 186. PWM Input Mode Timing
540
Forced Output Mode
540
Output Compare Mode
541
Figure 187. Output Compare Mode, Toggle on OC1
542
PWM Mode
542
Figure 188. Edge-Aligned PWM Waveforms (ARR=8)
543
Figure 189. Center-Aligned PWM Waveforms (ARR=8)
544
Figure 190. Example of One-Pulse Mode
545
One-Pulse Mode
545
Clearing the Ocxref Signal on an External Event
546
Encoder Interface Mode
547
Figure 191. Clearing Timx Ocxref
547
Table 111. Counting Direction Versus Encoder Signals
548
Figure 192. Example of Counter Operation in Encoder Interface Mode
549
Figure 193. Example of Encoder Interface Mode with TI1FP1 Polarity Inverted
549
Figure 194. Control Circuit in Reset Mode
550
Timer Input XOR Function
550
Timers and External Trigger Synchronization
550
Figure 195. Control Circuit in Gated Mode
551
Figure 196. Control Circuit in Trigger Mode
552
Figure 197. Control Circuit in External Clock Mode 2 + Trigger Mode
553
Figure 198. Master/Slave Timer Example
553
Timer Synchronization
553
Figure 199. Gating Timer 2 with OC1REF of Timer 1
554
Figure 200. Gating Timer 2 with Enable of Timer 1
555
Figure 201. Triggering Timer 2 with Update of Timer 1
556
Figure 202. Triggering Timer 2 with Enable of Timer 1
557
Debug Mode
558
Figure 203. Triggering Timer 1 and 2 with Timer 1 TI1 Input
558
TIM2 to TIM5 Registers
559
Timx Control Register 1 (Timx_Cr1)
559
Timx Control Register 2 (Timx_Cr2)
561
Timx Slave Mode Control Register (Timx_Smcr)
562
Table 112. Timx Internal Trigger Connections
563
Timx Dma/Interrupt Enable Register (Timx_Dier)
564
Timx Status Register (Timx_Sr)
565
Timx Event Generation Register (Timx_Egr)
567
Timx Capture/Compare Mode Register 1 (Timx_Ccmr1)
568
Timx Capture/Compare Mode Register 2 (Timx_Ccmr2)
571
Timx Capture/Compare Enable Register (Timx_Ccer)
572
Table 113. Output Control Bit for Standard Ocx Channels
573
Timx Auto-Reload Register (Timx_Arr)
574
Timx Counter (Timx_Cnt)
574
Timx Prescaler (Timx_Psc)
574
Timx Capture/Compare Register 1 (Timx_Ccr1)
575
Timx Capture/Compare Register 2 (Timx_Ccr2)
575
Timx Capture/Compare Register 3 (Timx_Ccr3)
576
Timx Capture/Compare Register 4 (Timx_Ccr4)
576
Timx DMA Address for Full Transfer (Timx_Dmar)
577
Timx DMA Control Register (Timx_Dcr)
577
TIM2 Option Register (TIM2_OR)
578
TIM5 Option Register (TIM5_OR)
579
Table 114. TIM2 to TIM5 Register Map and Reset Values
580
Timx Register Map
580
General-Purpose Timers (TIM9 to TIM14)
582
TIM9 to TIM14 Introduction
582
TIM9 to TIM14 Main Features
582
TIM9/TIM12 Main Features
582
Auto-Reload Register (Timx_Arr)
583
Figure 204. General-Purpose Timer Block Diagram (TIM9 and TIM12)
583
TIM10/TIM11 and TIM13/TIM14 Main Features
583
Figure 205. General-Purpose Timer Block Diagram (TIM10/11/13/14)
584
Counter Enable Bit (CEN) in Timx_Cr1 Register Is Set (Refer also to the Slave Mode Controller
585
Description to Get more Details on Counter Enabling)
585
Give some Examples of the Counter Behavior When the Prescaler
585
Prescaler Description
585
Ratio Is Changed on the Fly
585
TIM9 to TIM14 Functional Description
585
Time-Base Unit
585
Figure 206. Counter Timing Diagram with Prescaler Division Change from 1 to 2
586
Figure 207. Counter Timing Diagram with Prescaler Division Change from 1 to 4
586
Counter Modes
587
Figure 208. Counter Timing Diagram, Internal Clock Divided by 1
587
Figure 209. Counter Timing Diagram, Internal Clock Divided by 2
588
Figure 210. Counter Timing Diagram, Internal Clock Divided by 4
588
Figure 211. Counter Timing Diagram, Internal Clock Divided by N
588
Figure 212. Counter Timing Diagram, Update Event When ARPE=0
589
Figure 213. Counter Timing Diagram, Update Event When ARPE=1
589
Clock Selection
590
Figure 214. Control Circuit in Normal Mode, Internal Clock Divided by 1
590
Figure 215. TI2 External Clock Connection Example
591
Figure 216. Control Circuit in External Clock Mode 1
591
Capture/Compare Channels
592
Figure 217. Capture/Compare Channel (Example: Channel 1 Input Stage)
592
Figure 218. Capture/Compare Channel 1 Main Circuit
593
Figure 219. Output Stage of Capture/Compare Channel (Channel 1)
593
Input Capture Mode
593
PWM Input Mode (Only for TIM9/12)
594
Figure 220. PWM Input Mode Timing
595
Forced Output Mode
595
Output Compare Mode
596
Figure 221. Output Compare Mode, Toggle on OC1
597
PWM Mode
597
Figure 222. Edge-Aligned PWM Waveforms (ARR=8)
598
One-Pulse Mode
598
Figure 223. Example of One Pulse Mode
599
TIM9/12 External Trigger Synchronization
600
Figure 224. Control Circuit in Reset Mode
601
Figure 225. Control Circuit in Gated Mode
602
Figure 226. Control Circuit in Trigger Mode
602
Debug Mode
603
TIM9 and TIM12 Registers
603
TIM9/12 Control Register 1 (Timx_Cr1)
603
Timer Synchronization (TIM9/12)
603
TIM9/12 Slave Mode Control Register (Timx_Smcr)
605
Table 115. Timx Internal Trigger Connections
606
TIM9/12 Interrupt Enable Register (Timx_Dier)
606
TIM9/12 Status Register (Timx_Sr)
607
TIM9/12 Event Generation Register (Timx_Egr)
608
TIM9/12 Capture/Compare Mode Register 1 (Timx_Ccmr1)
609
TIM9/12 Capture/Compare Enable Register (Timx_Ccer)
612
Table 116. Output Control Bit for Standard Ocx Channels
613
TIM9/12 Auto-Reload Register (Timx_Arr)
613
TIM9/12 Counter (Timx_Cnt)
613
TIM9/12 Prescaler (Timx_Psc)
613
TIM9/12 Capture/Compare Register 1 (Timx_Ccr1)
614
TIM9/12 Capture/Compare Register 2 (Timx_Ccr2)
614
Table 117. TIM9/12 Register Map and Reset Values
615
TIM9/12 Register Map
615
TIM10/11/13/14 Control Register 1 (Timx_Cr1)
617
TIM10/11/13/14 Registers
617
TIM10/11/13/14 Interrupt Enable Register (Timx_Dier)
618
TIM10/11/13/14 Status Register (Timx_Sr)
618
TIM10/11/13/14 Event Generation Register (Timx_Egr)
619
(Timx_Ccmr1)
620
TIM10/11/13/14 Capture/Compare Mode Register 1
620
(Timx_Ccer)
623
Table 118. Output Control Bit for Standard Ocx Channels
623
TIM10/11/13/14 Capture/Compare Enable Register
623
TIM10/11/13/14 Auto-Reload Register (Timx_Arr)
624
TIM10/11/13/14 Counter (Timx_Cnt)
624
TIM10/11/13/14 Prescaler (Timx_Psc)
624
TIM10/11/13/14 Capture/Compare Register 1 (Timx_Ccr1)
625
TIM11 Option Register 1 (TIM11_OR)
625
Table 119. TIM10/11/13/14 Register Map and Reset Values
626
TIM10/11/13/14 Register Map
626
Basic Timers (TIM6&TIM7)
628
Figure 227. Basic Timer Block Diagram
628
TIM6&TIM7 Introduction
628
TIM6&TIM7 Main Features
628
TIM6&TIM7 Functional Description
629
Time-Base Unit
629
Figure 228. Counter Timing Diagram with Prescaler Division Change from 1 to 2
630
Figure 229. Counter Timing Diagram with Prescaler Division Change from 1 to 4
630
Counting Mode
631
Figure 230. Counter Timing Diagram, Internal Clock Divided by 1
631
Figure 231. Counter Timing Diagram, Internal Clock Divided by 2
632
Figure 232. Counter Timing Diagram, Internal Clock Divided by 4
632
Figure 233. Counter Timing Diagram, Internal Clock Divided by N
632
Clock Source
633
Figure 234. Counter Timing Diagram, Update Event When ARPE = 0
633
Figure 235. Counter Timing Diagram, Update Event When ARPE=1
633
Debug Mode
634
Figure 236. Control Circuit in Normal Mode, Internal Clock Divided by 1
634
TIM6&TIM7 Control Register 1 (Timx_Cr1)
634
TIM6&TIM7 Registers
634
TIM6&TIM7 Control Register 2 (Timx_Cr2)
636
TIM6&TIM7 Dma/Interrupt Enable Register (Timx_Dier)
636
TIM6&TIM7 Counter (Timx_Cnt)
637
TIM6&TIM7 Event Generation Register (Timx_Egr)
637
TIM6&TIM7 Status Register (Timx_Sr)
637
TIM6&TIM7 Auto-Reload Register (Timx_Arr)
638
TIM6&TIM7 Prescaler (Timx_Psc)
638
Table 120. TIM6&TIM7 Register Map and Reset Values
639
TIM6&TIM7 Register Map
639
Hardware Watchdog
640
Independent Watchdog (IWDG)
640
IWDG Functional Description
640
IWDG Introduction
640
IWDG Main Features
640
Register Access Protection
640
Debug Mode
641
Figure 237. Independent Watchdog Block Diagram
641
Table 121. Min/Max IWDG Timeout Period at 32 Khz (LSI)
641
IWDG Registers
642
Key Register (IWDG_KR)
642
Prescaler Register (IWDG_PR)
643
Reload Register (IWDG_RLR)
644
Status Register (IWDG_SR)
644
IWDG Register Map
645
Table 122. IWDG Register Map and Reset Values
645
Window Watchdog (WWDG)
646
WWDG Functional Description
646
WWDG Introduction
646
WWDG Main Features
646
Figure 238. Watchdog Block Diagram
647
Figure 239. Window Watchdog Timing Diagram
648
How to Program the Watchdog Timeout
648
Debug Mode
649
Control Register (WWDG_CR)
650
WWDG Registers
650
Configuration Register (WWDG_CFR)
651
Status Register (WWDG_SR)
651
Table 123. WWDG Register Map and Reset Values
652
WWDG Register Map
652
Introduction
653
Real-Time Clock (RTC)
653
RTC Main Features
653
Clock and Prescalers
655
Figure 240. RTC Block Diagram
655
Real-Time Clock and Calendar
655
RTC Functional Description
655
Periodic Auto-Wakeup
656
Programmable Alarms
656
RTC Initialization and Configuration
657
Reading the Calendar
659
Resetting the RTC
660
RTC Synchronization
660
RTC Coarse Digital Calibration
661
RTC Reference Clock Detection
661
RTC Smooth Digital Calibration
662
Timestamp Function
664
Tamper Detection
665
Alarm Output
667
Calibration Clock Output
667
RTC and Low Power Modes
668
RTC Interrupts
668
Table 124. Effect of Low Power Modes on RTC
668
Table 125. Interrupt Control Bits
669
RTC Registers
670
RTC Time Register (RTC_TR)
670
RTC Date Register (RTC_DR)
671
RTC Control Register (RTC_CR)
672
RTC Initialization and Status Register (RTC_ISR)
674
RTC Prescaler Register (RTC_PRER)
676
RTC Calibration Register (RTC_CALIBR)
677
RTC Wakeup Timer Register (RTC_WUTR)
677
RTC Alarm a Register (RTC_ALRMAR)
679
RTC Alarm B Register (RTC_ALRMBR)
680
RTC Sub Second Register (RTC_SSR)
681
RTC Write Protection Register (RTC_WPR)
681
RTC Shift Control Register (RTC_SHIFTR)
682
RTC Time Stamp Date Register (RTC_TSDR)
683
RTC Time Stamp Time Register (RTC_TSTR)
683
RTC Calibration Register (RTC_CALR)
684
RTC Timestamp Sub Second Register (RTC_TSSSR)
684
(Rtc_Tafcr)
685
RTC Tamper and Alternate Function Configuration Register
685
RTC Alarm a Sub Second Register (RTC_ALRMASSR)
687
RTC Alarm B Sub Second Register (RTC_ALRMBSSR)
688
RTC Backup Registers (Rtc_Bkpxr)
689
RTC Register Map
690
Table 126. RTC Register Map and Reset Values
690
Fast-Mode Plus Inter-Integrated Circuit (FMPI2C) Interface
692
FMPI2C Main Features
692
Introduction
692
FMPI2C Functional Description
693
FMPI2C Implementation
693
Table 127. Stm32F446Xx FMPI2C Implementation
693
Figure 241. FMPI2C Block Diagram
694
FMPI2C Block Diagram
694
FMPI2C Clock Requirements
695
Mode Selection
695
Figure 242. I2C Bus Protocol
696
FMPI2C Initialization
696
Figure 243. Setup and Hold Timings
697
Table 128. I2C-SMBUS Specification Data Setup and Hold Times
698
Figure 244. FMPI2C Initialization Flowchart
700
Software Reset
700
Data Transfer
701
Figure 245. Data Reception
701
Figure 246. Data Transmission
702
FMPI2C Slave Mode
703
Table 129. FMPI2C Configuration
703
Figure 247. Slave Initialization Flowchart
705
Figure 248. Transfer Sequence Flowchart for FMPI2C Slave Transmitter, NOSTRETCH=0
707
Figure 249. Transfer Sequence Flowchart for FMPI2C Slave Transmitter, NOSTRETCH=1
708
Figure 250. Transfer Bus Diagrams for FMPI2C Slave Transmitter
709
Figure 251. Transfer Sequence Flowchart for Slave Receiver with NOSTRETCH=0
710
Figure 252. Transfer Sequence Flowchart for Slave Receiver with NOSTRETCH=1
711
Figure 253. Transfer Bus Diagrams for FMPI2C Slave Receiver
711
FMPI2C Master Mode
712
Figure 254. Master Clock Generation
713
Table 130. I2C-SMBUS Specification Clock Timings
714
Figure 255. Master Initialization Flowchart
715
Figure 256. 10-Bit Address Read Access with HEAD10R=0
715
Figure 257. 10-Bit Address Read Access with HEAD10R=1
716
Figure 258. Transfer Sequence Flowchart for FMPI2C Master Transmitter for N≤255 Bytes
717
Figure 259. Transfer Sequence Flowchart for FMPI2C Master Transmitter for N>255 Bytes
718
Figure 260. Transfer Bus Diagrams for FMPI2C Master Transmitter
719
Figure 261. Transfer Sequence Flowchart for FMPI2C Master Receiver for N≤255 Bytes
721
Figure 262. Transfer Sequence Flowchart for FMPI2C Master Receiver for N >255 Bytes
722
Figure 263. Transfer Bus Diagrams for FMPI2C Master Receiver
723
FMPI2C_TIMINGR Register Configuration Examples
724
Table 131. Examples of Timing Settings for Fi2Cclk = 8 Mhz
724
Table 132. Examples of Timings Settings for Fi2Cclk = 16 Mhz
724
Smbus Specific Features
725
Figure 264. Timeout Intervals for T
727
Table 133. Smbus Timeout Specifications
727
Smbus Initialization
728
Table 134. SMBUS with PEC Configuration
729
Table 135. Examples of TIMEOUTA Settings for Various FMPI2CCLK Frequencies
729
Smbus Slave Mode
730
Smbus: FMPI2C_TIMEOUTR Register Configuration Examples
730
Table 136. Examples of TIMEOUTB Settings for Various FMPI2CCLK Frequencies
730
Table 137. Examples of TIMEOUTA Settings for Various FMPI2CCLK Frequencies (Max T IDLE = 50 Μs)
730
Figure 265. Transfer Sequence Flowchart for Smbus Slave Transmitter N Bytes + PEC
731
Figure 266. Transfer Bus Diagrams for Smbus Slave Transmitter (SBC=1)
732
Figure 267. Transfer Sequence Flowchart for Smbus Slave Receiver N Bytes + PEC
733
Figure 268. Bus Transfer Diagrams for Smbus Slave Receiver (SBC=1)
734
Figure 269. Bus Transfer Diagrams for Smbus Master Transmitter
735
Error Conditions
737
Figure 270. Bus Transfer Diagrams for Smbus Master Receiver
737
DMA Requests
739
Debug Mode
740
FMPI2C Low-Power Modes
740
Table 138. Low-Power Modes
740
Figure 271. FMPI2C Interrupt Mapping Diagram
741
FMPI2C Interrupts
741
Table 139. FMPI2C Interrupt Requests
741
Control Register 1 (FMPI2C_CR1)
742
FMPI2C Registers
742
Control Register 2 (FMPI2C_CR2)
745
Own Address 1 Register (FMPI2C_OAR1)
748
Own Address 2 Register (FMPI2C_OAR2)
749
Timing Register (FMPI2C_TIMINGR)
750
Timeout Register (FMPI2C_TIMEOUTR)
751
Interrupt and Status Register (FMPI2C_ISR)
752
Interrupt Clear Register (FMPI2C_ICR)
754
PEC Register (FMPI2C_PECR)
755
Receive Data Register (FMPI2C_RXDR)
756
Transmit Data Register (FMPI2C_TXDR)
756
FMPI2C Register Map
757
Table 140. FMPI2C Register Map and Reset Values
757
I 2 C Introduction
759
Inter-Integrated Circuit (I 2 C) Interface
759
I 2 C Main Features
760
C Functional Description
761
Figure 272. I2C Bus Protocol
761
Mode Selection
761
Figure 273. I2C Block Diagram
762
I2C Slave Mode
762
Figure 274. Transfer Sequence Diagram for Slave Transmitter
764
Figure 275. Transfer Sequence Diagram for Slave Receiver
765
I2C Master Mode
765
Figure 276. Transfer Sequence Diagram for Master Transmitter
768
Figure 277. Transfer Sequence Diagram for Master Receiver
770
Error Conditions
771
Programmable Noise Filter
772
Table 141. Maximum DNF[3:0] Value to be Compliant with Thd:dat(Max)
772
SDA/SCL Line Control
773
Smbus
773
Table 142. Smbus Vs. I2C
774
DMA Requests
776
Packet Error Checking
777
I 2 C Interrupts
778
Table 143. I2C Interrupt Requests
778
Figure 278. I2C Interrupt Mapping Diagram
779
C Registers
780
I 2 C Control Register 1 (I2C_CR1)
780
I 2 C Debug Mode
780
I 2 C Control Register 2 (I2C_CR2)
782
I 2 C Own Address Register 1 (I2C_OAR1)
784
I 2 C Own Address Register 2 (I2C_OAR2)
784
C Data Register (I2C_DR)
785
C Status Register 1 (I2C_SR1)
785
I 2 C Status Register 2 (I2C_SR2)
789
I 2 C Clock Control Register (I2C_CCR)
790
C TRISE Register (I2C_TRISE)
791
I 2 C FLTR Register (I2C_FLTR)
792
I2C Register Map
793
Table 144. I2C Register Map and Reset Values
793
Transmitter (USART)
794
Universal Synchronous Asynchronous Receiver
794
USART Introduction
794
USART Main Features
795
Table 145. USART Features
796
USART Functional Description
796
USART Implementation
796
Figure 279. USART Block Diagram
798
Figure 280. Word Length Programming
799
USART Character Description
799
Transmitter
800
Figure 281. Configurable Stop Bits
801
Figure 282. TC/TXE Behavior When Transmitting
802
Figure 283. Start Bit Detection When Oversampling by 16 or 8
803
Receiver
803
Figure 284. Data Sampling When Oversampling by 16
806
Figure 285. Data Sampling When Oversampling by 8
807
Table 146. Noise Detection from Sampled Data
807
Fractional Baud Rate Generation
808
Table 147. Error Calculation for Programmed Baud Rates at F
810
Table 157. USART Receiver Tolerance When DIV Fraction Is 0
817
USART Receiver Tolerance to Clock Deviation
817
Multiprocessor Communication
818
Table 158. USART Receiver Tolerance When Div_Fraction Is Different from 0
818
Figure 286. Mute Mode Using Idle Line Detection
819
Figure 287. Mute Mode Using Address Mark Detection
819
Parity Control
820
Table 159. Frame Formats
820
LIN (Local Interconnection Network) Mode
821
Figure 288. Break Detection in LIN Mode (11-Bit Break Length - LBDL Bit Is Set)
822
Figure 289. Break Detection in LIN Mode Vs. Framing Error Detection
823
USART Synchronous Mode
823
Figure 290. USART Example of Synchronous Transmission
824
Figure 291. USART Data Clock Timing Diagram (M=0)
824
Figure 292. USART Data Clock Timing Diagram (M=1)
825
Figure 293. RX Data Setup/Hold Time
825
Single-Wire Half-Duplex Communication
825
Figure 294. ISO 7816-3 Asynchronous Protocol
826
Smartcard
826
Figure 295. Parity Error Detection Using the 1.5 Stop Bits
827
Irda SIR ENDEC Block
828
Figure 296. Irda SIR ENDEC- Block Diagram
829
Figure 297. Irda Data Modulation (3/16) -Normal Mode
829
Continuous Communication Using DMA
830
Figure 298. Transmission Using DMA
831
Figure 299. Reception Using DMA
832
Figure 300. Hardware Flow Control between 2 Usarts
832
Hardware Flow Control
832
Figure 301. RTS Flow Control
833
Figure 302. CTS Flow Control
833
Table 160. USART Interrupt Requests
834
USART Interrupts
834
Figure 303. USART Interrupt Mapping Diagram
835
Status Register (USART_SR)
835
USART Registers
835
Baud Rate Register (USART_BRR)
838
Data Register (USART_DR)
838
Control Register 1 (USART_CR1)
839
Control Register 2 (USART_CR2)
841
Control Register 3 (USART_CR3)
842
Guard Time and Prescaler Register (USART_GTPR)
844
Table 161. USART Register Map and Reset Values
845
USART Register Map
845
Introduction
846
Serial Peripheral Interface/ Inter-IC Sound (SPI/I2S)
846
SPI Main Features
846
I2S Features
847
SPI Extended Features
847
SPI/I2S Implementation
847
Table 162. Stm32F446Xx SPI Implementation
847
Figure 304. SPI Block Diagram
848
General Description
848
SPI Functional Description
848
Communications between One Master and One Slave
849
Figure 305. Full-Duplex Single Master/ Single Slave Application
849
Figure 306. Half-Duplex Single Master/ Single Slave Application
850
Figure 307. Simplex Single Master/Single Slave Application
851
Figure 308. Master and Three Independent Slaves
852
Standard Multi-Slave Communication
852
Figure 309. Multi-Master Application
853
Multi-Master Communication
853
Slave Select (NSS) Pin Management
853
Figure 310. Hardware/Software Slave Select Management
854
Communication Formats
855
Figure 311. Data Clock Timing Diagram
856
Procedure for Enabling SPI
857
SPI Configuration
857
Data Transmission and Reception Procedures
858
Figure 312. TXE/RXNE/BSY Behavior in Master / Full-Duplex Mode (BIDIMODE=0, RXONLY=0) in the Case of Continuous Transfers
859
Figure 313. TXE/RXNE/BSY Behavior in Slave / Full-Duplex Mode (BIDIMODE=0, RXONLY=0) in the Case of Continuous Transfers
860
Procedure for Disabling the SPI
860
Communication Using DMA (Direct Memory Addressing)
861
Figure 314. Transmission Using DMA
862
Figure 315. Reception Using DMA
863
SPI Status Flags
863
SPI Error Flags
864
SPI Special Features
865
TI Mode
865
CRC Calculation
866
Figure 316. TI Mode Transfer
866
SPI Interrupts
868
Table 163. SPI Interrupt Requests
868
Figure 317. I 2 S Block Diagram
869
I 2 S Functional Description
869
I 2 S General Description
869
I2S Full-Duplex
870
Figure 318. Full-Duplex Communication
871
Supported Audio Protocols
871
Figure 319. I 2 S Philips Protocol Waveforms (16/32-Bit Full Accuracy, CPOL = 0)
872
Figure 320. I 2 S Philips Standard Waveforms (24-Bit Frame with CPOL = 0)
872
Figure 321. Transmitting 0X8Eaa33
873
Figure 322. Receiving 0X8Eaa33
873
Figure 323. I
873
Figure 324. Example of 16-Bit Data Frame Extended to 32-Bit Channel Frame
874
Figure 325. MSB Justified 16-Bit or 32-Bit Full-Accuracy Length with CPOL = 0
874
Figure 326. MSB Justified 24-Bit Frame Length with CPOL = 0
874
Figure 327. MSB Justified 16-Bit Extended to 32-Bit Packet Frame with CPOL = 0
875
Figure 328. LSB Justified 16-Bit or 32-Bit Full-Accuracy with CPOL = 0
875
Figure 329. LSB Justified 24-Bit Frame Length with CPOL = 0
875
Figure 330. Operations Required to Transmit 0X3478Ae
876
Figure 331. Operations Required to Receive 0X3478Ae
876
Figure 332. LSB Justified 16-Bit Extended to 32-Bit Packet Frame with CPOL = 0
876
Figure 333. Example of 16-Bit Data Frame Extended to 32-Bit Channel Frame
877
Figure 334. PCM Standard Waveforms (16-Bit)
877
Figure 335. PCM Standard Waveforms (16-Bit Extended to 32-Bit Packet Frame)
877
Clock Generator
878
Figure 336. Audio Sampling Frequency Definition
878
Figure 337. I
878
Table 164. Audio-Frequency Precision Using Standard 8 Mhz HSE
879
I 2 S Master Mode
880
I 2 S Slave Mode
882
I 2 S Status Flags
883
I 2 S Error Flags
884
DMA Features
885
I 2 S Interrupts
885
Table 165. I
885
SPI and I 2 S Registers
886
SPI Control Register 1 (SPI_CR1) (Not Used in I 2 S Mode)
886
SPI Control Register 2 (SPI_CR2)
888
SPI Status Register (SPI_SR)
889
Mode
891
SPI CRC Polynomial Register (SPI_CRCPR) (Not Used in I
891
SPI Data Register (SPI_DR)
891
SPI RX CRC Register (SPI_RXCRCR) (Not Used in I 2 S Mode)
892
SPI TX CRC Register (SPI_TXCRCR) (Not Used in I 2 S Mode)
892
SPI_I 2 S Configuration Register (SPI_I2SCFGR)
893
SPI_I 2 S Prescaler Register (SPI_I2SPR)
894
SPI Register Map
896
Table 166. SPI Register Map and Reset Values
896
SPDIF Receiver Interface (SPDIFRX)
897
SPDIFRX Functional Description
897
SPDIFRX Interface Introduction
897
SPDIFRX Main Features
897
Figure 338. SPDIFRX Block Diagram
898
Figure 339. S/PDIF Sub-Frame Format
898
S/PDIF Protocol (IEC-60958)
898
Figure 340. S/PDIF Block Format
899
Figure 341. S/PDIF Preambles
899
Figure 342. Channel Coding Example
900
SPDIFRX Decoder (SPDIFRX_DC)
900
Figure 343. SPDIFRX Decoder
901
Figure 344. Noise Filtering and Edge Detection
901
Figure 345. Thresholds
903
Table 167. Transition Sequence for Preamble
903
SPDIFRX Synchronization
904
SPDIFRX Tolerance to Clock Deviation
904
Figure 346. Synchronization Flowchart
905
Figure 347. Synchronization Process Scheduling
906
SPDIFRX Handling
906
Figure 348. SPDIFRX States
907
Data Reception Management
908
Figure 349. SPDIFRX_DR Register Format
909
Dedicated Control Flow
910
Figure 350. Channel/User Data Format
910
Reception Errors
910
Figure 351. S/PDIF Overrun Error When RXSTEO = 0
912
Clocking Strategy
913
DMA Interface
913
Figure 352. S/PDIF Overrun Error When RXSTEO = 1
913
Table 168. Minimum SPDIFRX_CLK Frequency Versus Audio Sampling Rate
913
Figure 353. SPDIFRX Interface Interrupt Mapping Diagram
914
Interrupt Generation
914
Programming Procedures
915
Register Protection
915
Table 169. Bit Field Property Versus SPDIFRX State
915
Initialization Phase
916
Handling of Interrupts Coming from DMA
917
Handling of Interrupts Coming from SPDIFRX
917
Control Register (SPDIFRX_CR)
918
SPDIFRX Interface Registers
918
Interrupt Mask Register (SPDIFRX_IMR)
920
Status Register (SPDIFRX_SR)
921
Interrupt Flag Clear Register (SPDIFRX
923
Data Input Register (SPDIFRX_DR)
924
Data Input Register (SPDIFRX_FMT1_DR)
925
Data Input Register (SPDIFRX_FMT2_DR)
926
Channel Status Register (SPDIFRX_CSR)
927
Debug Information Register (SPDIFRX_DIR)
927
SPDIFRX Interface Register Map
929
Table 170. SPDIFRX Interface Register Map and Reset Values
929
Introduction
930
Serial Audio Interface (SAI)
930
SAI Main Features
931
Figure 354. SAI Functional Block Diagram
932
SAI Block Diagram
932
SAI Functional Description
932
Main SAI Modes
933
SAI Pins and Internal Signals
933
Table 171. SAI Internal Input/Output Signals
933
Table 172. SAI Input/Output Pins
933
SAI Synchronization Mode
934
Audio Data Size
935
Table 173. External Synchronization Selection
935
Figure 355. Audio Frame
936
Frame Synchronization
936
Figure 356. FS Role Is Start of Frame + Channel Side Identification (FSDEF = TRIS = 1)
938
Figure 357. FS Role Is Start of Frame (FSDEF = 0)
939
Slot Configuration
939
Figure 358. Slot Size Configuration with FBOFF = 0 in Sai_Xslotr
940
Figure 359. First Bit Offset
940
Figure 360. Audio Block Clock Generator Overview
941
SAI Clock Generator
941
Table 174. Example of Possible Audio Frequency Sampling Range
942
Internal Fifos
943
AC'97 Link Controller
945
Figure 361. AC'97 Audio Frame
945
Figure 362. Example of Typical AC'97 Configuration on Devices Featuring at Least
946
Figure 363. SPDIF Format
947
SPDIF Output
947
Figure 364. Sai_Xdr Register Ordering
948
Table 175. SOPD Pattern
948
Table 176. Parity Bit Calculation
948
Table 177. Audio Sampling Frequency Versus Symbol Rates
949
Specific Features
950
Figure 365. Data Companding Hardware in an Audio Block in the SAI
951
Figure 366. Tristate Strategy on SD Output Line on an Inactive Slot
953
Error Flags
954
Figure 367. Tristate on Output Data Line in a Protocol Like I2S
954
Figure 368. Overrun Detection Error
955
Figure 369. FIFO Underrun Event
955
Disabling the SAI
957
SAI DMA Interface
957
SAI Interrupts
958
Table 178. SAI Interrupt Sources
958
Configuration Register 1 (SAI_ACR1 / SAI_BCR1)
959
Global Configuration Register (SAI_GCR)
959
SAI Registers
959
Configuration Register 2 (SAI_ACR2 / SAI_BCR2)
962
Frame Configuration Register (SAI_AFRCR / SAI_BFRCR)
964
Slot Register (SAI_ASLOTR / SAI_BSLOTR)
966
Interrupt Mask Register 2 (SAI_AIM / SAI_BIM)
967
Status Register (SAI_ASR / SAI_BSR)
968
Clear Flag Register (SAI_ACLRFR / SAI_BCLRFR)
970
Data Register (SAI_ADR / SAI_BDR)
971
SAI Register Map
973
Table 179. SAI Register Map and Reset Values
973
SDIO Bus Topology
974
SDIO Main Features
974
Secure Digital Input/Output Interface (SDIO)
974
Figure 370. "No Response" and "No Data" Operations
975
Figure 371. (Multiple) Block Read Operation
975
Figure 372. (Multiple) Block Write Operation
975
Figure 373. Sequential Read Operation
976
Figure 374. Sequential Write Operation
976
Figure 375. SDIO Block Diagram
976
SDIO Functional Description
976
Table 180. SDIO I/O Definitions
977
Figure 376. SDIO Adapter
978
SDIO Adapter
978
Figure 377. Control Unit
979
Figure 378. SDIO_CK Clock Dephasing (BYPASS = 0)
979
Figure 379. SDIO Adapter Command Path
980
Figure 380. Command Path State Machine (SDIO)
981
Figure 381. SDIO Command Transfer
982
Table 181. Command Format
982
Table 182. Short Response Format
983
Table 183. Long Response Format
983
Table 184. Command Path Status Flags
983
Figure 382. Data Path
984
Figure 383. Data Path State Machine (DPSM)
985
Table 185. Data Token Format
986
Table 186. DPSM Flags
987
Table 187. Transmit FIFO Status Flags
988
Table 188. Receive FIFO Status Flags
988
SDIO APB2 Interface
989
Card Functional Description
990
Card Identification Mode
990
Card Identification Process
991
Card Reset
991
Operating Voltage Range Validation
991
Block Write
992
Block Read
993
Stream Access, Stream Write and Stream Read (Multimediacard Only)
993
Erase: Group Erase and Sector Erase
995
Protection Management
995
Wide Bus Selection or Deselection
995
Card Status Register
999
Table 189. Card Status
999
SD Status Register
1002
Table 190. SD Status
1002
Table 191. Speed Class Code Field
1003
Table 192. Performance Move Field
1004
Table 193. AU_SIZE Field
1004
Table 194. Maximum AU Size
1004
Table 195. Erase Size Field
1005
Table 196. Erase Timeout Field
1005
Table 197. Erase Offset Field
1005
SD I/O Mode
1006
Commands and Responses
1007
Table 198. Block-Oriented Write Commands
1008
Table 199. Block-Oriented Write Protection Commands
1009
Table 200. Erase Commands
1009
Table 201. I/O Mode Commands
1009
Response Formats
1010
Table 202. Lock Card
1010
Table 203. Application-Specific Commands
1010
R1 (Normal Response Command)
1011
R1B
1011
R2 (CID, CSD Register)
1011
Table 204. R1 Response
1011
Table 205. R2 Response
1011
R3 (OCR Register)
1012
R4 (Fast I/O)
1012
R4B
1012
Table 206. R3 Response
1012
Table 207. R4 Response
1012
Table 208. R4B Response
1012
R5 (Interrupt Request)
1013
Table 209. R5 Response
1013
SDIO I/O Card-Specific Operations
1014
SDIO I/O Read Wait Operation by SDIO_D2 Signalling
1014
Table 210. R6 Response
1014
HW Flow Control
1015
SDIO Interrupts
1015
SDIO Read Wait Operation by Stopping SDIO_CK
1015
SDIO Suspend/Resume Operation
1015
SDIO Clock Control Register (SDIO_CLKCR)
1016
SDIO Power Control Register (SDIO_POWER)
1016
SDIO Registers
1016
SDIO Argument Register (SDIO_ARG)
1018
SDIO Command Register (SDIO_CMD)
1018
SDIO Command Response Register (SDIO_RESPCMD)
1019
SDIO Response 1
1019
SDIO Data Timer Register (SDIO_DTIMER)
1020
Table 211. Response Type and Sdio_Respx Registers
1020
SDIO Data Control Register (SDIO_DCTRL)
1021
SDIO Data Length Register (SDIO_DLEN)
1021
SDIO Data Counter Register (SDIO_DCOUNT)
1023
SDIO Status Register (SDIO_STA)
1023
SDIO Interrupt Clear Register (SDIO_ICR)
1024
SDIO Mask Register (SDIO_MASK)
1026
SDIO FIFO Counter Register (SDIO_FIFOCNT)
1028
SDIO Data FIFO Register (SDIO_FIFO)
1029
SDIO Register Map
1030
Table 212. SDIO Register Map
1030
Bxcan Main Features
1032
Controller Area Network (Bxcan)
1032
Introduction
1032
Bxcan General Description
1033
CAN 2.0B Active Core
1033
Control, Status and Configuration Registers
1033
Figure 384. CAN Network Topology
1033
Tx Mailboxes
1033
Acceptance Filters
1034
Figure 385. Dual-CAN Block Diagram
1034
Bxcan Operating Modes
1035
Initialization Mode
1035
Normal Mode
1035
Figure 386. Bxcan Operating Modes
1036
Sleep Mode (Low-Power)
1036
Figure 387. Bxcan in Silent Mode
1037
Figure 388. Bxcan in Loop Back Mode
1037
Loop Back Mode
1037
Silent Mode
1037
Test Mode
1037
Behavior in Debug Mode
1038
Bxcan Functional Description
1038
Figure 389. Bxcan in Combined Mode
1038
Loop Back Combined with Silent Mode
1038
Transmission Handling
1038
Figure 390. Transmit Mailbox States
1040
Reception Handling
1040
Time Triggered Communication Mode
1040
Figure 391. Receive FIFO States
1041
Identifier Filtering
1042
Figure 392. Filter Bank Scale Configuration - Register Organization
1044
Figure 393. Example of Filter Numbering
1045
Figure 394. Filtering Mechanism - Example
1046
Message Storage
1046
Figure 395. CAN Error State Diagram
1047
Table 213. Transmit Mailbox Mapping
1047
Table 214. Receive Mailbox Mapping
1047
Bit Timing
1048
Error Management
1048
Figure 396. Bit Timing
1049
Figure 397. CAN Frames
1050
Bxcan Interrupts
1051
Figure 398. Event Flags and Interrupt Generation
1051
CAN Control and Status Registers
1052
CAN Registers
1052
Register Access Protection
1052
CAN Mailbox Registers
1062
Figure 399. CAN Mailbox Registers
1063
CAN Filter Registers
1069
Bxcan Register Map
1073
Table 215. Bxcan Register Map and Reset Values
1073
Introduction
1077
USB On-The-Go Full-Speed/High-Speed (OTG_FS/OTG_HS)
1077
OTG Main Features
1078
Table 216. OTG_HS Speeds Supported
1078
Table 217. OTG_FS Speeds Supported
1078
General Features
1079
Host-Mode Features
1080
Peripheral-Mode Features
1080
OTG Implementation
1081
Table 218. OTG Implementation for Stm32F446Xx
1081
Figure 400. OTG Full-Speed Block Diagram
1082
OTG Block Diagram
1082
OTG Functional Description
1082
Figure 401. OTG High-Speed Block Diagram
1083
Table 219. OTG_FS Input/Output Pins
1083
Table 220. OTG_HS Input/Output Pins
1083
USB OTG Pin and Internal Signals
1083
Full-Speed OTG PHY
1084
OTG Core
1084
Table 221. OTG_FS/OTG_HS Input/Output Signals
1084
Embedded Full Speed OTG PHY
1085
Figure 402. OTG_FS A-B Device Connection
1086
High-Speed OTG PHY
1086
ID Line Detection
1086
OTG Dual Role Device (DRD)
1086
HNP Dual Role Device
1087
SRP Dual Role Device
1087
USB Peripheral
1087
Figure 403. USB_FS Peripheral-Only Connection
1088
Peripheral States
1088
SRP-Capable Peripheral
1088
Peripheral Endpoints
1089
USB Host
1091
Figure 404. USB_FS Host-Only Connection
1092
SRP-Capable Host
1092
USB Host States
1092
Host Channels
1094
Host Scheduler
1095
Figure 405. SOF Connectivity (SOF Trigger Output to TIM and ITR1 Connection)
1096
Host Sofs
1096
Peripheral Sofs
1096
SOF Trigger
1096
OTG Low-Power Modes
1097
Table 222. Compatibility of STM32 Low Power Modes with the OTG
1097
Dynamic Update of the OTG_HFIR Register
1098
Figure 406. Updating OTG_HFIR Dynamically (RLDCTRL = 0)
1098
USB Data Fifos
1098
Figure 407. Device-Mode FIFO Address Mapping and AHB FIFO Access Mapping
1099
Peripheral FIFO Architecture
1099
Figure 408. Host-Mode FIFO Address Mapping and AHB FIFO Access Mapping
1100
Host FIFO Architecture
1100
FIFO RAM Allocation
1101
OTG_FS System Performance
1103
OTG_FS/OTG_HS Interrupts
1103
Figure 409. Interrupt Hierarchy
1104
CSR Memory Map
1105
OTG_FS/OTG_HS Control and Status Registers
1105
Table 223. Core Global Control and Status Registers (Csrs)
1105
Table 224. Host-Mode Control and Status Registers (Csrs)
1106
Table 225. Device-Mode Control and Status Registers
1108
Table 226. Data FIFO (DFIFO) Access Register Map
1110
OTG Control and Status Register (OTG_GOTGCTL)
1111
OTG_FS/OTG_HS Registers
1111
Table 227. Power and Clock Gating Control and Status Registers
1111
OTG Interrupt Register (OTG_GOTGINT)
1114
OTG AHB Configuration Register (OTG_GAHBCFG)
1116
OTG USB Configuration Register (OTG_GUSBCFG)
1118
OTG Reset Register (OTG_GRSTCTL)
1121
Table 228. TRDT Values (FS)
1121
Table 229. TRDT Values (HS)
1121
OTG Core Interrupt Register (OTG_GINTSTS)
1124
OTG Interrupt Mask Register (OTG_GINTMSK)
1129
OTG Receive Status Debug Read/Otg Status Read and Pop Registers (OTG_GRXSTSR/OTG_GRXSTSP)
1132
(Otg_Dieptxf0)
1135
OTG Host Non-Periodic Transmit FIFO Size Register (Otg_Hnptxfsiz)/Endpoint 0 Transmit FIFO Size
1135
OTG Receive FIFO Size Register (OTG_GRXFSIZ)
1135
(Otg_Hnptxsts)
1136
OTG General Core Configuration Register (OTG_GCCFG)
1137
OTG Core ID Register (OTG_CID)
1138
OTG Core LPM Configuration Register (OTG_GLPMCFG)
1138
(Otg_Hptxfsiz)
1143
31.15.15 OTG Host Periodic Transmit FIFO Size Register
1143
FIFO Number)
1143
OTG Device in Endpoint Transmit FIFO Size Register (Otg_Dieptxfx)
1143
31.15.17 Host-Mode Registers
1144
OTG Host Configuration Register (OTG_HCFG)
1144
OTG Host Frame Interval Register (OTG_HFIR)
1145
(Otg_Hfnum)
1146
(Otg_Hptxsts)
1146
31.15.20 OTG Host Frame Number/Frame Time Remaining Register
1146
31.15.21 Otg_Host Periodic Transmit Fifo/Queue Status Register
1146
OTG Host All Channels Interrupt Register (OTG_HAINT)
1147
(Otg_Haintmsk)
1148
31.15.23 OTG Host All Channels Interrupt Mask Register
1148
OTG Host Port Control and Status Register (OTG_HPRT)
1149
(X = 0
1151
OTG Host Channel X Characteristics Register (Otg_Hccharx)
1151
(X = 0
1152
OTG Host Channel X Split Control Register (Otg_Hcspltx)
1152
(X = 0
1153
OTG Host Channel X Interrupt Register (Otg_Hcintx)
1153
(X = 0
1155
OTG Host Channel X Interrupt Mask Register (Otg_Hcintmskx)
1155
(X = 0
1156
OTG Host Channel X Transfer Size Register (Otg_Hctsizx)
1156
(X = 0
1157
31.15.31 Device-Mode Registers
1157
OTG Host Channel X DMA Address Register (Otg_Hcdmax)
1157
OTG Device Configuration Register (OTG_DCFG)
1158
OTG Device Control Register (OTG_DCTL)
1160
Table 230. Minimum Duration for Soft Disconnect
1161
OTG Device Status Register (OTG_DSTS)
1162
(Otg_Diepmsk)
1163
31.15.35 OTG Device in Endpoint Common Interrupt Mask Register
1163
(Otg_Doepmsk)
1164
31.15.36 OTG Device out Endpoint Common Interrupt Mask Register
1164
(Otg_Daintmsk)
1166
31.15.38 OTG All Endpoints Interrupt Mask Register
1166
OTG Device All Endpoints Interrupt Register (OTG_DAINT)
1166
(Otg_Dvbusdis)
1167
(Otg_Dvbuspulse)
1167
Bus
1167
BUS Discharge Time Register
1167
OTG Device
1167
OTG Device Threshold Control Register (OTG_DTHRCTL)
1168
(Otg_Diepempmsk)
1169
31.15.42 OTG Device in Endpoint FIFO Empty Interrupt Mask Register
1169
(Otg_Deachintmsk)
1170
31.15.44 OTG Device each Endpoint Interrupt Mask Register
1170
OTG Device each Endpoint Interrupt Register (OTG_DEACHINT)
1170
OTG Device each in Endpoint-1 Interrupt Mask Register (OTG_HS_DIEPEACHMSK1)
1171
OTG Device each out Endpoint-1 Interrupt Mask Register (OTG_HS_DOEPEACHMSK1)
1172
(Otg_Diepctl0)
1173
31.15.47 OTG Device Control in Endpoint 0 Control Register
1173
(X = 1
1175
OTG Device in Endpoint X Control Register (Otg_Diepctlx)
1175
(X = 0
1177
OTG Device in Endpoint X Interrupt Register (Otg_Diepintx)
1177
(Otg_Dieptsiz0)
1179
31.15.50 OTG Device in Endpoint 0 Transfer Size Register
1179
(X = 0
1180
Endpoint Number)
1180
OTG Device in Endpoint Transmit FIFO Status Register (Otg_Dtxfstsx)
1180
OTG Device in Endpoint X DMA Address Register (Otg_Diepdmax)
1180
(X = 1
1181
OTG Device in Endpoint X Transfer Size Register (Otg_Dieptsizx)
1181
(Otg_Doepctl0)
1182
31.15.54 OTG Device Control out Endpoint 0 Control Register
1182
(X = 0
1183
OTG Device out Endpoint X Interrupt Register (Otg_Doepintx)
1183
(Otg_Doeptsiz0)
1185
31.15.56 OTG Device out Endpoint 0 Transfer Size Register
1185
(X = 0
1186
OTG Device out Endpoint X DMA Address Register (Otg_Doepdmax)
1186
(X = 1
1187
OTG Device out Endpoint X Control Register (Otg_Doepctlx)
1187
OTG Device out Endpoint X Transfer Size Register (Otg_Doeptsizx) (X = 1
1189
OTG Power and Clock Gating Control Register (OTG_PCGCCTL)
1190
31.15.61 OTG_FS/OTG_HS Register Map
1191
Table 231. OTG_FS/OTG_HS Register Map and Reset Values
1191
Core Initialization
1203
Host Initialization
1203
OTG_FS/OTG_HS Programming Model
1203
Device Initialization
1204
DMA Mode
1205
Host Programming Model
1205
Figure 410. Transmit FIFO Write Task
1207
Figure 411. Receive FIFO Read Task
1208
Figure 412. Normal Bulk/Control OUT/SETUP
1210
Figure 413. Bulk/Control in Transactions
1214
Figure 414. Normal Interrupt out
1217
Figure 415. Normal Interrupt in
1222
Figure 416. Isochronous out Transactions
1224
Figure 417. Isochronous in Transactions
1227
Figure 418. Normal Bulk/Control OUT/SETUP Transactions - DMA
1229
Figure 419. Normal Bulk/Control in Transaction - DMA
1231
Figure 420. Normal Interrupt out Transactions - DMA Mode
1232
Figure 421. Normal Interrupt in Transactions - DMA Mode
1233
Figure 422. Normal Isochronous out Transaction - DMA Mode
1234
Figure 423. Normal Isochronous in Transactions - DMA Mode
1235
Device Programming Model
1238
Figure 424. Receive FIFO Packet Read
1241
Figure 425. Processing a SETUP Packet
1243
Figure 426. Bulk out Transaction
1249
Worst Case Response Time
1256
Figure 427. TRDT Max Timing Case
1258
OTG Programming Model
1258
Figure 428. A-Device SRP
1259
Figure 429. B-Device SRP
1260
Figure 430. A-Device HNP
1261
Figure 431. B-Device HNP
1263
HDMI-CEC Controller (HDMI-CEC)
1265
HDMI-CEC Controller Main Features
1265
Introduction
1265
Figure 432. HDMI-CEC Block Diagram
1266
HDMI-CEC Block Diagram
1266
HDMI-CEC Functional Description
1266
HDMI-CEC Pin
1266
Table 232. HDMI Pin
1266
Bit Timing
1267
Figure 433. Message Structure
1267
Figure 434. Blocks
1267
Message Description
1267
Arbitration
1268
Figure 435. Bit Timings
1268
Figure 436. Signal Free Time
1268
Figure 437. Arbitration Phase
1269
Figure 438. SFT of Three Nominal Bit Periods
1269
SFT Option Bit
1269
Bit Error
1270
Error Handling
1270
Figure 439. Error Bit Timing
1270
Message Error
1270
Bit Rising Error (BRE)
1271
Long Bit Period Error (LBPE)
1271
Short Bit Period Error (SBPE)
1271
Figure 440. Error Handling
1272
Table 233. Error Handling Timing Parameters
1272
Figure 441. TXERR Detection
1273
Table 234. TXERR Timing Parameters
1273
Transmission Error Detection (TXERR)
1273
HDMI-CEC Interrupts
1274
Table 235. HDMI-CEC Interrupts
1274
CEC Control Register (CEC_CR)
1275
HDMI-CEC Registers
1275
CEC Configuration Register (CEC_CFGR)
1276
CEC Interrupt and Status Register (CEC_ISR)
1279
CEC Rx Data Register (CEC_RXDR)
1279
CEC Tx Data Register (CEC_TXDR)
1279
CEC Interrupt Enable Register (CEC_IER)
1281
HDMI-CEC Register Map
1283
Table 236. HDMI-CEC Register Map and Reset Values
1283
Debug Support (DBG)
1284
Figure 442. Block Diagram of STM32 MCU and Cortex
1284
Overview
1284
Reference Arm® Documentation
1285
SWJ Debug Port (Serial Wire and JTAG)
1285
Figure 443. SWJ Debug Port
1286
Mechanism to Select the JTAG-DP or the SW-DP
1286
Pinout and Debug Port Pins
1286
Flexible SWJ-DP Pin Assignment
1287
SWJ Debug Port Pins
1287
Table 237. SWJ Debug Port Pins
1287
Table 238. Flexible SWJ-DP Pin Assignment
1287
Internal Pull-Up and Pull-Down on JTAG Pins
1288
Using Serial Wire and Releasing the Unused Debug Pins as Gpios
1288
Figure 444. JTAG TAP Connections
1289
Stm32F446Xx JTAG TAP Connection
1289
Boundary Scan TAP
1290
ID Codes and Locking Mechanism
1290
MCU Device ID Code
1290
Cortex ® -M4 with FPU JEDEC-106 ID Code
1291
JTAG Debug Port
1291
Table 239. JTAG Debug Port Data Registers
1291
SW Debug Port
1293
SW Protocol Introduction
1293
SW Protocol Sequence
1293
Table 240. 32-Bit Debug Port Registers Addressed through the Shifted Value A[3:2]
1293
SW-DP State Machine (Reset, Idle States, ID Code)
1294
Table 241. Packet Request (8-Bits)
1294
Table 242. ACK Response (3 Bits)
1294
Table 243. DATA Transfer (33 Bits)
1294
DP and AP Read/Write Accesses
1295
SW-DP Registers
1295
Table 244. SW-DP Registers
1295
SW-AP Registers
1296
AHB-AP (AHB Access Port) - Valid for both JTAG-DP and SW-DP
1297
Table 245. Cortex ® -M4 with FPU AHB-AP Registers
1297
Core Debug
1298
Table 246. Core Debug Registers
1298
Capability of the Debugger Host to Connect under System Reset
1299
FPB (Flash Patch Breakpoint)
1299
DWT (Data Watchpoint Trigger)
1300
General Description
1300
ITM (Instrumentation Trace Macrocell)
1300
Time Stamp Packets, Synchronization and Overflow Packets
1300
Table 247. Main ITM Registers
1301
ETM (Embedded Trace Macrocell)
1302
General Description
1302
Signal Protocol, Packet Types
1302
Configuration Example
1303
Main ETM Registers
1303
MCU Debug Component (DBGMCU)
1303
Table 248. Main ETM Registers
1303
Debug MCU Configuration Register
1304
Debug Support for Low-Power Modes
1304
Debug Support for Timers, Watchdog, Bxcan and I C
1304
Debug MCU APB1 Freeze Register (DBGMCU_APB1_FZ)
1307
Debug MCU APB2 Freeze Register (DBGMCU_APB2_FZ)
1309
Figure 445. TPIU Block Diagram
1310
Introduction
1310
TPIU (Trace Port Interface Unit)
1310
Table 249. Asynchronous TRACE Pin Assignment
1311
Table 250. Synchronous TRACE Pin Assignment
1311
TRACE Pin Assignment
1311
Table 251. Flexible TRACE Pin Assignment
1312
TPUI Formatter
1313
TPUI Frame Synchronization Packets
1313
Transmission of the Synchronization Frame Packet
1313
Asynchronous Mode
1314
Synchronous Mode
1314
TPIU Registers
1314
TRACECLKIN Connection in Stm32F446Xx
1314
33.17.10 Example of Configuration
1315
Table 252. Important TPIU Registers
1315
DBG Register Map
1316
Table 253. DBG Register Map and Reset Values
1316
Device Electronic Signature
1317
Unique Device ID Register (96 Bits)
1317
Flash Memory Size Register
1318
Package Data Register
1318
Revision History
1319
Table 254. Document Revision History
1319
Advertisement
Advertisement
Related Products
ST RM0090
ST RE71
ST R72 Li 48 V1
ST RHFAD128 GUI
ST 32F072BDISCOVERY
ST 32F3348DISCOVERY
ST 32F429IDISCOVERY
ST 32L0358DISCOVERY
ST 8542310000
ST AEK-MCU-C4MINI1
ST Categories
Motherboard
Computer Hardware
Microcontrollers
Control Unit
Controller
More ST Manuals
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL