Sign In
Upload
Manuals
Brands
STMicroelectronics Manuals
Microcontrollers
STM32F05 series
STMicroelectronics STM32F05 series Manuals
Manuals and User Guides for STMicroelectronics STM32F05 series. We have
1
STMicroelectronics STM32F05 series manual available for free PDF download: Reference Manual
STMicroelectronics STM32F05 series Reference Manual (742 pages)
advanced ARM-based 32-bit MCUs
Brand:
STMicroelectronics
| Category:
Microcontrollers
| Size: 10.58 MB
Table of Contents
Table 1. Applicable Products
1
Table of Contents
2
SYSCFG External Interrupt Configuration Register
4
Documentation Conventions
34
List of Abbreviations for Registers
34
Glossary
34
Peripheral Availability
34
System and Memory Overview
35
System Architecture
35
Figure 1. System Architecture
35
Memory Organization
37
Introduction
37
Memory Map and Register Boundary Addresses
37
Table 2. Stm32F05Xxx Memory Map and Peripheral Register Boundary Addresses
37
Embedded SRAM
40
Flash Memory Overview
40
Boot Configuration
40
Table 3. Boot Modes
40
Embedded Flash Memory
42
Flash Main Features
42
Flash Memory Functional Description
42
Flash Memory Organization
42
Table 4. Flash Module Organization
42
Read Operations
43
Flash Program and Erase Operations
44
Figure 2. Programming Procedure
45
Figure 3. Flash Memory Page Erase Procedure
47
Figure 4. Flash Memory Mass Erase Procedure
48
Memory Protection
49
Read Protection
49
Table 5. Flash Memory Read Protection Status
50
Write Protection
51
Table 6. Access Status Versus Protection Level and Execution Modes
51
Option Byte Write Protection
52
Flash Interrupts
52
Flash Register Description
52
Table 7. Flash Interrupt Request
52
Flash Access Control Register (FLASH_ACR)
53
Flash Key Register (FLASH_KEYR)
53
Flash Option Key Register (FLASH_OPTKEYR)
54
Flash Status Register (FLASH_SR)
54
Flash Control Register (FLASH_CR)
55
Flash Address Register (FLASH_AR)
56
Option Byte Register (FLASH_OBR)
57
Write Protection Register (FLASH_WRPR)
58
Flash Register Map
58
Table 8. Flash Interface - Register Map and Reset Values
58
Option Byte Description
59
Table 9. Option Byte Format
59
Table 10. Option Byte Organization
59
Table 11. Description of the Option Bytes
60
Cyclic Redundancy Check Calculation Unit (CRC)
62
Introduction
62
CRC Main Features
62
CRC Functional Description
63
Figure 5. CRC Calculation Unit Block Diagram
63
CRC Registers
64
Data Register (CRC_DR)
64
Independent Data Register (CRC_IDR)
64
Control Register (CRC_CR)
65
Initial CRC Value (CRC_INIT)
66
CRC Register Map
66
Table 12. CRC Register Map and Reset Values
66
Power Control (PWR)
67
Power Supplies
67
Independent A/D and D/A Converter Supply and Reference Voltage
67
Figure 6. Power Supply Overview
67
Battery Backup Domain
68
Voltage Regulator
69
Power Supply Supervisor
69
Power on Reset (POR) / Power down Reset (PDR)
69
Figure 7. Power on Reset/Power down Reset Waveform
69
Programmable Voltage Detector (PVD)
70
Figure 8. PVD Thresholds
70
Low-Power Modes
71
Slowing down System Clocks
71
Table 13. Low-Power Mode Summary
71
Peripheral Clock Gating
72
Sleep Mode
72
Stop Mode
73
Table 14. Sleep-Now
73
Table 15. Sleep-On-Exit
73
Standby Mode
74
Table 16. Stop Mode
74
Table 17. Standby Mode
75
Auto-Wakeup from Low-Power Mode
76
Power Control Registers
77
Power Control Register (PWR_CR)
77
Power Control/Status Register (PWR_CSR)
79
PWR Register Map
81
Table 18. PWR Register Map and Reset Values
81
Reset and Clock Control (RCC)
82
Reset
82
System Reset
82
Figure 9. Simplified Diagram of the Reset Circuit
82
Power Reset
83
Backup Domain Reset
83
Clocks
83
Figure 10. Clock Tree
85
Figure 11. HSE/ LSE Clock Sources
86
HSE Clock
86
HSI Clock
87
LSE Clock
88
LSI Clock
88
Pll
88
ADC Clock
89
Clock Security System (CSS)
89
System Clock (SYSCLK) Selection
89
Clock-Out Capability
90
RTC Clock
90
Watchdog Clock
90
Low Power Modes
90
RCC Registers
92
Clock Control Register (RCC_CR)
92
Clock Configuration Register (RCC_CFGR)
94
Clock Interrupt Register (RCC_CIR)
97
APB2 Peripheral Reset Register (RCC_APB2RSTR)
99
APB1 Peripheral Reset Register (RCC_APB1RSTR)
101
AHB Peripheral Clock Enable Register (RCC_AHBENR)
102
APB2 Peripheral Clock Enable Register (RCC_APB2ENR)
104
APB1 Peripheral Clock Enable Register (RCC_APB1ENR)
105
Backup Domain Control Register (RCC_BDCR)
108
Control/Status Register (RCC_CSR)
110
AHB Peripheral Reset Register (RCC_AHBRSTR)
112
Clock Configuration Register 2 (RCC_CFGR2)
113
Clock Configuration Register 3 (RCC_CFGR3)
114
Clock Control Register 2 (RCC_CR2)
115
RCC Register Map
116
Table 19. RCC Register Map and Reset Values
116
General-Purpose I/Os (GPIO)
118
GPIO Introduction
118
GPIO Main Features
118
GPIO Functional Description
118
Figure 12. Basic Structure of a Standard I/O Port Bit
119
Figure 13. Basic Structure of a Five-Volt Tolerant I/O Port Bit
119
General-Purpose I/O (GPIO)
120
Table 20. Port Bit Configuration Table
120
I/O Pin Alternate Function Multiplexer and Mapping
121
GPIO Locking Mechanism
122
I/O Data Bitwise Handling
122
I/O Port Control Registers
122
I/O Port Data Registers
122
External Interrupt/Wakeup Lines
123
I/O Alternate Function Input/Output
123
Input Configuration
123
Figure 14. Input Floating/Pull Up/Pull down Configurations
124
Output Configuration
124
Alternate Function Configuration
125
Figure 15. Output Configuration
125
Figure 16. Alternate Function Configuration
125
Analog Configuration
126
Figure 17. High Impedance-Analog Configuration
126
Using the GPIO Pins in the Backup Supply Domain
126
Using the HSE or LSE Oscillator Pins as Gpios
126
GPIO Registers
127
GPIO Port Mode Register (Gpiox_Moder) (X = A..D, F
127
GPIO Port Output Type Register (Gpiox_Otyper) (X = A..D, F
127
GPIO Port Output Speed Register (Gpiox_Ospeedr)
128
(X = a
128
GPIO Port Pull-Up/Pull-Down Register (Gpiox_Pupdr)
128
GPIO Port Input Data Register (Gpiox_Idr) (X = A..D, F
129
GPIO Port Output Data Register (Gpiox_Odr) (X = A..D, F
129
GPIO Port Bit Set/Reset Register (Gpiox_Bsrr) (X = A..D, F
130
GPIO Port Configuration Lock Register (Gpiox_Lckr) (X = A..B
131
GPIO Alternate Function Low Register (Gpiox_Afrl) (X = a
132
(X = a
132
Port Bit Reset Register (Gpiox_Brr) (X=A
133
GPIO Register Map
133
Table 21. GPIO Register Map and Reset Values
133
System Configuration Controller (SYSCFG)
135
SYSCFG Registers
135
SYSCFG Configuration Register 1 (SYSCFG_CFGR1)
135
SYSCFG External Interrupt Configuration Register 1
136
(Syscfg_Exticr1)
136
SYSCFG External Interrupt Configuration Register 2
138
(Syscfg_Exticr2)
138
(Syscfg_Exticr3)
138
(Syscfg_Exticr4)
139
SYSCFG Configuration Register 2 (SYSCFG_CFGR2)
139
SYSCFG Register Maps
140
Table 22. SYSCFG Register Map and Reset Values
140
Direct Memory Access Controller (DMA)
142
DMA Introduction
142
DMA Main Features
142
DMA Functional Description
143
DMA Transactions
143
Figure 18. DMA Block Diagram
143
Arbiter
144
DMA Channels
144
Programmable Data Width, Data Alignment and Endians
146
Table 23. Programmable Data Width & Endian Behavior (When Bits PINC = MINC = 1)
146
Error Management
147
Interrupts
147
DMA Request Mapping
147
Table 24. DMA Interrupt Requests
147
Figure 19. DMA Request Mapping
148
Table 25. Summary of DMA Requests for each Channel
149
DMA Registers
150
DMA Interrupt Status Register (DMA_ISR)
150
DMA Interrupt Flag Clear Register (DMA
151
DMA Channel X Configuration Register (Dma_Ccrx) (X = 1
152
DMA Channel X Number of Data Register (Dma_Cndtrx) (X = 1
153
DMA Channel X Peripheral Address Register (Dma_Cparx) (X = 1
154
DMA Channel X Memory Address Register (Dma_Cmarx) (X = 1
154
DMA Register Map
155
Table 26. DMA Register Map and Reset Values
155
Interrupts and Events
157
Nested Vectored Interrupt Controller (NVIC)
157
NVIC Main Features
157
Systick Calibration Value Register
157
Interrupt and Exception Vectors
157
Table 27. Vector Table
158
Extended Interrupts and Events Controller (EXTI)
159
Main Features
159
Block Diagram
159
Wakeup Event Management
160
Asynchronous Internal Interrupts
160
Figure 20. EXTI External Interrupt/Event Block Diagram
160
Functional Description
161
External and Internal Interrupt/Event Line Mapping
161
Figure 21. External Interrupt/Event GPIO Mapping
162
EXTI Registers
163
Interrupt Mask Register (EXTI_IMR)
163
Event Mask Register (EXTI_EMR)
163
Rising Trigger Selection Register (EXTI_RTSR)
164
Falling Trigger Selection Register (EXTI_FTSR)
164
Software Interrupt Event Register (EXTI_SWIER)
165
Pending Register (EXTI_PR)
165
EXTI Register Map
167
Table 28. External Interrupt/Event Controller Register Map and Reset Values
167
Analog-To-Digital Converter (ADC)
168
Introduction
168
ADC Main Features
169
ADC Pins and Internal Signals
170
Table 29. ADC Internal Signals
170
Table 30. ADC Pins
170
ADC Functional Description
171
Calibration (ADCAL)
171
Figure 22. ADC Block Diagram
171
ADC On-Off Control (ADEN, ADDIS, ADRDY)
172
Figure 23. ADC Calibration
172
ADC Clock
173
Figure 24. Enabling/Disabling the ADC
173
Configuring the ADC
174
Channel Selection (CHSEL, SCANDIR)
174
Table 31. Latency between Trigger and Start of Conversion
174
Programmable Sampling Time (SMP)
175
Single Conversion Mode (CONT=0)
175
Continuous Conversion Mode (CONT=1)
176
Starting Conversions (ADSTART)
176
Timings
177
Stopping an Ongoing Conversion (ADSTP)
177
Figure 25. Analog to Digital Conversion Time
177
Conversion on External Trigger and Trigger Polarity (EXTSEL, EXTEN)
178
Figure 26. Stopping an Ongoing Conversion
178
Table 32. Configuring the Trigger Polarity
178
Discontinuous Mode (DISCEN)
179
Programmable Resolution (RES) - Fast Conversion Mode
179
Table 33. External Triggers
179
End of Conversion Sequence (EOSEQ Flag)
180
End of Conversion, End of Sampling Phase (EOC, EOSMP Flags)
180
Table 34. Tsar Timings Depending on Resolution
180
Example Timing Diagrams
181
Hardware/Software Triggers)
181
Figure 27. Single Conversions of a Sequence, Software Trigger
181
Figure 28. Continuous Conversion of a Sequence, Software Trigger
181
Figure 29. Single Conversions of a Sequence, Hardware Trigger
182
Figure 30. Continuous Conversions of a Sequence, Hardware Trigger
182
Data Management
183
Data Register & Data Alignment (ADC_DR, ALIGN)
183
ADC Overrun (OVR, OVRMOD)
183
Figure 31. Data Alignment and Resolution
183
Managing a Sequence of Data Converted Without Using the DMA
184
Managing Converted Data Without Using the DMA Without Overrun
184
Managing Converted Data Using the DMA
184
Figure 32. Example of Overrun (OVR)
184
Low Power Features
185
Wait Mode Conversion
185
Auto-Off Mode (AUTOFF)
186
Figure 33. Wait Mode Conversion (Continuous Mode, Software Trigger)
186
Analog Window Watchdog
187
Awd_Htr/Ltr, Awd)
187
Table 36. Analog Watchdog Channel Selection
187
Figure 34. Behavior Withwait=0, AUTOFF=1
187
Figure 35. Behavior with WAIT=1, AUTOFF=1
187
Table 35. Analog Watchdog Comparison
188
Figure 36. Analog Watchdog Guarded Area
188
Temperature Sensor and Internal Reference Voltage
189
Figure 37. Temperature Sensor and VREFINT Channel Block Diagram
189
Battery Voltage Monitoring
190
ADC Interrupts
191
Table 37. ADC Interrupts
191
ADC Registers
192
ADC Interrupt and Status Register (ADC_ISR)
192
ADC Interrupt Enable Register (ADC_IER)
193
ADC Control Register (ADC_CR)
194
ADC Configuration Register 1 (ADC_CFGR1)
196
ADC Configuration Register 2 (ADC_CFGR2)
199
ADC Sampling Time Register (ADC_SMPR)
200
ADC Watchdog Threshold Register (ADC_TR)
200
ADC Channel Selection Register (ADC_CHSELR)
201
ADC Data Register (ADC_DR)
201
ADC Common Configuration Register (ADC_CCR)
202
12.12.11 ADC Register Map
203
Table 38. ADC Register Map and Reset Values
203
Digital-To-Analog Converter (DAC1)
205
DAC1 Introduction
205
DAC1 Main Features
205
Single Mode Functional Description
206
DAC Channel Enable
206
Table 39. DAC1 Pins
206
Figure 38. DAC1 Block Diagram
206
DAC Output Buffer Enable
207
DAC Data Format
207
DAC Conversion
207
Figure 39. Data Registers in Single DAC Channel Mode
207
DAC Output Voltage
208
DAC Trigger Selection
208
Table 40. External Triggers
208
Figure 40. Timing Diagram for Conversion with Trigger Disabled TEN = 0
208
DMA Request
209
DAC Registers
209
DAC Control Register (DAC_CR)
209
DAC Software Trigger Register (DAC_SWTRIGR)
211
DAC Channel1 12-Bit Right-Aligned Data Holding Register
211
(Dac_Dhr12R1)
211
DAC Channel1 12-Bit Left Aligned Data Holding Register
211
(Dac_Dhr12L1)
211
DAC Channel1 8-Bit Right Aligned Data Holding Register
212
(Dac_Dhr8R1)
212
DAC Channel1 Data Output Register (DAC_DOR1)
212
DAC Status Register (DAC_SR)
213
DAC Register Map
214
Table 41. DAC Register Map and Reset Values
214
Comparator (COMP)
215
COMP Introduction
215
COMP Main Features
215
COMP Functional Description
216
General Description
216
Clock
216
Comparator Inputs and Output
216
Figure 41. Comparators Block Diagram
216
Interrupt and Wakeup
217
Power Mode
217
Comparator LOCK Mechanism
217
Hysteresis
217
Figure 42. Comparator Hysteresis
218
COMP Registers
219
COMP Control and Status Register (COMP_CSR)
219
COMP Register Map
222
Table 42. COMP Register Map and Reset Values
222
Advanced-Control Timers (TIM1)
223
TIM1 Introduction
223
TIM1 Main Features
223
Figure 43. Advanced-Control Timer Block Diagram
224
TIM1 Functional Description
225
Time-Base Unit
225
Figure 44. Counter Timing Diagram with Prescaler Division Change from 1 to 2
226
Figure 45. Counter Timing Diagram with Prescaler Division Change from 1 to 4
226
Counter Modes
227
Figure 46. Counter Timing Diagram, Internal Clock Divided by 1
227
Figure 47. Counter Timing Diagram, Internal Clock Divided by 2
228
Figure 48. Counter Timing Diagram, Internal Clock Divided by 4
228
Figure 49. Counter Timing Diagram, Internal Clock Divided by N
228
Figure 50. Counter Timing Diagram, Update Event When ARPE=0 (Timx_Arr Not Preloaded)
229
Figure 51. Counter Timing Diagram, Update Event When ARPE=1
229
Figure 52. Counter Timing Diagram, Internal Clock Divided by 1
230
Figure 53. Counter Timing Diagram, Internal Clock Divided by 2
230
Figure 54. Counter Timing Diagram, Internal Clock Divided by 4
231
Figure 55. Counter Timing Diagram, Internal Clock Divided by N
231
Figure 56. Counter Timing Diagram, Update Event When Repetition Counter
231
Figure 57. Counter Timing Diagram, Internal Clock Divided by 1, Timx_Arr = 0X6
233
Figure 58. Counter Timing Diagram, Internal Clock Divided by 2
233
Figure 59. Counter Timing Diagram, Internal Clock Divided by 4, Timx_Arr=0X36
233
Figure 60. Counter Timing Diagram, Internal Clock Divided by N
234
Figure 61. Counter Timing Diagram, Update Event with ARPE=1 (Counter Underflow)
234
Repetition Counter
235
Figure 62. Counter Timing Diagram, Update Event with ARPE=1 (Counter Overflow)
235
Figure 63. Update Rate Examples Depending on Mode and Timx_Rcr Register Settings
236
Clock Sources
237
Figure 64. Control Circuit in Normal Mode, Internal Clock Divided by 1
237
Figure 65. TI2 External Clock Connection Example
237
Figure 66. Control Circuit in External Clock Mode 1
238
Figure 67. External Trigger Input Block
238
Capture/Compare Channels
239
Figure 68. Control Circuit in External Clock Mode 2
239
Figure 69. Capture/Compare Channel (Example: Channel 1 Input Stage)
240
Figure 70. Capture/Compare Channel 1 Main Circuit
240
Figure 71. Output Stage of Capture/Compare Channel (Channel 1 to 3)
241
Figure 72. Output Stage of Capture/Compare Channel (Channel 4)
241
Input Capture Mode
242
PWM Input Mode
243
Figure 73. PWM Input Mode Timing
243
Forced Output Mode
244
Output Compare Mode
244
PWM Mode
245
Figure 74. Output Compare Mode, Toggle on OC1
245
Figure 75. Edge-Aligned PWM Waveforms (ARR=8)
246
Figure 76. Center-Aligned PWM Waveforms (ARR=8)
247
Complementary Outputs and Dead-Time Insertion
248
Figure 77. Complementary Output with Dead-Time Insertion
249
Figure 78. Dead-Time Waveforms with Delay Greater than the Negative Pulse
249
Figure 79. Dead-Time Waveforms with Delay Greater than the Positive Pulse
249
Using the Break Function
250
Figure 80. Output Behavior in Response to a Break
252
Clearing the Ocxref Signal on an External Event
253
Figure 81. Clearing Timx Ocxref
253
6-Step PWM Generation
254
Figure 82. 6-Step Generation, COM Example (OSSR=1)
254
One-Pulse Mode
255
Figure 83. Example of One Pulse Mode
255
Encoder Interface Mode
256
Table 43. Counting Direction Versus Encoder Signals
257
Figure 84. Example of Counter Operation in Encoder Interface Mode
258
Figure 85. Example of Encoder Interface Mode with TI1FP1 Polarity Inverted
258
Timer Input XOR Function
259
Interfacing with Hall Sensors
259
Figure 86. Example of Hall Sensor Interface
260
Timx and External Trigger Synchronization
261
Figure 87. Control Circuit in Reset Mode
261
Figure 88. Control Circuit in Gated Mode
262
Figure 89. Control Circuit in Trigger Mode
263
Timer Synchronization
264
Debug Mode
264
Figure 90. Control Circuit in External Clock Mode 2 + Trigger Mode
264
TIM1 Registers
265
TIM1 Control Register 1 (TIM1_CR1)
265
TIM1 Control Register 2 (TIM1_CR2)
266
TIM1 Slave Mode Control Register (TIM1_SMCR)
268
TIM1 Dma/Interrupt Enable Register (TIM1_DIER)
270
Table 44. Timx Internal Trigger Connection
270
TIM1 Status Register (TIM1_SR)
272
TIM1 Event Generation Register (TIM1_EGR)
273
TIM1 Capture/Compare Mode Register 1 (TIM1_CCMR1)
275
TIM1 Capture/Compare Mode Register 2 (TIM1_CCMR2)
278
TIM1 Capture/Compare Enable Register (TIM1_CCER)
279
Table 45. Output Control Bits for Complementary Ocx and Ocxn Channels with
282
Table 56. Output Control Bits for Complementary Ocx and Ocxn Channels with Break Feature
282
TIM1 Counter (TIM1_CNT)
283
TIM1 Prescaler (TIM1_PSC)
283
TIM1 Auto-Reload Register (TIM1_ARR)
283
TIM1 Repetition Counter Register (TIM1_RCR)
284
TIM1 Capture/Compare Register 1 (TIM1_CCR1)
284
TIM1 Capture/Compare Register 2 (TIM1_CCR2)
285
TIM1 Capture/Compare Register 3 (TIM1_CCR3)
285
TIM1 Capture/Compare Register 4 (TIM1_CCR4)
286
TIM1 Break and Dead-Time Register (TIM1_BDTR)
286
TIM1 DMA Control Register (TIM1_DCR)
288
TIM1 DMA Address for Full Transfer (TIM1_DMAR)
289
TIM1 Register Map
290
Table 46. TIM1 Register Map and Reset Values
290
General-Purpose Timers (TIM2 and TIM3)
292
TIM2 and TIM3 Introduction
292
TIM2 and TIM3 Main Features
292
TIM2 and TIM3 Functional Description
293
Time-Base Unit
293
Figure 91. General-Purpose Timer Block Diagram (TIM2 and TIM3)
293
Figure 92. Counter Timing Diagram with Prescaler Division Change from 1 to 2
294
Counter Modes
295
Figure 93. Counter Timing Diagram with Prescaler Division Change from 1 to 4
295
Figure 94. Counter Timing Diagram, Internal Clock Divided by 1
296
Figure 95. Counter Timing Diagram, Internal Clock Divided by 2
296
Figure 96. Counter Timing Diagram, Internal Clock Divided by 4
296
Figure 97. Counter Timing Diagram, Internal Clock Divided by N
297
Figure 98. Counter Timing Diagram, Update Event When ARPE=0 (Timx_Arr Not Preloaded)
297
Figure 99. Counter Timing Diagram, Update Event When ARPE=1 (Timx_Arr Preloaded)
298
Figure 100. Counter Timing Diagram, Internal Clock Divided by 1
299
Figure 101. Counter Timing Diagram, Internal Clock Divided by 2
299
Figure 102. Counter Timing Diagram, Internal Clock Divided by 4
299
Figure 103. Counter Timing Diagram, Internal Clock Divided by N
300
Figure 104. Counter Timing Diagram, Update Event When Repetition Counter Is Not Used
300
Figure 105. Counter Timing Diagram, Internal Clock Divided by 1, Timx_Arr=0X6
301
Figure 106. Counter Timing Diagram, Internal Clock Divided by 2
302
Figure 107. Counter Timing Diagram, Internal Clock Divided by 4, Timx_Arr=0X36
302
Figure 108. Counter Timing Diagram, Internal Clock Divided by N
302
Figure 109. Counter Timing Diagram, Update Event with ARPE=1 (Counter Underflow)
303
Figure 110. Counter Timing Diagram, Update Event with ARPE=1 (Counter Overflow)
303
Clock Sources
304
Figure 111. Control Circuit in Normal Mode, Internal Clock Divided by 1
304
Figure 112. TI2 External Clock Connection Example
305
Figure 113. Control Circuit in External Clock Mode 1
305
Figure 114. External Trigger Input Block
306
Figure 115. Control Circuit in External Clock Mode 2
306
Capture/Compare Channels
307
Figure 116. Capture/Compare Channel (Example: Channel 1 Input Stage)
307
Figure 117. Capture/Compare Channel 1 Main Circuit
307
Input Capture Mode
308
Figure 118. Output Stage of Capture/Compare Channel (Channel 1)
308
PWM Input Mode
310
Figure 119. PWM Input Mode Timing
310
Forced Output Mode
311
Output Compare Mode
311
PWM Mode
312
Figure 120. Output Compare Mode, Toggle on OC1
312
Figure 121. Edge-Aligned PWM Waveforms (ARR=8)
313
Figure 122. Center-Aligned PWM Waveforms (ARR=8)
314
One-Pulse Mode
315
Figure 123. Example of One-Pulse Mode
315
Clearing the Ocxref Signal on an External Event
316
Encoder Interface Mode
317
Figure 124. Clearing Timx Ocxref
317
Table 47. Counting Direction Versus Encoder Signals
318
Figure 125. Example of Counter Operation in Encoder Interface Mode
318
Timer Input XOR Function
319
Figure 126. Example of Encoder Interface Mode with TI1FP1 Polarity Inverted
319
Timers and External Trigger Synchronization
320
Figure 127. Control Circuit in Reset Mode
320
Figure 128. Control Circuit in Gated Mode
321
Figure 129. Control Circuit in Trigger Mode
322
Timer Synchronization
323
Figure 130. Control Circuit in External Clock Mode 2 + Trigger Mode
323
Figure 131. Master/Slave Timer Example
323
Figure 132. Gating Timer 2 with OC1REF of Timer 1
324
Figure 133. Gating Timer 2 with Enable of Timer 1
325
Figure 134. Triggering Timer 2 with Update of Timer 1
326
Figure 135. Triggering Timer 2 with Enable of Timer 1
327
Debug Mode
328
Figure 136. Triggering Timer 1 and 2 with Timer 1 TI1 Input
328
TIM2 and TIM3 Registers
329
TIM2 and TIM3 Control Register 1 (TIM2_CR1 and TIM3_CR1)
329
TIM2 and TIM3 Control Register 2 (TIM2_CR2 and TIM3_CR2)
331
TIM2 and TIM3 Slave Mode Control Register
332
Tim3_Smcr)
332
Table 48. TIM2 and TIM3 Internal Trigger Connection
334
TIM2 and TIM3 Dma/Interrupt Enable Register
335
Tim3_Dier)
335
TIM2 and TIM3 Status Register (TIM2_SR and TIM3_SR)
336
TIM2 and TIM3 Event Generation Register (TIM2_EGR and TIM3_EGR)
338
TIM2 and TIM3 Capture/Compare Mode Register
339
Tim3_Ccmr1)
339
TIM2 and TIM3 Capture/Compare Mode Register
342
Tim3_Ccmr2)
342
TIM2 and TIM3 Capture/Compare Enable Register
343
Tim3_Ccer)
343
Table 49. Output Control Bit for Standard Ocx Channels
344
TIM2 and TIM3 Counter (TIM2_CNT and TIM3_CNT)
345
TIM2 and TIM3 Prescaler (TIM2_PSC and TIM3_PSC)
345
TIM2 and TIM3 Auto-Reload Register (TIM2_ARR and TIM3_ARR)
345
TIM2 and TIM3 Capture/Compare Register
346
Tim3_Ccr1)
346
Tim3_Ccr2)
346
TIM2 and TIM3 Capture/Compare Register
348
Tim3_Ccr3)
348
Tim3_Ccr4)
348
TIM2 and TIM3 DMA Control Register (TIM2_DCR and TIM3_DCR)
349
TIM2 and TIM3 DMA Address for Full Transfer
349
Tim3_Dmar)
349
TIM2 and TIM3 Register Map
351
Table 50. TIM2 and TIM3 Register Map and Reset Values
351
General-Purpose Timer (TIM14)
353
TIM14 Introduction
353
TIM14 Main Features
353
TIM14 Functional Description
354
Time-Base Unit
354
Figure 137. General-Purpose Timer Block Diagram (TIM14)
354
Figure 138. Counter Timing Diagram with Prescaler Division Change from 1 to 2
355
Figure 139. Counter Timing Diagram with Prescaler Division Change from 1 to 4
355
Counter Modes
356
Figure 140. Counter Timing Diagram, Internal Clock Divided by 1
356
Figure 141. Counter Timing Diagram, Internal Clock Divided by 2
357
Figure 142. Counter Timing Diagram, Internal Clock Divided by 4
357
Figure 143. Counter Timing Diagram, Internal Clock Divided by N
357
Clock Source
359
Capture/Compare Channels
359
Figure 146. Control Circuit in Normal Mode, Internal Clock Divided by 1
359
Figure 147. Capture/Compare Channel (Example: Channel 1 Input Stage)
359
Figure 148. Capture/Compare Channel 1 Main Circuit
360
Figure 149. Output Stage of Capture/Compare Channel (Channel 1)
360
Input Capture Mode
361
Forced Output Mode
362
Output Compare Mode
362
PWM Mode
363
Figure 150. Output Compare Mode, Toggle on OC1
363
Debug Mode
364
Figure 151. Edge-Aligned PWM Waveforms (ARR=8)
364
TIM14 Registers
365
TIM14 Control Register 1 (TIM14_CR1)
365
TIM14 Interrupt Enable Register (TIM14_DIER)
366
TIM14 Status Register (TIM14_SR)
366
TIM14 Event Generation Register (TIM14_EGR)
367
TIM14 Capture/Compare Mode Register 1 (TIM14_CCMR1)
368
TIM14 Capture/Compare Enable Register (TIM14_CCER)
370
Table 51. Output Control Bit for Standard Ocx Channels
370
TIM14 Counter (TIM14_CNT)
371
TIM14 Prescaler (TIM14_PSC)
371
TIM14 Auto-Reload Register (TIM14_ARR)
371
TIM14 Capture/Compare Register 1 (TIM14_CCR1)
372
TIM14 Option Register (TIM14_OR)
372
TIM14 Register Map
373
Table 52. TIM14 Register Map and Reset Values
373
General-Purpose Timers (TIM15/16/17)
375
TIM15/16/17 Introduction
375
TIM15 Main Features
375
TIM16 and TIM17 Main Features
376
Figure 152. TIM15 Block Diagram
377
Figure 153. TIM16 and TIM17 Block Diagram
378
TIM15/16/17 Functional Description
379
Time-Base Unit
379
Counter Modes
380
Figure 154. Counter Timing Diagram with Prescaler Division Change from 1 to 2
380
Figure 155. Counter Timing Diagram with Prescaler Division Change from 1 to 4
380
Figure 156. Counter Timing Diagram, Internal Clock Divided by 1
381
Figure 157. Counter Timing Diagram, Internal Clock Divided by 2
381
Figure 158. Counter Timing Diagram, Internal Clock Divided by 4
382
Figure 159. Counter Timing Diagram, Internal Clock Divided by N
382
Repetition Counter
383
Clock Sources
384
Figure 162. Update Rate Examples Depending on Mode and Timx_Rcr Register Settings
384
Figure 163. Control Circuit in Normal Mode, Internal Clock Divided by 1
385
Figure 164. TI2 External Clock Connection Example
385
Capture/Compare Channels
386
Figure 165. Control Circuit in External Clock Mode 1
386
Figure 166. Capture/Compare Channel (Example: Channel 1 Input Stage)
386
Figure 167. Capture/Compare Channel 1 Main Circuit
387
Figure 168. Output Stage of Capture/Compare Channel (Channel 1)
387
Figure 169. Output Stage of Capture/Compare Channel (Channel 2 for TIM15)
387
Input Capture Mode
388
PWM Input Mode (Only for TIM15)
389
Figure 170. PWM Input Mode Timing
389
Forced Output Mode
390
Output Compare Mode
390
PWM Mode
391
Figure 171. Output Compare Mode, Toggle on OC1
391
Figure 172. Edge-Aligned PWM Waveforms (ARR=8)
392
Complementary Outputs and Dead-Time Insertion
393
Figure 173. Complementary Output with Dead-Time Insertion
393
Figure 174. Dead-Time Waveforms with Delay Greater than the Negative Pulse
393
Using the Break Function
394
Figure 175. Dead-Time Waveforms with Delay Greater than the Positive Pulse
394
Figure 176. Output Behavior in Response to a Break
396
One-Pulse Mode
397
Figure 177. Example of One Pulse Mode
397
TIM15 External Trigger Synchronization
399
Figure 178. Control Circuit in Reset Mode
399
Figure 179. Control Circuit in Gated Mode
400
Timer Synchronization (TIM15)
401
Debug Mode
401
Figure 180. Control Circuit in Trigger Mode
401
TIM15 Registers
402
TIM15 Control Register 1 (TIM15_CR1)
402
TIM15 Control Register 2 (TIM15_CR2)
403
TIM15 Slave Mode Control Register (TIM15_SMCR)
404
Table 53. Timx Internal Trigger Connection
405
TIM15 Dma/Interrupt Enable Register (TIM15_DIER)
406
TIM15 Status Register (TIM15_SR)
407
TIM15 Event Generation Register (TIM15_EGR)
408
TIM15 Capture/Compare Mode Register 1 (TIM15_CCMR1)
409
TIM15 Capture/Compare Enable Register (TIM15_CCER)
412
Table 54. Output Control Bits for Complementary Ocx and Ocxn Channels with Break Feature
414
TIM15 Counter (TIM15_CNT)
415
TIM15 Prescaler (TIM15_PSC)
415
TIM15 Auto-Reload Register (TIM15_ARR)
415
TIM15 Repetition Counter Register (TIM15_RCR)
416
TIM15 Capture/Compare Register 1 (TIM15_CCR1)
416
TIM15 Capture/Compare Register 2 (TIM15_CCR2)
417
TIM15 Break and Dead-Time Register (TIM15_BDTR)
417
TIM15 DMA Control Register (TIM15_DCR)
419
TIM15 DMA Address for Full Transfer (TIM15_DMAR)
420
TIM15 Register Map
420
Table 55. TIM15 Register Map and Reset Values
420
TIM16 and TIM17 Registers
422
TIM16 and TIM17 Control Register 1 (TIM16_CR1 and TIM17_CR1)
422
TIM16 and TIM17 Control Register 2 (TIM16_CR2 and TIM17_CR2)
423
TIM16 and TIM17 Dma/Interrupt Enable Register
424
Tim17_Dier)
424
TIM16 and TIM17 Status Register (TIM16_SR and TIM17_SR)
425
TIM16 and TIM17 Event Generation Register
426
Tim17_Egr)
426
TIM16 and TIM17 Capture/Compare Mode Register
427
Tim17_Ccmr1)
427
TIM16 and TIM17 Capture/Compare Enable Register
430
Tim17_Ccer)
430
TIM16 and TIM17 Counter (TIM16_CNT and TIM17_CNT)
432
TIM16 and TIM17 Prescaler (TIM16_PSC and TIM17_PSC)
432
TIM16 and TIM17 Auto-Reload Register (TIM16_ARR and TIM17_ARR)
432
TIM16 and TIM17 Repetition Counter Register
433
Tim17_Rcr)
433
TIM16 and TIM17 Capture/Compare Register
433
Tim17_Ccr1)
433
TIM16 and TIM17 Break and Dead-Time Register
434
Tim17_Bdtr)
434
TIM16 and TIM17 DMA Control Register (TIM16_DCR and TIM17_DCR)
436
TIM16 and TIM17 DMA Address for Full Transfer
436
Tim17_Dmar)
436
TIM16 and TIM17 Register Map
438
Table 57. TIM16 and TIM17 Register Map and Reset Values
438
Basic Timer (TIM6)
440
TIM6 Introduction
440
TIM6 Main Features
440
Figure 181. Basic Timer Block Diagram
440
TIM6 Functional Description
441
Time-Base Unit
441
Figure 182. Counter Timing Diagram with Prescaler Division Change from 1 to 2
442
Figure 183. Counter Timing Diagram with Prescaler Division Change from 1 to 4
442
Counter Modes
443
Figure 184. Counter Timing Diagram, Internal Clock Divided by 1
443
Figure 185. Counter Timing Diagram, Internal Clock Divided by 2
444
Figure 186. Counter Timing Diagram, Internal Clock Divided by 4
444
Figure 187. Counter Timing Diagram, Internal Clock Divided by N
444
Clock Source
446
Debug Mode
446
Figure 190. Control Circuit in Normal Mode, Internal Clock Divided by 1
446
TIM6 Registers
447
TIM6 Control Register 1 (TIM6_CR1)
447
TIM6 Control Register 2 (TIM6_CR2)
448
TIM6 Dma/Interrupt Enable Register (TIM6_DIER)
448
TIM6 Status Register (TIM6_SR)
449
TIM6 Event Generation Register (TIM6_EGR)
449
TIM6 Counter (TIM6_CNT)
449
TIM6 Prescaler (TIM6_PSC)
450
TIM6 Auto-Reload Register (TIM6_ARR)
450
TIM6 Register Map
451
Table 58. TIM6 Register Map and Reset Values
451
Infrared (IRTIM) Interface
452
Main Features
452
Figure 191. IR Internal Hardware Connections with TIM16 and TIM17
452
Independent Watchdog (IWDG)
453
Introduction
453
IWDG Main Features
453
IWDG Functional Description
453
Window Option
453
Hardware Watchdog
454
Register Access Protection
454
Debug Mode
454
IWDG Registers
455
Key Register (IWDG_KR)
455
Figure 192. Independent Watchdog Block Diagram
455
Prescaler Register (IWDG_PR)
456
Reload Register (IWDG_RLR)
457
Status Register (IWDG_SR)
458
Window Register (IWDG_WINR)
459
IWDG Register Map
460
Table 59. IWDG Register Map and Reset Values
460
System Window Watchdog (WWDG)
461
WWDG Introduction
461
WWDG Main Features
461
WWDG Functional Description
461
Figure 193. Watchdog Block Diagram
462
How to Program the Watchdog Timeout
463
Figure 194. Window Watchdog Timing Diagram
463
Debug Mode
464
WWDG Registers
465
Control Register (WWDG_CR)
465
Configuration Register (WWDG_CFR)
466
Status Register (WWDG_SR)
466
WWDG Register Map
467
Table 60. WWDG Register Map and Reset Values
467
Inter-Integrated Circuit (I 2 C) Interface
468
I 2 C Introduction
468
I 2 C Main Features
468
Table 61. I2C Configurations in Goldfish and Manta Edge
468
I2C Implementation
469
I 2 C Functional Description
469
Table 62. Stm32F05Xxx I2C Implementation
469
Figure 195. I2C1 Block Diagram
470
I2C1 Block Diagram
470
C Clock Requirements
471
Figure 196. I2C2 Block Diagram
471
I2C2 Block Diagram
471
Figure 197. I2C Bus Protocol
472
Mode Selection
472
I 2 C Initialization
473
Table 63. Comparison of Analog Vs. Digital Filters
473
Figure 198. Setup and Hold Timings
474
Table 64. I2C-SMBUS Specification Data Setup and Hold Times
475
Figure 199. I2C Initialization Flowchart
476
Software Reset
476
Data Transfer
477
Figure 200. Data Reception
477
Figure 201. Data Transmission
478
I2C Slave Mode
479
Figure 202. Slave Initialization Flowchart
481
Figure 203. Transfer Sequence Flowchart for I2C Slave Transmitter, NOSTRETCH=0
483
Figure 204. Transfer Sequence Flowchart for I2C Slave Transmitter, NOSTRETCH=1
483
Figure 205. Transfer Bus Diagrams for I2C Slave Transmitter
484
Figure 206. Transfer Sequence Flowchart for Slave Receiver with NOSTRETCH=0
485
Figure 207. Transfer Sequence Flowchart for Slave Receiver with NOSTRETCH=1
486
Figure 208. Transfer Bus Diagrams for I2C Slave Receiver
486
I2C Master Mode
487
Figure 209. Master Clock Generation
488
Table 66. I2C-SMBUS Specification Clock Timings
488
Figure 210. Master Initialization Flowchart
490
Figure 211. 10-Bit Address Read Access with HEAD10R=0
490
Figure 212. 10-Bit Address Read Access with HEAD10R=1
491
Figure 213. Transfer Sequence Flowchart for I2C Master Transmitter for N<=255 Bytes
492
Figure 214. Transfer Sequence Flowchart for I2C Master Transmitter for N>255 Bytes
493
Figure 215. Transfer Bus Diagrams for I2C Master Transmitter
494
Figure 216. Transfer Sequence Flowchart for I2C Master Receiver for N<=255 Bytes
496
Figure 217. Transfer Sequence Flowchart for I2C Master Receiver for N>255 Bytes
497
Figure 218. Transfer Bus Diagrams for I2C Master Receiver
498
I2Cx_Timingr Register Configuration Examples
499
Table 67. Examples of Timings Settings for Fi2Cclk = 8 Mhz
499
Table 68. Examples of Timings Settings for Fi2Cclk = 16 Mhz
499
Table 69. Examples of Timings Settings for Fi2Cclk = 48 Mhz
500
Smbus Specific Features
501
Figure 219. Timeout Intervals for T LOW:SEXT , T LOW:MEXT
503
Table 70. Table
503
Smbus Initialization
504
Smbus: I2Cx_Timeoutr Register Configuration Examples
505
Smbus Slave Mode
506
Table 72. Examples of TIMEOUTA Settings for Various I2CCLK Frequencies
506
Table 73. Examples of TIMEOUTB Settings for Various I2CCLK Frequencies
506
Table 74. Examples of TIMEOUTA Settings for Various I2CCLK Frequencies
506
Figure 220. Transfer Sequence Flowchart for Smbus Slave Transmitter N Bytes + PEC
507
Figure 221. Transfer Bus Diagrams for Smbus Slave Transmitter (SBC=1)
507
Figure 222. Transfer Sequence Flowchart for Smbus Slave Receiver N Bytes + PEC
509
Figure 223. Bus Transfer Diagrams for Smbus Slave Receiver (SBC=1)
510
Figure 224. Bus Transfer Diagrams for Smbus Master Transmitter
511
Figure 225. Bus Transfer Diagrams for Smbus Master Receiver
513
Wakeup from STOP on Address Match
513
Error Conditions
514
DMA Requests
516
I 2 C Interrupts
517
Table 75. I2C Interrupt Requests
517
Figure 226. I2C Interrupt Mapping Diagram
518
I 2 C Debug Mode
519
I 2 C Registers
519
Control Register 1 (I2Cx_Cr1)
519
Control Register 2 (I2Cx_Cr2)
522
Own Address 1 Register (I2Cx_Oar1)
524
Own Address 2 Register (I2Cx_Oar2)
525
Timing Register (I2Cx_Timingr)
526
Timeout Register (I2Cx_Timeoutr)
527
Interrupt and Status Register (I2Cx_Isr)
528
Interrupt Clear Register (I2Cx_Icr)
531
PEC Register (I2Cx_Pecr)
532
Receive Data Register (I2Cx_Rxdr)
532
Transmit Data Register (I2Cx_Txdr)
533
I2C Register Map
534
Table 76. I2C Register Map and Reset Values
534
Real-Time Clock (RTC)
535
Introduction
535
RTC Main Features
535
RTC Functional Description
536
RTC Block Diagram
536
Figure 227. RTC Block Diagram
536
Gpios Controlled by the RTC
537
Table 77. RTC Pin PC13 Configuration
537
Clock and Prescalers
538
Table 78. LSE Pin PC14 Configuration
538
Table 79. LSE Pin PC15 Configuration
538
Real-Time Clock and Calendar
539
Programmable Alarm
539
RTC Initialization and Configuration
540
Reading the Calendar
541
Resetting the RTC
542
RTC Synchronization
542
RTC Reference Clock Detection
543
RTC Smooth Digital Calibration
544
Time-Stamp Function
546
Tamper Detection
546
Calibration Clock Output
548
Alarm Output
548
RTC Low Power Modes
548
Table 80. Effect of Low Power Modes on RTC
548
RTC Interrupts
549
Table 81. Interrupt Control Bits
549
RTC Registers
550
RTC Time Register (RTC_TR)
550
RTC Date Register (RTC_DR)
551
RTC Control Register (RTC_CR)
552
RTC Initialization and Status Register (RTC_ISR)
555
RTC Prescaler Register (RTC_PRER)
557
RTC Alarm a Register (RTC_ALRMAR)
557
RTC Write Protection Register (RTC_WPR)
559
RTC Sub Second Register (RTC_SSR)
560
RTC Shift Control Register (RTC_SHIFTR)
561
RTC Timestamp Time Register (RTC_TSTR)
562
RTC Timestamp Date Register (RTC_TSDR)
562
RTC Time-Stamp Sub Second Register (RTC_TSSSR)
563
RTC Calibration Register (RTC_CALR)
564
RTC Tamper and Alternate Function Configuration Register
565
(Rtc_Tafcr)
565
RTC Alarm a Sub Second Register (RTC_ALRMASSR)
568
RTC Backup Registers (Rtc_Bkpxr)
569
RTC Register Map
569
Table 82. RTC Register Map and Reset Values
569
Universal Synchronous Asynchronous Receiver Transmitter (USART)
571
USART Introduction
571
USART Main Features
571
USART Extended Features
572
USART Implementation
573
USART Functional Description
573
Table 83. Stm32F05Xxx USART Features
573
Figure 228. USART Block Diagram
575
Figure 229. Word Length Programming
576
USART Character Description
576
Figure 230. Configurable Stop Bits
577
Transmitter
577
Figure 231. TC/TXE Behavior When Transmitting
579
Receiver
579
Figure 232. Start Bit Detection When Oversampling by 16 or 8
580
Figure 233. Data Sampling When Oversampling by 16
583
Figure 234. Data Sampling When Oversampling by 8
583
Table 84. Noise Detection from Sampled Data
583
Baud Rate Generation
585
Table 85. Error Calculation for Programmed Baud Rates at F
586
Table 86. Tolerance of the USART Receiver When BRR[3:0] = 0000
587
Tolerance of the USART Receiver to Clock Deviation
587
Auto Baud Rate Detection
588
Figure 235. Mute Mode Using Idle Line Detection
589
Multiprocessor Communication
589
Figure 236. Mute Mode Using Address Mark Detection
590
Modbus Communication
590
Parity Control
591
Table 88. Frame Formats
591
LIN (Local Interconnection Network) Mode
592
Figure 237. Break Detection in LIN Mode (11-Bit Break Length - LBDL Bit Is Set)
593
Figure 238. Break Detection in LIN Mode Vs. Framing Error Detection
594
USART Synchronous Mode
594
Figure 239. USART Example of Synchronous Transmission
595
Figure 240. USART Data Clock Timing Diagram (M=0)
595
Figure 241. USART Data Clock Timing Diagram (M=1)
596
Figure 242. RX Data Setup/Hold Time
596
Single-Wire Half-Duplex Communication
596
Figure 243. ISO 7816-3 Asynchronous Protocol
597
Smartcard Mode
597
Figure 244. Parity Error Detection Using the 1.5 Stop Bits
599
Irda SIR ENDEC Block
601
Figure 245. Irda SIR ENDEC- Block Diagram
603
Figure 246. Irda Data Modulation (3/16) -Normal Mode
603
Continuous Communication Using DMA
604
Figure 247. Transmission Using DMA
605
Figure 248. Reception Using DMA
606
Figure 249. Hardware Flow Control between 2 Usarts
606
Hardware Flow Control and RS485 Driver Enable
606
Figure 250. RTS Flow Control
607
Figure 251. CTS Flow Control
607
Wakeup from Stop Mode
608
USART Interrupts
609
Table 89. USART Interrupt Requests
609
Figure 252. USART Interrupt Mapping Diagram
610
USART Registers
611
Control Register 1 (USART_CR1)
611
Control Register 2 (USART_CR2)
614
Control Register 3 (USART_CR3)
618
Baud Rate Register (USART_BRR)
621
Guard Time and Prescaler Register (USART_GTPR)
622
Receiver Timeout Register (USART_RTOR)
623
Request Register (USART_RQR)
624
Interrupt & Status Register (USART_ISR)
625
Interrupt Flag Clear Register (USART_ICR)
629
Receive Data Register (USART_RDR)
631
Transmit Data Register (USART_TDR)
632
USART Register Map
633
Table 90. USART Register Map and Reset Values
633
Serial Peripheral Interface / Inter-IC Sound (SPI/I2S)
634
Introduction
634
SPI Main Features
634
SPI Extended Features
635
I²S Features
635
SPI/I2S Implementation
635
SPI Functional Description
635
General Description
635
Communications between One Master and One Slave
636
Figure 253. SPI Block Diagram
636
Figure 254. Full-Duplex Single Master/ Single Slave Application
637
Figure 255. Half-Duplex Single Master/ Single Slave Application
637
Standard Multi-Slave Communication
638
Figure 256. Simplex Single Master/Single Slave Application
638
Slave Select (NSS) Pin Management
639
Figure 257. Master and Three Independent Slaves
639
Communication Formats
640
Figure 258. Hardware/Software Slave Select Management
640
Figure 259. Data Clock Timing Diagram
641
Initialize SPI
642
Figure 260. Data Alignment When Data Length Is Not Equal to 8-Bit or 16-Bit
642
Data Transmission and Reception Procedures
643
Figure 261. Packing Data in FIFO for Transmission and Reception
645
SPI Status Flags
646
SPI Error Flags
647
SPI Special Features
648
NSS Pulse Mode
648
TI Mode
649
Figure 262. NSSP Pulse Generation in Motorola SPI Master Mode
649
CRC Calculation
650
Figure 263. TI Mode Transfer
650
SPI Interrupts
652
S Functional Description
652
S General Description
652
Table 91. SPI Interrupt Requests
652
Figure 264. I 2 S Block Diagram
653
Supported Audio Protocols
654
Figure 265. I 2 S Philips Protocol Waveforms (16/32-Bit Full Accuracy, CPOL = 0)
655
Figure 266. I 2 S Philips Standard Waveforms (24-Bit Frame with CPOL = 0)
655
Figure 267. Transmitting 0X8Eaa33
655
Figure 268. Receiving 0X8Eaa33
656
Figure 270. Example of 16-Bit Data Frame Extended to 32-Bit Channel Frame
656
Figure 271. MSB Justified 16-Bit or 32-Bit Full-Accuracy Length with CPOL = 0
657
Figure 272. MSB Justified 24-Bit Frame Length with CPOL = 0
657
Figure 273. MSB Justified 16-Bit Extended to 32-Bit Packet Frame with CPOL = 0
657
Figure 274. LSB Justified 16-Bit or 32-Bit Full-Accuracy with CPOL = 0
658
Figure 275. LSB Justified 24-Bit Frame Length with CPOL = 0
658
Figure 276. Operations Required to Transmit 0X3478Ae
658
Figure 277. Operations Required to Receive 0X3478Ae
659
Figure 278. LSB Justified 16-Bit Extended to 32-Bit Packet Frame with CPOL = 0
659
Figure 279. Example of 16-Bit Data Frame Extended to 32-Bit Channel Frame
659
Clock Generator
660
Figure 280. PCM Standard Waveforms (16-Bit)
660
Figure 281. PCM Standard Waveforms (16-Bit Extended to 32-Bit Packet Frame)
660
Figure 282. Audio Sampling Frequency Definition
661
Figure 283. I 2 S Clock Generator Architecture
661
Table 92. Audio-Frequency Precision Using Standard 8 Mhz HSE
662
I 2 S Master Mode
663
I 2 S Slave Mode
664
I 2 S Status Flags
667
I 2 S Error Flags
668
I 2 S Interrupts
669
DMA Features
669
Table 93. I 2 S Interrupt Requests
669
SPI and I 2 S Registers
670
SPI Control Register 1 (Spix_Cr1)
670
SPI Control Register 2 (Spix_Cr2)
672
SPI Status Register (Spix_Sr)
674
SPI Data Register (Spix_Dr)
676
SPI CRC Polynomial Register (Spix_Crcpr)
676
SPI Rx CRC Register (Spix_Rxcrcr)
677
SPI Tx CRC Register (Spix_Txcrcr)
677
Spix_I 2 S Configuration Register (Spix_I2Scfgr)
678
Spix_I 2 S Prescaler Register (Spix_I2Spr)
679
SPI/I2S Register Map
680
Table 94. SPI Register Map and Reset Values
680
Touch Sensing Controller (TSC)
681
Introduction
681
TSC Main Features
681
TSC Functional Description
682
TSC Block Diagram
682
Surface Charge Transfer Acquisition Overview
682
Figure 284. TSC Block Diagram
682
Figure 285. Surface Charge Transfer Analog I/O Group Structure
683
Reset and Clocks
684
Table 95. Acquisition Sequence Summary
684
Figure 286. Sampling Capacitor Voltage Variation
684
Charge Transfer Acquisition Sequence
685
Figure 287. Charge Transfer Acquisition Sequence
685
Spread Spectrum Feature
686
Max Count Error
686
Table 96. Spread Spectrum Deviation Versus AHB Clock Frequency
686
Figure 288. Spread Spectrum Variation Principle
686
Sampling Capacitor I/O and Channel I/O Mode Selection
687
Table 97. I/O State Depending on Its Mode and IODEF Bit Value
687
Acquisition Mode
688
I/O Hysteresis and Analog Switch Control
688
Capacitive Sensing Gpios
689
TSC Low Power Modes
689
TSC Interrupts
689
Table 98. Capacitive Sensing Gpios Available on Stm32F05Xxx Devices
689
Table 99. Effect of Low Power Modes on TSC
689
Table 100. Interrupt Control Bits
689
TSC Registers
690
TSC Control Register (TSC_CR)
690
TSC Interrupt Enable Register (TSC_IER)
693
TSC Interrupt Clear Register (TSC_ICR)
693
TSC Interrupt Status Register (TSC_ISR)
694
TSC I/O Hysteresis Control Register (TSC_IOHCR)
694
TSC I/O Analog Switch Control Register (TSC_IOASCR)
695
TSC I/O Sampling Control Register (TSC_IOSCR)
695
TSC I/O Channel Control Register (TSC_IOCCR)
696
TSC I/O Group Control Status Register (TSC_IOGCSR)
696
TSC I/O Group X Counter Register (Tsc_Iogxcr) (X=1
697
TSC Register Map
697
Table 101. TSC Register Map and Reset Values
697
HDMI-CEC Controller (HDMI-CEC)
699
Introduction
699
HDMI-CEC Controller Main Features
699
HDMI-CEC Functional Description
700
HDMI-CEC Pin
700
Table 102. HDMI Pin
700
Figure 289. Block Diagram
700
Message Description
701
Bit Timing
701
Figure 290. Message Structure
701
Figure 291. Blocks
701
Arbitration
702
Figure 292. Bit Timings
702
Figure 293. Signal Free Time
702
Figure 294. Arbitration Phase
702
Figure 295. SFT of Three Nominal Bit Periods
703
SFT Option Bit
703
Error Handling
704
Bit Error
704
Message Error
704
Bit Rising Error (BRE)
704
Figure 296. Error Bit Timing
704
Short Bit Period Error (SBPE)
705
Long Bit Period Error (LBPE)
705
Figure 297. Error Handling
705
Table 103. Error Handling Timing Parameters
706
Transmission Error Detection (TXERR)
707
Table 104. TXERR Timing Parameters
707
Figure 298. TXERR Detection
707
HDMI-CEC Interrupts
708
Table 105. HDMI-CEC Interrupts
708
HDMI-CEC Registers
709
CEC Control Register (CEC_CR)
709
CEC Configuration Register (CEC_CFGR)
711
CEC Tx Data Register (CEC_TXDR)
713
CEC Rx Data Register (CEC_RXDR)
713
CEC Interrupt and Status Register (CEC_ISR)
713
CEC Interrupt Enable Register (CEC_IER)
715
HDMI-CEC Register Map
717
Table 106. HDMI-CEC Register Map and Reset Values
717
Debug Support (DBG)
718
Overview
718
Reference ARM Documentation
719
Pinout and Debug Port Pins
719
SW Debug Port Pins
720
Flexible SW-DP Pin Assignment
720
Internal Pull-Up & Pull-Down on SW Pins
720
ID Codes and Locking Mechanism
720
Table 107. SW Debug Port Pins
720
MCU Device ID Code
721
SW Debug Port
721
SW Protocol Introduction
721
SW Protocol Sequence
722
Table 108. Packet Request (8-Bits)
722
Table 109. ACK Response (3 Bits)
722
Table 110. DATA Transfer (33 Bits)
722
SW-DP State Machine (Reset, Idle States, ID Code)
723
DP and AP Read/Write Accesses
723
SW-DP Registers
723
Table 111. SW-DP Registers
723
SW-AP Registers
725
Core Debug
725
Table 112. 32-Bit Debug Port Registers Addressed through the Shifted Value A[3:2]
725
Table 113. Core Debug Registers
725
BPU (Break Point Unit)
726
BPU Functionality
726
DWT (Data Watchpoint)
726
DWT Functionality
726
DWT Program Counter Sample Register
726
MCU Debug Component (DBGMCU)
726
Debug Support for Low-Power Modes
727
Debug Support for Timers, Watchdog and I 2 C
727
Debug MCU Configuration Register (DBGMCU_CR)
728
Debug MCU APB Low Freeze Register (DBGMCU_APB1_FZ)
729
Debug MCU APB2 Freeze Register (DBGMCU_APB2_FZ)
731
DBG Register Map
732
Table 114. DBG Register Map and Reset Values
732
Device Electronic Signature
733
Unique Device ID Register (96 Bits)
733
Memory Size Data Register
735
Flash Size Data Register
735
Revision History
741
Table 115. Document Revision History
741
Advertisement
Advertisement
Related Products
STMicroelectronics STM32F050G6
STMicroelectronics STM32F050K4
STMicroelectronics STM32F050G4
STMicroelectronics STM32F050F6
STMicroelectronics STM32F050F4
STMicroelectronics STM32F050K6
STMicroelectronics STM32F050C4
STMicroelectronics STM32F050C6
STMicroelectronics STM32F038F6
STMicroelectronics STM32F042C6
STMicroelectronics Categories
Motherboard
Microcontrollers
Computer Hardware
Controller
Control Unit
More STMicroelectronics Manuals
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL