Sign In
Upload
Manuals
Brands
ST Manuals
Microcontrollers
STM32F2 Series
ST STM32F2 Series Manuals
Manuals and User Guides for ST STM32F2 Series. We have
5
ST STM32F2 Series manuals available for free PDF download: User Manual, Application Note
ST STM32F2 Series User Manual (1372 pages)
Description of STM32F2 HAL and Low Layer drivers
Brand:
ST
| Category:
Microcontrollers
| Size: 31 MB
Table of Contents
Description of STM32F2 HAL and Low Layer Drivers
1
Table of Contents
2
List of Tables
24
List of Figures
25
1 Acronyms and Definitions
26
Table 1: Acronyms and Definitions
26
2 Overview of HAL Drivers
28
HAL and User-Application Files
28
HAL Driver Files
28
Table 2: HAL Driver Files
28
User-Application Files
30
Table 3: User-Application Files
30
HAL Data Structures
31
Peripheral Handle Structures
31
Figure 1: Example of Project Template
31
Initialization and Configuration Structure
33
Specific Process Structures
33
API Classification
33
Devices Supported by HAL Drivers
34
Table 4: API Classification
34
Table 5: List of Devices Supported by the HAL Drivers
34
HAL Driver Rules
36
HAL API Naming Rules
36
Table 6: HAL API Naming Rules
36
HAL General Naming Rules
37
Table 7: Macros Handling Interrupts and Specific Clock Configurations
37
HAL Interrupt Handler and Callback Functions
38
Table 8: Callback Functions
38
HAL Generic Apis
39
Table 9: HAL Generic Apis
39
HAL Extension Model Overview
40
Table 10: HAL Extension Apis
40
Figure 2: Adding Family-Specific Functions
41
Figure 3: Adding New Peripherals
41
HAL Extension Model Cases
41
Figure 4: Updating Existing Apis
42
Updating Existing Common Apis
42
Updating Existing Data Structures
42
File Inclusion Model
43
HAL Common Resources
43
Figure 5: File Inclusion Model
43
HAL Configuration
44
Table 11: Define Statements Used for HAL Configuration
44
HAL System Peripheral Handling
46
Clock
46
Gpios
46
Configuring Gpios as Output Push-Pull to Drive External Leds
47
Configuring PA0 as External Interrupt with Falling Edge Sensitivity:
47
Table 12: Description of Gpio_Inittypedef Structure
47
Cortex NVIC and Systick Timer
48
Pwr
48
Exti
48
Dma
49
Table 13: Description of EXTI Configuration Macros
49
Interrupt Mode I/O Operation
50
Polling Mode I/O Operation
50
How to Use HAL Drivers
51
HAL Usage Models
51
Figure 6: HAL Driver Model
51
HAL Global Initialization
52
System Clock Initialization
52
HAL MSP Initialization Process
53
Table 14: MSP Functions
53
HAL IO Operation Process
54
Interrupt Mode
54
Polling Mode
54
DMA Mode
55
Timeout and Error Management
57
Example of Fixed Timeout
57
Table 15: Timeout Values
57
Error Management
58
Run-Time Checking
59
3 Overview of Low Layer Drivers
61
Low Layer Files
61
Table 16: LL Driver Files
61
The LL Drivers Feature
61
Figure 7: Low Layer Driver Folders
62
Overview of Low Layer Apis and Naming Rules
63
Peripheral Initialization Functions
63
Figure 8: Low Layer Driver CMSIS Files
63
Table 17: Common Peripheral Initialization Functions
64
Table 18: Optional Peripheral Initialization Functions
65
Peripheral Register-Level Configuration Functions
67
Table 19: Specific Interrupt, DMA Request and Status Flags Management
67
Table 20: Available Function Formats
67
Table 21: Peripheral Clock Activation/Deactivation Management
67
Table 22: Peripheral Activation/Deactivation Management
68
Table 23: Peripheral Configuration Management
68
Table 24: Peripheral Register Management
68
4 Cohabiting of HAL and LL
69
Low Layer Driver Used in Standalone Mode
69
Mixed Use of Low Layer Apis and HAL Drivers
69
5 HAL System Driver
70
HAL Firmware Driver API Description
70
How to Use this Driver
70
HAL Control Functions
70
Initialization and De-Initialization Functions
70
Detailed Description of Functions
71
Hal_Deinit
71
Hal_Init
71
Hal_Mspinit
71
Hal_Delay
72
Hal_Inctick
72
Hal_Inittick
72
Hal_Mspdeinit
72
Hal_Gethalversion
73
Hal_Gettick
73
Hal_Resumetick
73
Hal_Suspendtick
73
Hal_Dbgmcu_Disabledbgsleepmode
74
Hal_Dbgmcu_Disabledbgstopmode
74
Hal_Dbgmcu_Enabledbgsleepmode
74
Hal_Dbgmcu_Enabledbgstopmode
74
HAL Firmware Driver Defines
75
Hal_Disablecompensationcell
75
Hal_Getuid
75
HAL Exported Macros
75
6 HAL ADC Generic Driver
77
ADC Firmware Driver Registers Structures
77
Adc_Inittypedef
77
Adc_Channelconftypedef
78
Adc_Analogwdgconftypedef
79
Adc_Handletypedef
80
ADC Firmware Driver API Description
80
ADC Peripheral Features
80
Configuration of ADC, Groups Regular/Injected, Channels Parameters
81
Execution of ADC Conversions
81
Interrupt Mode IO Operation
81
Polling Mode IO Operation
81
How to Use this Driver
81
ADC HAL Driver Macros List
82
Deinitialization of ADC
82
DMA Mode IO Operation
82
Initialization and De-Initialization Functions
83
Peripheral Control Functions
83
IO Operation Functions
83
Peripheral State and Errors Functions
84
Detailed Description of Functions
84
Hal_Adc_Mspdeinit
85
Hal_Adc_Pollforconversion
85
Hal_Adc_Start
85
Hal_Adc_Stop
85
Hal_Adc_Irqhandler
86
Hal_Adc_Pollforevent
86
Hal_Adc_Start_It
86
Hal_Adc_Stop_It
86
Hal_Adc_Convcpltcallback
87
Hal_Adc_Getvalue
87
Hal_Adc_Start_Dma
87
Hal_Adc_Stop_Dma
87
Hal_Adc_Analogwdgconfig
88
Hal_Adc_Configchannel
88
Hal_Adc_Errorcallback
88
Hal_Adc_Leveloutofwindowcallback
88
ADC Firmware Driver Defines
89
Hal_Adc_Getstate
89
Hal_Adc_Geterror
89
ADC Analog Watchdog Selection
89
7 HAL ADC Extension Driver
96
Adcex Firmware Driver Registers Structures
96
Adc_Injectionconftypedef
96
Adc_Multimodetypedef
97
Adcex Firmware Driver API Description
98
How to Use this Driver
98
Extended Features Functions
99
Hal_Adcex_Injectedpollforconversion
100
Hal_Adcex_Injectedstart
100
Hal_Adcex_Injectedstop
100
Detailed Description of Functions
100
Hal_Adcex_Injectedgetvalue
101
Hal_Adcex_Injectedstop_It
101
Hal_Adcex_Multimodestart_Dma
101
Hal_Adcex_Injectedconfigchannel
102
Hal_Adcex_Injectedconvcpltcallback
102
Hal_Adcex_Multimodegetvalue
102
Hal_Adcex_Multimodestop_Dma
102
Adcex Firmware Driver Defines
103
8 HAL CAN Generic Driver
105
Can_Inittypedef
105
CAN Firmware Driver Registers Structures
105
Can_Filterconftypedef
106
Cantxmsgtypedef
107
Canrxmsgtypedef
107
Can_Handletypedef
108
CAN Firmware Driver API Description
108
How to Use this Driver
108
Initialization and De-Initialization Functions
109
Peripheral State and Error Functions
110
Hal_Can_Configfilter
110
Hal_Can_Init
110
IO Operation Functions
110
Detailed Description of Functions
110
Hal_Can_Deinit
111
Hal_Can_Mspdeinit
111
Hal_Can_Mspinit
111
Hal_Can_Transmit
111
Hal_Can_Receive
112
Hal_Can_Receive_It
112
Hal_Can_Sleep
112
Hal_Can_Wakeup
112
Hal_Can_Errorcallback
113
Hal_Can_Geterror
113
Hal_Can_Rxcpltcallback
113
Hal_Can_Txcpltcallback
113
CAN Firmware Driver Defines
114
9 HAL CORTEX Generic Driver
122
CORTEX Firmware Driver Registers Structures
122
Mpu_Region_Inittypedef
122
How to Configure Interrupts Using CORTEX HAL Driver
123
How to Configure Systick Using CORTEX HAL Driver
123
CORTEX Firmware Driver API Description
123
How to Use this Driver
123
Initialization and De-Initialization Functions
123
Hal_Nvic_Setprioritygrouping
124
Peripheral Control Functions
124
Detailed Description of Functions
124
Hal_Nvic_Disableirq
125
Hal_Nvic_Enableirq
125
Hal_Nvic_Setpriority
125
Hal_Nvic_Systemreset
125
Hal_Nvic_Getpendingirq
126
Hal_Nvic_Getpriority
126
Hal_Nvic_Getprioritygrouping
126
Hal_Nvic_Clearpendingirq
127
Hal_Nvic_Getactive
127
Hal_Nvic_Setpendingirq
127
Hal_Systick_Clksourceconfig
127
Hal_Mpu_Disable
128
Hal_Mpu_Enable
128
Hal_Systick_Callback
128
Hal_Systick_Irqhandler
128
CORTEX Firmware Driver Defines
129
10 HAL CRC Generic Driver
132
Crc_Handletypedef
132
CRC Firmware Driver API Description
132
CRC Firmware Driver Registers Structures
132
How to Use this Driver
132
Initialization and De-Initialization Functions
132
Peripheral Control Functions
133
Peripheral State Functions
133
Detailed Description of Functions
133
Hal_Crc_Accumulate
134
Hal_Crc_Calculate
134
Hal_Crc_Getstate
134
Hal_Crc_Mspdeinit
134
CRC Firmware Driver Defines
135
11 HAL CRYP Generic Driver
136
Cryp_Inittypedef
136
Cryp_Handletypedef
136
CRYP Firmware Driver Registers Structures
136
CRYP Firmware Driver API Description
137
How to Use this Driver
137
AES Processing Functions
138
Initialization and De-Initialization Functions
138
DES Processing Functions
139
TDES Processing Functions
139
DMA Callback Functions
140
CRYP IRQ Handler Management
140
Peripheral State Functions
140
Detailed Description of Functions
140
Hal_Cryp_Aesecb_Decrypt
141
Hal_Cryp_Aesecb_Encrypt
141
Hal_Cryp_Mspdeinit
141
Hal_Cryp_Mspinit
141
Hal_Cryp_Aescbc_Decrypt
142
Hal_Cryp_Aescbc_Encrypt
142
Hal_Cryp_Aesctr_Encrypt
142
Hal_Cryp_Aescbc_Encrypt_It
143
Hal_Cryp_Aesctr_Decrypt
143
Hal_Cryp_Aesecb_Encrypt_It
143
Hal_Cryp_Aescbc_Decrypt_It
144
Hal_Cryp_Aesctr_Decrypt_It
144
Hal_Cryp_Aesctr_Encrypt_It
144
Hal_Cryp_Aesecb_Decrypt_It
144
Hal_Cryp_Aescbc_Encrypt_Dma
145
Hal_Cryp_Aesecb_Decrypt_Dma
145
Hal_Cryp_Aesecb_Encrypt_Dma
145
Hal_Cryp_Aescbc_Decrypt_Dma
146
Hal_Cryp_Aesctr_Decrypt_Dma
146
Hal_Cryp_Aesctr_Encrypt_Dma
146
Hal_Cryp_Descbc_Decrypt
147
Hal_Cryp_Descbc_Encrypt
147
Hal_Cryp_Desecb_Decrypt
147
Hal_Cryp_Desecb_Encrypt
147
Hal_Cryp_Descbc_Encrypt_It
148
Hal_Cryp_Desecb_Decrypt_It
148
Hal_Cryp_Desecb_Encrypt_It
148
Hal_Cryp_Descbc_Decrypt_It
149
Hal_Cryp_Descbc_Encrypt_Dma
149
Hal_Cryp_Desecb_Decrypt_Dma
149
Hal_Cryp_Desecb_Encrypt_Dma
149
Hal_Cryp_Descbc_Decrypt_Dma
150
Hal_Cryp_Tdescbc_Encrypt
150
Hal_Cryp_Tdesecb_Encrypt
150
Hal_Cryp_Tdescbc_Decrypt
151
Hal_Cryp_Tdesecb_Decrypt
151
Hal_Cryp_Tdesecb_Encrypt_It
151
Hal_Cryp_Tdescbc_Decrypt_It
152
Hal_Cryp_Tdescbc_Encrypt_It
152
Hal_Cryp_Tdesecb_Decrypt_It
152
Hal_Cryp_Tdesecb_Encrypt_Dma
152
Hal_Cryp_Tdescbc_Decrypt_Dma
153
Hal_Cryp_Tdescbc_Encrypt_Dma
153
Hal_Cryp_Tdesecb_Decrypt_Dma
153
Hal_Cryp_Errorcallback
154
Hal_Cryp_Incpltcallback
154
Hal_Cryp_Irqhandler
154
Hal_Cryp_Outcpltcallback
154
CRYP Data Type
155
CRYP Firmware Driver Defines
155
12 HAL DAC Generic Driver
159
DAC Firmware Driver Registers Structures
159
Dac_Handletypedef
159
Dac_Channelconftypedef
159
DAC Firmware Driver API Description
160
DAC Peripheral Features
160
DAC Buffer Mode Feature
160
DAC Channels
160
DAC Data Value to Voltage Correspondence
161
DAC HAL Driver Macros List
161
DMA Requests
161
How to Use this Driver
161
Initialization and De-Initialization Functions
162
IO Operation Functions
162
Peripheral Control Functions
162
Peripheral State and Errors Functions
162
Hal_Dac_Deinit
163
Hal_Dac_Init
163
Hal_Dac_Mspdeinit
163
Hal_Dac_Mspinit
163
Detailed Description of Functions
163
Hal_Dac_Start
164
Hal_Dac_Start_Dma
164
Hal_Dac_Stop
164
Hal_Dac_Configchannel
165
Hal_Dac_Getvalue
165
Hal_Dac_Setvalue
165
Hal_Dac_Stop_Dma
165
Hal_Dac_Convcpltcallbackch1
166
Hal_Dac_Geterror
166
Hal_Dac_Getstate
166
Hal_Dac_Irqhandler
166
DAC Firmware Driver Defines
167
Hal_Dac_Convhalfcpltcallbackch1
167
Hal_Dac_Errorcallbackch1
167
Hal_Dac_Dmaunderruncallbackch1
167
DAC Exported Macros
168
DAC IT Definition
170
DAC Output Buffer
170
DAC Trigger Selection
170
13 HAL DAC Extension Driver
171
Dacex Firmware Driver API Description
171
Detailed Description of Functions
171
Extended Features Functions
171
Hal_Dacex_Dualgetvalue
171
Hal_Dacex_Trianglewavegenerate
171
How to Use this Driver
171
Hal_Dacex_Noisewavegenerate
172
Hal_Dacex_Convcpltcallbackch2
173
Hal_Dacex_Dualsetvalue
173
Dac_Dmaconvcpltch2
174
Hal_Dacex_Convhalfcpltcallbackch2
174
Hal_Dacex_Dmaunderruncallbackch2
174
Hal_Dacex_Errorcallbackch2
174
Dacex Firmware Driver Defines
175
Dac_Dmahalfconvcpltch2
175
14 HAL DCMI Generic Driver
177
Dcmi_Codesinittypedef
177
Dcmi_Inittypedef
177
DCMI Firmware Driver Registers Structures
177
Dcmi_Handletypedef
178
DCMI Firmware Driver API Description
178
How to Use this Driver
178
DCMI HAL Driver Macros List
179
Initialization and Configuration Functions
179
IO Operation Functions
179
Peripheral Control Functions
180
Peripheral State and Errors Functions
180
Detailed Description of Functions
180
Hal_Dcmi_Mspdeinit
181
Hal_Dcmi_Mspinit
181
Hal_Dcmi_Start_Dma
181
Hal_Dcmi_Stop
181
Hal_Dcmi_Errorcallback
182
Hal_Dcmi_Frameeventcallback
182
Hal_Dcmi_Lineeventcallback
182
Hal_Dcmi_Resume
182
Hal_Dcmi_Configcrop
183
Hal_Dcmi_Enablecrop
183
Hal_Dcmi_Hsynccallback
183
Hal_Dcmi_Vsynccallback
183
DCMI Firmware Driver Defines
184
Hal_Dcmi_Disablecrop
184
Hal_Dcmi_Getstate
184
Hal_Dcmi_Geterror
184
15 HAL DMA Generic Driver
190
Dma_Inittypedef
190
DMA Firmware Driver Registers Structures
190
__Dma_Handletypedef
191
DMA Firmware Driver API Description
192
How to Use this Driver
192
DMA HAL Driver Macros List
193
Initialization and De-Initialization Functions
193
IO Operation Functions
193
Hal_Dma_Deinit
194
Hal_Dma_Init
194
Hal_Dma_Start
194
State and Errors Functions
194
Detailed Description of Functions
194
Hal_Dma_Abort
195
Hal_Dma_Abort_It
195
Hal_Dma_Pollfortransfer
195
Hal_Dma_Start_It
195
Hal_Dma_Cleancallbacks
196
Hal_Dma_Irqhandler
196
Hal_Dma_Registercallback
196
Hal_Dma_Unregistercallback
196
Hal_Dma_Geterror
197
Hal_Dma_Getstate
197
DMA Firmware Driver Defines
197
DMA Handle Index
199
DMA Interrupt Enable Definitions
199
DMA Memory Burst
199
DMA Memory Data Size
199
16 HAL DMA Extension Driver
201
Dmaex Firmware Driver API Description
201
Detailed Description of Functions
201
Extended Features Functions
201
Hal_Dmaex_Multibufferstart
201
How to Use this Driver
201
Hal_Dmaex_Changememory
202
Hal_Dmaex_Multibufferstart_It
202
17 HAL ETH Generic Driver
203
Eth_Inittypedef
203
Eth_Macinittypedef
203
ETH Firmware Driver Registers Structures
203
Uint32_T Eth_Macinittypedef::carriersense
204
Uint32_T Eth_Macinittypedef::interframegap
204
Uint32_T Eth_Macinittypedef::jabber
204
Uint32_T Eth_Macinittypedef::watchdog
204
Eth_Dmainittypedef
206
Eth_Dmadesctypedef
207
Eth_Dmarxframeinfos
208
Eth_Handletypedef
208
ETH Firmware Driver API Description
209
How to Use this Driver
209
Initialization and De-Initialization Functions
209
IO Operation Functions
210
Peripheral Control Functions
210
Peripheral State Functions
210
Hal_Eth_Deinit
211
Hal_Eth_Init
211
Hal_Eth_Mspdeinit
211
Hal_Eth_Mspinit
211
Detailed Description of Functions
211
Hal_Eth_Dmarxdesclistinit
212
Hal_Eth_Getreceivedframe
212
Hal_Eth_Readphyregister
212
Hal_Eth_Transmitframe
212
Hal_Eth_Getreceivedframe_It
213
Hal_Eth_Irqhandler
213
Hal_Eth_Txcpltcallback
213
Hal_Eth_Writephyregister
213
Hal_Eth_Configmac
214
Hal_Eth_Errorcallback
214
Hal_Eth_Start
214
Hal_Eth_Stop
214
Hal_Eth_Getstate
215
ETH Firmware Driver Defines
215
ETH Carrier Sense
216
ETH Checksum Mode
216
ETH Checksum Offload
216
ETH Deferral Check
216
ETH DMA Interrupts
217
ETH DMA Overflow
218
ETH DMA Receive Process State
218
ETH DMA RX Descriptor
218
ETH DMA Rx Descriptor Buffers
220
ETH DMA Transmit Process State
220
ETH DMA TX Descriptor
220
ETH DMA Tx Descriptor Checksum Insertion Control
221
ETH DMA Tx Descriptor Segment
221
ETH Drop TCP IP Checksum Error Frame
221
ETH Duplex Mode
222
ETH Exported Macros
222
ETH Flush Received Frame
236
ETH Forward Error Frames
236
ETH Forward Undersized Good Frames
236
ETH Inter Frame Gap
236
ETH MAC Addresses Filter SA da
237
ETH MAC Flags
237
ETH MAC Interrupts
237
ETH Media Interface
237
ETH Pass Control Frames
238
ETH Pause Low Threshold
238
ETH PMT Flags
238
ETH Promiscuous Mode
238
18 HAL FLASH Generic Driver
243
Flash_Processtypedef
243
FLASH Peripheral Features
243
FLASH Firmware Driver Registers Structures
243
FLASH Firmware Driver API Description
243
How to Use this Driver
243
Programming Operation Functions
244
Peripheral Control Functions
244
Peripheral Errors Functions
244
Hal_Flash_Endofoperationcallback
245
Hal_Flash_Irqhandler
245
Hal_Flash_Program
245
Hal_Flash_Program_It
245
Detailed Description of Functions
245
Hal_Flash_Lock
246
Hal_Flash_Ob_Unlock
246
Hal_Flash_Operationerrorcallback
246
Hal_Flash_Unlock
246
FLASH Firmware Driver Defines
247
Flash_Waitforlastoperation
247
FLASH Error Code
247
FLASH Exported Macros
247
19 HAL FLASH Extension Driver
253
Flash_Eraseinittypedef
253
Flash_Obprograminittypedef
253
Flashex Firmware Driver Registers Structures
253
Flashex Firmware Driver API Description
254
Detailed Description of Functions
254
Extended Programming Operation Functions
254
Flash Extension Features
254
Hal_Flashex_Erase
254
How to Use this Driver
254
Flash_Erase_Sector
255
Hal_Flashex_Erase_It
255
Hal_Flashex_Obgetconfig
255
Hal_Flashex_Obprogram
255
Flashex Firmware Driver Defines
256
Flash_Flushcaches
256
20 HAL GPIO Generic Driver
259
GPIO Firmware Driver Registers Structures
259
Gpio_Inittypedef
259
GPIO Peripheral Features
259
GPIO Firmware Driver API Description
259
How to Use this Driver
260
Initialization and De-Initialization Functions
260
IO Operation Functions
260
Hal_Gpio_Deinit
261
Hal_Gpio_Init
261
Hal_Gpio_Readpin
261
Hal_Gpio_Writepin
261
Detailed Description of Functions
261
Hal_Gpio_Exti_Callback
262
Hal_Gpio_Exti_Irqhandler
262
Hal_Gpio_Lockpin
262
Hal_Gpio_Togglepin
262
GPIO Firmware Driver Defines
263
21 HAL GPIO Extension Driver
267
Gpioex Firmware Driver Defines
267
22 HAL HASH Generic Driver
268
Hash_Inittypedef
268
Hash_Handletypedef
268
HASH Firmware Driver Registers Structures
268
HASH Firmware Driver API Description
269
How to Use this Driver
269
HASH Processing Using Polling Mode Functions
270
HASH Processing Using Interrupt Mode Functions
270
HASH Processing Using DMA Mode Functions
270
HMAC Processing Using Polling Mode Functions
270
HMAC Processing Using DMA Mode Functions
271
Hal_Hash_Init
271
Peripheral State Functions
271
Initialization and De-Initialization Functions
271
Detailed Description of Functions
271
Hal_Hash_Deinit
272
Hal_Hash_Md5_Start
272
Hal_Hash_Sha1_Start
272
Hal_Hash_Md5_Accumulate
273
Hal_Hash_Sha1_Accumulate
273
Hal_Hmac_Sha1_Start
273
Hal_Hash_Md5_Start_It
274
Hal_Hash_Sha1_Start_It
274
Hal_Hmac_Md5_Start
274
Hal_Hash_Md5_Finish
275
Hal_Hash_Md5_Start_Dma
275
Hal_Hash_Sha1_Finish
275
Hal_Hash_Sha1_Start_Dma
275
Hal_Hash_Getstate
276
Hal_Hash_Irqhandler
276
Hal_Hmac_Md5_Start_Dma
276
Hal_Hmac_Sha1_Start_Dma
276
Hal_Hash_Dgstcpltcallback
277
Hal_Hash_Incpltcallback
277
Hal_Hash_Mspdeinit
277
Hal_Hash_Mspinit
277
HASH Firmware Driver Defines
278
23 HAL HCD Generic Driver
280
Hcd_Handletypedef
280
HCD Firmware Driver API Description
280
HCD Firmware Driver Registers Structures
280
How to Use this Driver
280
Hal_Hcd_Init
281
Initialization and De-Initialization Functions
281
IO Operation Functions
281
Peripheral Control Functions
281
Peripheral State Functions
281
Detailed Description of Functions
281
Hal_Hcd_Deinit
282
Hal_Hcd_Hc_Halt
282
Hal_Hcd_Hc_Init
282
Hal_Hcd_Mspinit
282
Hal_Hcd_Hc_Submitrequest
283
Hal_Hcd_Irqhandler
283
Hal_Hcd_Mspdeinit
283
Hal_Hcd_Sof_Callback
283
Hal_Hcd_Connect_Callback
284
Hal_Hcd_Disconnect_Callback
284
Hal_Hcd_Hc_Notifyurbchange_Callback
284
Hal_Hcd_Resetport
284
Hal_Hcd_Getstate
285
Hal_Hcd_Hc_Geturbstate
285
Hal_Hcd_Hc_Getxfercount
285
Hal_Hcd_Stop
285
Hal_Hcd_Getcurrentframe
286
Hal_Hcd_Getcurrentspeed
286
HCD Firmware Driver Defines
286
24 HAL I2C Generic Driver
288
I2C_Inittypedef
288
I2C_Handletypedef
288
I2C Firmware Driver Registers Structures
288
I2C Firmware Driver API Description
289
How to Use this Driver
289
Interrupt Mode IO MEM Operation
292
I2C HAL Driver Macros List
293
Initialization and De-Initialization Functions
293
IO Operation Functions
294
Peripheral State, Mode and Error Functions
296
Hal_I2C_Deinit
296
Hal_I2C_Init
296
Hal_I2C_Mspinit
296
Detailed Description of Functions
296
Hal_I2C_Master_Receive
297
Hal_I2C_Slave_Receive
297
Hal_I2C_Slave_Transmit
297
Hal_I2C_Isdeviceready
298
Hal_I2C_Mem_Read
298
Hal_I2C_Mem_Write
298
Hal_I2C_Master_Receive_It
299
Hal_I2C_Master_Transmit_It
299
Hal_I2C_Slave_Transmit_It
299
Hal_I2C_Mem_Read_It
300
Hal_I2C_Mem_Write_It
300
Hal_I2C_Slave_Receive_It
300
Hal_I2C_Master_Sequential_Receive_It
301
Hal_I2C_Master_Sequential_Transmit_It
301
Hal_I2C_Slave_Sequential_Transmit_It
301
Hal_I2C_Enablelisten_It
302
Hal_I2C_Master_Abort_It
302
Hal_I2C_Slave_Sequential_Receive_It
302
Hal_I2C_Disablelisten_It
303
Hal_I2C_Master_Receive_Dma
303
Hal_I2C_Master_Transmit_Dma
303
Hal_I2C_Slave_Transmit_Dma
303
Hal_I2C_Mem_Read_Dma
304
Hal_I2C_Mem_Write_Dma
304
Hal_I2C_Slave_Receive_Dma
304
Hal_I2C_Er_Irqhandler
305
Hal_I2C_Ev_Irqhandler
305
Hal_I2C_Masterrxcpltcallback
305
Hal_I2C_Mastertxcpltcallback
305
Hal_I2C_Addrcallback
306
Hal_I2C_Listencpltcallback
306
Hal_I2C_Memtxcpltcallback
306
Hal_I2C_Slaverxcpltcallback
306
Hal_I2C_Abortcpltcallback
307
Hal_I2C_Errorcallback
307
Hal_I2C_Getmode
307
Hal_I2C_Getstate
307
I2C Firmware Driver Defines
308
I2C Exported Macros
308
25 HAL I2S Generic Driver
314
I2S_Inittypedef
314
I2S_Handletypedef
314
I2S Firmware Driver Registers Structures
314
I2S Firmware Driver API Description
315
How to Use this Driver
315
Initialization and De-Initialization Functions
317
IO Operation Functions
317
Hal_I2S_Deinit
318
Hal_I2S_Init
318
Hal_I2S_Mspinit
318
Peripheral State and Errors Functions
318
Detailed Description of Functions
318
Hal_I2S_Mspdeinit
319
Hal_I2S_Receive
319
Hal_I2S_Transmit
319
Hal_I2S_Receive_It
320
Hal_I2S_Transmit_It
320
Hal_I2S_Irqhandler
321
Hal_I2S_Receive_Dma
321
Hal_I2S_Transmit_Dma
321
Hal_I2S_Dmapause
322
Hal_I2S_Dmaresume
322
Hal_I2S_Dmastop
322
Hal_I2S_Getstate
322
Hal_I2S_Rxcpltcallback
323
Hal_I2S_Rxhalfcpltcallback
323
Hal_I2S_Txcpltcallback
323
Hal_I2S_Txhalfcpltcallback
323
I2S Firmware Driver Defines
323
I2S Exported Macros
324
26 HAL IRDA Generic Driver
328
IRDA Firmware Driver Registers Structures
328
Irda_Inittypedef
328
Irda_Handletypedef
328
IRDA Firmware Driver API Description
329
How to Use this Driver
329
IRDA HAL Driver Macros List
330
Initialization and Configuration Functions
330
IO Operation Functions
331
Hal_Irda_Deinit
332
Hal_Irda_Init
332
Peripheral State and Errors Functions
332
Detailed Description of Functions
332
Hal_Irda_Mspdeinit
333
Hal_Irda_Mspinit
333
Hal_Irda_Receive
333
Hal_Irda_Transmit
333
Hal_Irda_Receive_Dma
334
Hal_Irda_Receive_It
334
Hal_Irda_Transmit_Dma
334
Hal_Irda_Transmit_It
334
Hal_Irda_Abort
335
Hal_Irda_Dmapause
335
Hal_Irda_Dmaresume
335
Hal_Irda_Dmastop
335
Hal_Irda_Abortreceive
336
Hal_Irda_Aborttransmit
336
Hal_Irda_Abort_It
336
Hal_Irda_Abortreceive_It
337
Hal_Irda_Aborttransmit_It
337
Hal_Irda_Irqhandler
338
Hal_Irda_Rxcpltcallback
338
Hal_Irda_Txcpltcallback
338
Hal_Irda_Txhalfcpltcallback
338
Hal_Irda_Abortcpltcallback
339
Hal_Irda_Abortreceivecpltcallback
339
Hal_Irda_Aborttransmitcpltcallback
339
Hal_Irda_Errorcallback
339
IRDA Firmware Driver Defines
340
Hal_Irda_Geterror
340
IRDA Error Code
340
IRDA Exported Macros
340
27 HAL IWDG Generic Driver
347
Iwdg_Inittypedef
347
Iwdg_Handletypedef
347
IWDG Generic Features
347
IWDG Firmware Driver Registers Structures
347
IWDG Firmware Driver API Description
347
How to Use this Driver
348
Initialization and Start Functions
348
IO Operation Functions
348
IWDG HAL Driver Macros List
348
Hal_Iwdg_Init
349
Hal_Iwdg_Refresh
349
IWDG Firmware Driver Defines
349
Detailed Description of Functions
349
28 HAL MMC Generic Driver
351
Hal_Mmc_Cardinfotypedef
351
Mmc_Handletypedef
351
MMC Firmware Driver Registers Structures
351
Hal_Mmc_Cardcsdtypedef
352
Hal_Mmc_Cardcidtypedef
354
Hal_Mmc_Cardstatustypedef
355
MMC Firmware Driver API Description
356
How to Use this Driver
356
MMC Card Initialization and Configuration
357
MMC Card Read Operation
357
MMC Card Write Operation
357
MMC Card CID Register
358
MMC Card CSD Register
358
MMC Card Information
358
MMC Card Status
358
Hal_Mmc_Deinit
359
Hal_Mmc_Init
359
Hal_Mmc_Initcard
359
Hal_Mmc_Mspinit
359
Detailed Description of Functions
359
Hal_Mmc_Readblocks_Dma
360
Hal_Mmc_Readblocks_It
360
Hal_Mmc_Writeblocks_Dma
360
Hal_Mmc_Writeblocks_It
360
Hal_Mmc_Abortcallback
361
Hal_Mmc_Configwidebusoperation
361
Hal_Mmc_Getcardcid
361
Hal_Mmc_Getcardstate
361
MMC Firmware Driver Defines
362
Hal_Mmc_Abort
362
Hal_Mmc_Abort_It
362
MMC Memory Cards
364
MMC Exported Macros
364
Advertisement
ST STM32F2 Series User Manual (108 pages)
Brand:
ST
| Category:
Microcontrollers
| Size: 1 MB
Table of Contents
1 About this Document
2
Purpose and Scope
2
Terms and Abbreviations
2
Table 1. Terms and Abbreviations
2
Reference Normative
3
Table 2. Mapping between this Document Content and IEC 61508-2 Annex D Requirements
3
2 STM32F2 Series Microcontroller Development Process
5
Stmicroelectronics Standard Development Process
5
3 Reference Safety Architecture
7
Safety Architecture Introduction
7
Compliant Item
7
Definition of the Compliant Item
7
Safety Functions Performed by the Compliant Item
7
Reference Safety Architectures - 1Oo1
8
Reference Safety Architectures - 1Oo2
8
Assumed Requirements
10
Assumed Safety Requirements
10
Electrical Specifications and Environment Limits
11
Systematic Safety Integrity
11
Description of Hardware and Software Diagnostics
11
Table 3. SS1 and SS2 Safe State Details
11
Table 4. Safety Mechanism Field Explanation
12
Arm Cortex -M3 CPU
13
Table 5. CPU_SM_0
13
Table 6. CPU_SM_1
13
Table 7. CPU_SM_2
14
Table 8. CPU_SM_3
14
Table 10. CPU_SM_5
15
Table 9. CPU_SM_4
15
Table 11. CPU_SM_6
16
Table 12. CPU_SM_7
16
Table 13. MPU_SM_0
17
Embedded FLASH Memory
18
Table 14. FLASH_SM_0
18
Table 15. FLASH_SM_1
18
Table 16. FLASH_SM_2
19
Table 17. FLASH_SM_3
19
Table 18. FLASH_SM_4
20
Table 19. FLASH_SM_5
20
Table 20. FLASH_SM_6
20
Table 21. FLASH_SM_8
21
Embedded SRAM
22
Table 22. RAM_SM_0
22
Table 23. RAM_SM_2
22
Table 24. RAM_SM_3
23
Table 25. RAM_SM_4
23
Table 26. RAM_SM_5
24
System Bus Architecture
25
Table 27. BUS_SM_0
25
Table 28. BUS_SM_1
25
Table 29. LOCK_SM_0
26
EXTI Controller
27
Table 30. NVIC_SM_0
27
Table 31. NVIC_SM_1
27
Direct Memory Access Controller (DMA)
29
Table 32. DMA_SM_0
29
Table 33. DMA_SM_1
29
Table 34. DMA_SM_2
30
Table 35. DMA_SM_3
30
Table 36. DMA_SM_4
31
Controller Area Network (CAN)
32
Table 37. CAN_SM_0
32
Table 38. CAN_SM_1
32
Table 39. CAN_SM_2
32
Table 40. UART_SM_0
34
Table 41. UART_SM_1
34
Table 42. UART_SM_2
34
Universal Asynchronous Receiver/Transmitter (UART)
34
Table 43. UART_SM_3
35
Inter-Integrated Circuit (I2C) 1/2
36
Table 44. IIC_SM_0
36
Table 45. IIC_SM_1
36
Table 46. IIC_SM_2
36
Table 47. IIC_SM_3
37
Table 48. IIC_SM_4
37
Serial Peripheral Interface (SPI) 1/2
39
Table 49. SPI_SM_0
39
Table 50. SPI_SM_1
39
Table 51. SPI_SM_2
39
Table 52. SPI_SM_3
40
Table 53. SPI_SM_4
40
Table 54. USB_SM_0
42
Table 55. USB_SM_1
42
Table 56. USB_SM_2
42
Usb Hs/Fs
42
Table 57. USB_SM_3
43
Analog-To-Digital Converters (ADC)
44
Table 58. ADC_SM_0
44
Table 59. ADC_SM_1
44
Table 60. ADC_SM_2
44
Table 61. ADC_SM_3
45
Table 62. ADC_SM_4
46
Digital-To-Analog Converter (DAC)
47
Table 63. DAC_SM_0
47
Table 64. DAC_SM_1
47
Basic Timers TIM 6/7
48
Table 65. GTIM_SM_0
48
Table 66. GTIM_SM_1
48
Advanced, General and Low-Power Timers TIM1/2/3/4/5/8/9/10/11/12/13/14
49
Table 67. ATIM_SM_0
49
Table 68. ATIM_SM_1
49
Table 69. ATIM_SM_2
50
Table 70. ATIM_SM_3
50
Table 71. ATIM_SM_4
51
General-Purpose Input/Output (GPIO) - Port A/B/C/D/E/F/G/H/I
52
Table 72. GPIO_SM_0
52
Table 73. GPIO_SM_1
52
Table 74. GPIO_SM_2
52
Table 75. GPIO_SM_3
53
Real-Time Clock Module (RTC)
54
Table 76. RTC_SM_0
54
Table 77. RTC_SM_1
54
Table 78. RTC_SM_2
55
Table 79. RTC_SM_3
55
Power Control
56
Table 80. VSUP_SM_0
56
Table 81. VSUP_SM_1
56
Table 82. VSUP_SM_2
57
Table 83. VSUP_SM_3
57
Table 84. VSUP_SM_4
57
Reset and Clock Control (RCC) Subsystem
59
Table 85. CLK_SM_0
59
Table 86. CLK_SM_1
59
Table 87. CLK_SM_2
59
Table 88. CLK_SM_3
60
Independent Watchdog (IWDG), System Window Watchdog (WWDG)
61
Table 89. WDG_SM_0
61
Table 90. WDG_SM_1
61
Debug
62
Table 91. DBG_SM_0
62
Cyclic Redundancy-Check Module (CRC)
63
Table 92. CRC_SM_0
63
System Configuration Controller (SYSCFG)
64
Table 93. SYSCFG_SM_0
64
Table 94. DIAG_SM_0
64
Ethernet (ETH): Media Access Control (MAC) with DMA Controller
65
Table 95. ETH_SM_0
65
Table 96. ETH_SM_1
65
Table 97. ETH_SM_2
65
Flexible Static Memory Controller (FSMC)
67
Table 98. FSMC_SM_0
67
Table 99. FSMC_SM_1
67
Table 100. FSMC_SM_2
68
Table 101. FSMC_SM_3
68
Serial Audio Interface (SAI)
69
Table 102. SAI_SM_0
69
Table 103. SAI_SM_1
69
Table 104. SAI_SM_2
69
Table 105. RNG_SM_0
71
Table 106. RNG_SM_1
71
True Random Number Generator (RNG)
71
Advanced Encryption Standard Hardware Accelerator (AES)
72
Table 107. AES_SM_0
72
Table 108. AES_SM_1
72
Table 109. AES_SM_2
72
HASH Processor (HASH)
74
Table 110. HASH_SM_0
74
Table 111. HASH_SM_1
74
Digital Camera Interface (DCMI)
75
Table 112. DCMI_SM_0
75
Table 113. DCMI_SM_1
75
Disable and Periodic Cross-Check of Unintentional Activation of Unused Peripherals
76
Table 114. FFI_SM_0
76
Table 115. FFI_SM_1
76
Conditions of Use
77
Table 116. List of Safety Mechanisms
77
ST STM32F2 Series Application Note (56 pages)
Brand:
ST
| Category:
Microcontrollers
| Size: 3 MB
Table of Contents
General Information
2
Table 2. Glossary
2
Overview
5
Security Purpose
5
Figure 1. Corrupted Connected Device Threat
5
Table 3. Assets to be Protected
6
Attack Types
7
Introduction to Attack Types
7
Software Attacks
8
Table 4. Attacks Types and Costs
8
Hardware Attacks
9
Non-Invasive Attacks
10
Silicon Invasive Attacks
11
Iot System Attack Examples
12
Figure 2. Iot System
12
List of Attack Targets
13
Device Protections
16
Configuration Protection
16
Trustzone ® for Armv8-M Architecture
16
Dual-Core Architecture
17
Figure 3. Armv8-M Trustzone® Execution Modes
17
Figure 4. Simplified Diagram of Dual-Core System Architecture
17
Memory Protections
18
Figure 5. Memory Types
18
System Flash Memory
19
User Flash Memory
19
Embedded SRAM
19
External Flash Memories
20
STM32 Memory Protections
21
Software Isolation
21
Debug Port and Other Interface Protection
21
Boot Protection
22
System Monitoring
22
Secure Applications
23
Secure Firmware Install (SFI)
23
Root and Chain of Trust
23
Stmicroelectronics Proprietary SBSFU Solution
23
Secure Boot (SB)
23
Secure Firmware Update (SFU)
24
Figure 6. Secure Boot FSM
24
Configurations
25
Arm TF-M Solution
25
Figure 7. Secure Server/Device SFU Architecture
25
Product Certifications
26
Table 8. Basic Feature Differences of Trustzone-Based Secure Software
26
STM32 Security Features
27
Overview of Security Features
27
Static and Dynamic Protections
27
Security Features by STM32 Devices
27
Table 10. Security Features for STM32L0/1/4/4+, STM32WB, STM32WL Devices
28
Advertisement
ST STM32F2 Series User Manual (19 pages)
Brand:
ST
| Category:
Microcontrollers
| Size: 0 MB
Table of Contents
Table of Contents
2
1 Stm32Cubef2 Main Features
5
Figure 1. Stm32Cubef2 Firmware Components
5
2 Stm32Cubef2 Architecture Overview
6
Figure 2. Firmware Architecture
6
3 Stm32Cubef2 Firmware Package Overview
8
Supported STM32F2 Devices and Hardware
8
Table 1. Macros for STM32F2 Series
8
Table 2. Stmicroelectronics Boards for STM32F2 Series
8
Firmware Package Overview
9
Figure 3. Stm32Cubef2 Firmware Package Overview (1)
9
Table 3. Number of Examples Available on the Boards
11
4 Getting Started
12
Running Your First Example
12
Developing Your Own Application
14
Using Stm32Cubemx to Generate the Initialization C Code
16
Accessing Stm32Cubef2 Release Updates
16
Installing and Running the Stm32Cubeupdater Program
16
5 Frequently Asked Questions (Faqs)
17
6 Revision History
18
Table 4. Document Revision History
18
Figure 4. Overview of Stm32Cubef2 Examples
18
ST STM32F2 Series Application Note (12 pages)
Migration and compatibility guidelines for STM32 microcontroller applications
Brand:
ST
| Category:
Microcontrollers
| Size: 0 MB
Table of Contents
1 Introduction
1
Table of Contents
2
2 How to Migrate Across STM32 Series
3
STM32 Series General Overview
3
STM32 Product Series Feature Comparison
4
STM32 Product Cross-Compatibility
7
Software Migration
10
3 Revision History
11
Advertisement
Related Products
ST STM32F205 series
ST STM32F207 series
ST STM32F215 series
ST STM32F217 series
ST STM32F20 Series
ST STM32F21 Series
ST STM32F207IF
ST STM32F207IFH6
ST STM32F215ZG
ST STM32F207ZG
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