Sign In
Upload
Manuals
Brands
GigaDevice Semiconductor Manuals
Microcontrollers
GD32F150 Series
GigaDevice Semiconductor GD32F150 Series Manuals
Manuals and User Guides for GigaDevice Semiconductor GD32F150 Series. We have
3
GigaDevice Semiconductor GD32F150 Series manuals available for free PDF download: User Manual
GigaDevice Semiconductor GD32F150 Series User Manual (702 pages)
ARM Cortex-M3 32-bit MCU
Brand:
GigaDevice Semiconductor
| Category:
Microcontrollers
| Size: 9 MB
Table of Contents
Table of Contents
2
List of Figures
17
List of Tables
24
System and Memory Architecture
27
ARM Cortex-M3 Processor
27
System Architecture
28
Figure 1-1. the Structure of the Cortex
28
Figure 1-2. Series System Architecture of Gd32F130Xx and Gd32F150Xx Devices
29
Memory Map
30
Figure 1-3. Series System Architecture of Gd32F170Xx and Gd32F190Xx Devices
30
Table 1-1. Memory Map of Gd32F130Xx and Gd32F150Xx Devices
31
Table 1-2. Memory Map of Gd32F170Xx and Gd32F190Xx Devices
33
Bit-Banding
35
On-Chip SRAM Memory
35
On-Chip Flash Memory
36
Boot Configuration
36
Table 1-3. Flash Module Organization
36
Table 1-4. Boot Modes
36
System Configuration Registers (SYSCFG)
38
System Configuration Register 0 (SYSCFG_CFG0)
38
System Configuration Register 1 (SYSCFG_CFG1)
39
EXTI Sources Selection Register 0 (SYSCFG_EXTISS0)
39
EXTI Sources Selection Register 1 (SYSCFG_EXTISS1)
41
EXTI Sources Selection Register 2 (SYSCFG_EXTISS2)
42
EXTI Sources Selection Register 3 (SYSCFG_EXTISS3)
43
System Configuration Register 2 (SYSCFG_CFG2)
44
Device Electronic Signature
45
Memory Density Information
46
Unique Device ID (96 Bits)
46
Flash Memory Controller (FMC)
48
Overview
48
Characteristics
48
Function Overview
48
Flash Memory Architecture
48
Table 2-1. Base Address and Size for Flash Memory
48
Read Operations
49
Unlock the FMC_CTL Register
49
Page Erase
49
Mass Erase
50
Figure 2-1. Process of Page Erase Operation
50
Figure 2-2. Process of the Mass Erase Operation
51
Main Flash Programming
52
Option Bytes Erase
53
Figure 2-3. Process of the Word Programming Operation
53
Option Bytes Programming
54
Option Bytes Description
54
Table 2-2. Option Bytes
54
Page Erase/Program Protection
55
Security Protection
56
Table 2-3. OB_WP Bit for Pages Protected
56
Register Definition
57
Wait State Register (FMC_WS)
57
Unlock Key Register (FMC_KEY)
57
Option Bytes Unlock Key Register (FMC_OBKEY)
58
Status Register (FMC_STAT)
58
Control Register (FMC_CTL)
59
Address Register (FMC_ADDR)
60
Option Bytes Status Register (FMC_OBSTAT)
61
Write Protection Register (FMC_WP)
61
Wait State Enable Register (FMC_WSEN)
62
Product ID Register (FMC_PID)
63
Power Management Unit (PMU)
64
Overview
64
Characteristics
64
Function Overview
64
Figure 3-1. Power Supply Overview of Gd32F130Xx and Gd32F150Xx Devices
65
Backup Domain
66
Figure 3-2. Power Supply Overview of Gd32F170Xx and Gd32F190Xx Devices
66
Dda
67
VDD Domain
67
Figure 3-3. Waveform of the POR/PDR
68
1.2V Power Domain for Gd32F130Xx and Gd32F150Xx Devices
69
1.8V Power Domain for Gd32F170Xx and Gd32F190Xx Devices
69
Figure 3-4. Waveform of LVD Threshold
69
Power Saving Modes
70
Table 3-1. Power Saving Mode Summary
71
Register Definition
72
Control Register (PMU_CTL)
72
Power Control/Status Register (PMU_CS)
75
Reset and Clock Unit (RCU)
77
Reset Control Unit (RCTL)
77
Overview
77
Function Overview
77
Clock Control Unit (CCTL)
78
Overview
78
Figure 4-1. the System Reset Circuit
78
Figure 4-2. Clock Tree of Gd32F130Xx and Gd32F150Xx Devices
79
Figure 4-3. Clock Tree of Gd32F170Xx and Gd32F190Xx Devices
80
Characteristics
81
Function Overview
81
Figure 4-4. HXTAL Clock Source
81
Table 4-1. Clock Source Select
84
Table 4-2. Clock Source Select
84
Table 4-3. Core Domain Voltage Selected in Deep-Sleep Mode
85
Table 4-4. Core Domain Voltage Selected in Deep-Sleep Mode
85
Register Definition
86
Control Register 0 (RCU_CTL0)
86
Configuration Register 0 (RCU_CFG0)
87
Interrupt Register (RCU_INT)
94
APB2 Reset Register (RCU_APB2RST)
100
APB1 Reset Register (RCU_APB1RST)
101
AHB Enable Register (RCU_AHBEN)
106
APB2 Enable Register (RCU_APB2EN)
107
APB1 Enable Register (RCU_APB1EN)
109
Backup Domain Control Register (RCU_BDCTL)
113
Reset Source /Clock Register (RCU_RSTSCK)
116
AHB Reset Register (RCU_AHBRST)
118
Configuration Register 1 (RCU_CFG1)
119
Configuration Register 2 (RCU_CFG2)
120
Control Register 1 (RCU_CTL1)
122
Configuration Register 3 (RCU_CFG3) of Gd32F170Xx and Gd32F190Xx Devices
123
APB1 Additional Enable Register (RCU_ADDAPB1EN)
124
APB1 Additional Reset Register (RCU_ADDAPB1RST)
124
Voltage Key Register (RCU_VKEY)
125
Deep-Sleep Mode Voltage Register (RCU_DSV)
125
Power down Voltage Select Register (RCU_PDVSEL) of Gd32F130Xx and Gd32F150Xx Devices
126
Interrupt/Event Controller (EXTI)
128
Overview
128
Characteristics
128
Interrupts Function Overview
128
Table 5-1. NVIC Exception Types in Cotrex-M3
129
Table 5-2. Interrupt Vector Table of Gd32F130Xx and Gd32F150Xx Devices
129
Table 5-3. Interrupt Vector Table of Gd32F170Xx and Gd32F190Xx Devices
130
External Interrupt and Event (EXTI) Block Diagram
132
Figure 5-1. Block Diagram of EXTI
132
External Interrupt and Event Function Overview
133
Table 5-4. EXTI Source of Gd32F130Xx and Gd32F150Xx Devices
133
Table 5-5. EXTI Source of Gd32F170Xx and Gd32F190Xx Devices
134
Register Definition
136
Interrupt Enable Register (EXTI_INTEN)
136
Event Enable Register (EXTI_EVEN)
136
Rising Edge Trigger Enable Register (EXTI_RTEN)
137
Falling Edge Trigger Enable Register (EXTI_FTEN)
137
Software Interrupt Event Register (EXTI_SWIEV)
138
Pending Register (EXTI_PD)
139
General-Purpose I/Os (GPIO)
140
Overview
140
Characiteristics
140
Function Overview
140
GPIO Pin Configuration
141
Figure 6-1. Basic Structure of a General-Pupose I/O
141
Table 6-1. GPIO Configuration Table
141
Alternate Functions (AF)
142
Additional Functions
142
Input Configuration
142
Figure 6-2. Basic Structure of Input Configuration
142
Output Configuration
143
Figure 6-3. Basic Structure of Output Configuration
143
Analog Configuration
144
Alternate Function (AF) Configuration
144
Figure 6-4. Basic Structure of Analog Configuration
144
Figure 6-5. Basic Structure of Alternate Function Configuration
144
GPIO Locking Function
145
GPIO Single Cycle Toggle Function
145
Register Definition
146
Port Control Register (Gpiox_Ctl, X=A
146
Port Output Mode Register (Gpiox_Omode, X=A
147
Port Output Speed Register (Gpiox_Ospd, X=A
149
Port Pull-Up/Down Register (Gpiox_Pud, X=A
151
Port Input Status Register (Gpiox_Istat, X=A
152
Port Output Control Register (Gpiox_Octl, X=A
153
Port Bit Operate Register (Gpiox_Bop, X=A
153
Port Configuration Lock Register (Gpiox_Lock, X=A, B)
154
Alternate Function Selected Register0 (Gpiox_Afsel0, X=A, B, C)
155
Alternate Function Selected Register1 (Gpiox_Afsel1, X=A,B,C)
156
Bit Clear Register (Gpiox_Bc, X=A
157
Port Bit Toggle Register (Gpiox_Tg, X=A
158
Cyclic Redundancy Checks Management Unit (CRC)
159
Overview
159
Characteristics
159
Function Overview
160
Figure 7-1. Block Diagram of CRC Management Unit
160
Register Definition
162
Data Register (CRC_DATA)
162
Free Data Register (CRC_FDATA)
162
Control Register (CRC_CTL)
163
Initialization Data Register (CRC_IDATA)
163
Direct Memory Access Controller (DMA)
165
Overview
165
Characteristics
165
Block Diagram
166
Function Overview
166
DMA Operation
166
Figure 8-1. Block Diagram of DMA
166
Table 8-1. DMA Transfer Operation
167
Peripheral Handshake
168
Arbitration
168
Figure 8-2. Handshake Mechanism
168
Address Generation
169
Circular Mode
169
Memory to Memory Mode
169
Channel Configuration
169
Interrupt
170
Figure 8-3. DMA Interrupt Logic
170
Table 8-2. Interrupt Events
170
DMA Request Mapping
171
Table 8-3. DMA Requests for each Channel
171
Figure 8-4. DMA Request Mapping
172
Register Definition
174
Interrupt Flag Register (DMA_INTF)
174
Interrupt Flag Clear Register (DMA_INTC)
174
Channel X Control Register (Dma_Chxctl)
175
Channel X Counter Register (Dma_Chxcnt)
177
Channel X Peripheral Base Address Register (Dma_Chxpaddr)
178
Channel X Memory Base Address Register (Dma_Chxmaddr)
178
Debug (DBG)
180
Overview
180
Serial Wire Debug Port Overview
180
Pin Assignment
180
JEDEC-106 ID Code
180
Debug Hold Function Overview
181
Debug Support for Power Saving Mode
181
Debug Support for TIMER, I2C, RTC, WWDGT and FWDGT
181
DBG Registers
182
ID Code Register (DBG_ID)
182
Control Register 0(DBG_CTL0)
182
Control Register 1 (DBG_CTL1)
186
Analog to Digital Converter (ADC)
188
Overview
188
Characteristics
188
Pins and Internal Signals
189
Figure 10-1. ADC Module Block Diagram of Gd32F130Xx and Gd32F150Xx Devices
189
Figure 10-2. ADC Module Block Diagram of Gd32F170Xx and Gd32F190Xx Devices
189
Table 10-1. ADC Internal Input Signals
190
Table 10-2. ADC Input Pins Definition of Gd32F130Xx and Gd32F150Xx Devices
190
Table 10-3. ADC Input Pins Definition of Gd32F170Xx and Gd32F190Xx Devices
190
Function Overview
191
Foreground Calibration Function
192
Dual Clock Domain Architecture
193
ADCON Enable
193
Routine Sequence
193
Operation Modes
193
Figure 10-3. Single Operation Mode
193
Figure 10-4. Continuous Operation Mode
194
Figure 10-5. Scan Operation Mode, Continuous Disable
195
Figure 10-6. Scan Operation Mode, Continuous Enable
195
Conversion Result Threshold Monitor Function
196
Data Storage Mode
196
Figure 10-7. Discontinuous Operation Mode
196
Sample Time Configuration
197
Figure 10-8. Data Storage Mode of 12-Bit Resolution
197
Figure 10-9. Data Storage Mode of 10-Bit Resolution
197
Figure 10-10. Data Storage Mode of 8-Bit Resolution
197
Figure 10-11. Data Storage Mode of 6-Bit Resolution
197
External Trigger Configuration
198
DMA Request
198
ADC Internal Channels
198
Table 10-4. External Trigger Source for ADC Routine Sequence
198
Battery Voltage Monitoring
199
ADC Interrupts
199
Programmable Resolution (DRES)
199
Table 10-5. T CONV Timings Depending on Resolution
199
On-Chip Hardware Oversampling
200
Figure 10-12. 20-Bit to 16-Bit Result Truncation
200
Figure 10-13. Numerical Example with 5-Bits Shift and Rounding
200
Table 10-6. Maximum Output Results Vs N and M (Grayed Values Indicates Truncation)
201
Register Definition
203
Status Register (ADC_STAT)
203
Control Register 0 (ADC_CTL0)
203
Control Register 1 (ADC_CTL1)
206
Sampling Time Register 0 (ADC_SAMPT0)
208
Sampling Time Register 1 (ADC_SAMPT1)
210
Watchdog High Threshold Register (ADC_WDHT)
211
Watchdog Low Threshold Register (ADC_WDLT)
211
Routine Sequence Register 0 (ADC_RSQ0)
212
Routine Sequence Register 1 (ADC_RSQ1)
212
Routine Sequence Register 2 (ADC_RSQ2)
213
Routine Data Register (ADC_RDATA)
213
Oversampling Control Register (ADC_OVSAMPCTL)
214
Digital-To-Analog Converter (DAC)
216
Overview
216
Characteristic
216
Figure 11-1. DAC Block Diagram
216
Function Overview
217
DAC Enable
217
DAC Output Buffer
217
Table 11-1. DAC I/O Description
217
DAC Data Configuration
218
DAC Trigger
218
Table 11-2. External Triggers of DAC
218
DAC Workflow
219
DAC Output Calculate
219
DMA Function
219
DAC Concurrent Conversion for Gd32F190Xx Devices
219
Register Definition
221
Control Register (DAC_CTL)
221
Software Trigger Register (DAC_SWT)
224
DAC0 12-Bit Right-Aligned Data Holding Register (DAC0_R12DH)
225
DAC0 12-Bit Left-Aligned Data Holding Register (DAC0_L12DH)
225
DAC0 8-Bit Right-Aligned Data Holding Register (DAC0_R8DH)
226
DAC1 12-Bit Right-Aligned Data Holding Register (DAC1_R12DH) of Gd32F190Xx Devices
226
DAC1 12-Bit Left-Aligned Data Holding Register (DAC1_L12DH) of Gd32F190Xx Devices
227
DAC1 8-Bit Right-Aligned Data Holding Register (DAC1_R8DH) of Gd32F190Xx Devices
227
DAC Concurrent Mode 12-Bit Right-Aligned Data Holding Register (DACC_R12DH) of
228
Gd32F190Xx Devices
228
Gd32F190Xx Devices
229
DAC0 Data Output Register (DAC0_DO)
230
DAC1 Data Output Register (DAC1_DO) of Gd32F190Xx Devices
230
Status Register (DAC_STAT)
230
Comparator (CMP)
233
Overview
233
Characteristics
233
Function Overview
233
Figure 12-1. CMP Block Diagram of Gd32F150Xx Devices
234
Figure 12-2. CMP Block Diagram of Gd32F190Xx Devices
234
CMP Clock and Reset
235
CMP I/O Configure
235
CMP Operating Mode
235
CMP Hysteresis
235
CMP Register Write Protection
236
Figure 12-3. CMP Hysteresis
236
Register Definition
237
Control/Status Register (CMP_CS)
237
Watchdog Timer (WDGT)
244
Free Watchdog Timer (FWDGT)
244
Overview
244
Characteristics
244
Function Overview
244
Figure 13-1. Free Watchdog Timer Block Diagram
245
Table 13-1. Min / Max FWDGT Timeout Period at 40 Khz (IRC40K)
246
Register Definition
247
Window Watchdog Timer (WWDGT)
251
Overview
251
Characteristics
251
Function Overview
251
Figure 13-2. Window Watchdog Timer Block Diagram
252
Figure 13-3. Window Watchdog Timer Timing Diagram
253
Table 13-2. Min-Max Timeout Value at 36 Mhz (Fpclk1)
253
Register Definition
254
Real-Time Clock(RTC)
256
Overview
256
Characteristics
256
Function Overview
257
Block Diagram
257
Clock Source and Prescalers
257
Figure 14-1. Block Diagram of RTC
257
Shadow Registers Introduction
258
Configurable and Field Maskable Alarm
258
RTC Initialization and Configuration
259
Calendar Reading
260
Resetting the RTC
261
RTC Shift Function
261
RTC Reference Clock Detection
262
RTC Smooth Digital Calibration
263
Time-Stamp Function
265
Tamper Detection
265
Calibration Clock Output
266
Alarm Output
266
RTC Power Saving Mode Management
267
RTC Interrupts
267
Table 14-1. RTC Power Saving Mode Management
267
Table 14-2. RTC Interrupts Control
267
Register Definition
268
Time Register (RTC_TIME)
268
Date Register (RTC_DATE)
268
Control Register (RTC_CTL)
269
Status Register (RTC_STAT)
271
Prescaler Register (RTC_PSC)
273
Alarm 0 Time and Date Register (RTC_ALRM0TD)
274
Write Protection Key Register (RTC_WPK)
275
Sub Second Register (RTC_SS)
275
Shift Function Control Register (RTC_SHIFTCTL)
276
Time of Time Stamp Register (RTC_TTS)
276
Date of Time Stamp Register (RTC_DTS)
277
Sub Second of Time Stamp Register (RTC_SSTS)
278
High Resolution Frequency Compensation Register (RTC_HRFC)
278
Tamper Register (RTC_TAMP)
279
Alarm 0 Sub Second Register (RTC_ALRM0SS)
281
Backup Registers (Rtc_Bkpx) (X=0
282
Timer (Timerx)
284
Table 15-1. Timers (Timerx) Are Devided into Six Sorts
284
Advanced Timer (Timerx,X=0)
285
Overview
285
Characteristics
285
Block Diagram
286
Function Overview
286
Figure 15-1. Advanced Timer Block Diagram
286
Figure 15-2. Timing Chart of Internal Clock Divided by 1
287
Figure 15-3. Timing Chart of PSC Value Change from 0 to 2
288
Figure 15-4. Timing Chart of up Counting Mode, PSC=0/2
289
Figure 15-5. Timing Chart of up Counting Mode, Change Timerx_Car on the Go
289
Figure 15-6. Timing Chart of down Counting Mode, PSC=0/2
290
Figure 15-7. Timing Chart of down Counting Mode, Change Timerx_Car on the Go
291
Figure 15-8. Center-Aligned Counter Timechart
291
Figure 15-9. Repetition Counter Timing Chart of Center-Aligned Counting Mode
293
Figure 15-10. Repetition Counter Timing Chart of up Counting Mode
293
Figure 15-11. Repetition Counter Timing Chart of down Counting Mode
294
Figure 15-12. Channel Input Capture Principle
295
Figure 15-13. Channel Output Compare Principle (with Complementary Output
296
Figure 15-14. Channel Output Compare Principle (CH3_O)
296
Figure 15-15. Output-Compare under Three Modes
297
Figure 15-16. EAPWM Timechart
299
Figure 15-17. CAPWM Timechart
299
Table 15-2. Complementary Outputs Controlled by Parameters
300
Figure 15-18. Channel Output Complementary PWM with Dead-Time Insertion
302
Figure 15-19. Output Behavior in Response to a Break(the Break High Active)
303
Table 15-3. Counting Direction Versus Encoder Signals
303
Figure 15-20. Example of Counter Operation in Encoder Interface Mode
304
Figure 15-21. Example of Encoder Interface Mode with CI0FE0 Polarity Inverted
304
Figure 15-22. Hall Sensor Is Used to BLDC Motor
304
Figure 15-23. Hall Sensor Timing between Two Timers
306
Table 15-4. Slave Mode Example Table
306
Figure 15-24. Restart Mode
307
Figure 15-25. Pause Mode
307
Figure 15-26. Event Mode
308
Figure 15-27. Single Pulse Mode Timerx_Chxcv = 0X04 Timerx_Car=0X60
309
Figure 15-28. TIMER0 Master/Slave Mode Timer Example
309
Table 15-5. Input Trigger of Timer0
310
Figure 15-29. Triggering TIMER0 with Enable of TIMER2
311
Figure 15-30. Triggering TIMER0 and TIMER2 with Timer2'S CI0 Input
312
Timerx Registers(X=0)
313
General Level0 Timer (Timerx, X=1, 2)
341
Overview
341
Characteristics
341
Advertisement
GigaDevice Semiconductor GD32F150 Series User Manual (577 pages)
Arm Cortex-M3 32-bit MCU
Brand:
GigaDevice Semiconductor
| Category:
Microcontrollers
| Size: 7 MB
Table of Contents
Table of Contents
2
List of Figures
15
List of Tables
21
System and Memory Architecture
23
ARM Cortex-M3 Processor
23
System Architecture
24
Figure 1-1. the Structure of the Cortex ® -M3 Processor
24
Memory Map
25
Figure 1-2. Series System Architecture of Gd32F130Xx and Gd32F150Xx Devices
25
Table 1-1. Memory Map of Gd32F130Xx and Gd32F150Xx Devices
26
Bit-Banding
28
On-Chip SRAM Memory
28
On-Chip Flash Memory
29
Boot Configuration
29
Table 1-2. Flash Module Organization
29
Table 1-3. Boot Modes
29
System Configuration Registers (SYSCFG)
31
System Configuration Register 0 (SYSCFG_CFG0)
31
EXTI Sources Selection Register 0 (SYSCFG_EXTISS0)
32
EXTI Sources Selection Register 1 (SYSCFG_EXTISS1)
33
EXTI Sources Selection Register 2 (SYSCFG_EXTISS2)
34
EXTI Sources Selection Register 3 (SYSCFG_EXTISS3)
36
System Configuration Register 2 (SYSCFG_CFG2)
37
Device Electronic Signature
38
Memory Density Information
38
Unique Device ID (96 Bits)
39
Flash Memory Controller (FMC)
41
Overview
41
Characteristics
41
Function Overview
41
Flash Memory Architecture
41
Table 2-1. Base Address and Size for Flash Memory
41
Read Operations
42
Unlock the FMC_CTL Register
42
Page Erase
42
Mass Erase
43
Figure 2-1. Process of Page Erase Operation
43
Figure 2-2. Process of the Mass Erase Operation
44
Main Flash Programming
45
Option Bytes Erase
46
Figure 2-3. Process of the Word Programming Operation
46
Option Bytes Programming
47
Option Bytes Description
47
Table 2-2. Option Bytes
47
Page Erase/Program Protection
48
Security Protection
49
Table 2-3. OB_WP Bit for Pages Protected
49
Register Definition
50
Wait State Register (FMC_WS)
50
Unlock Key Register (FMC_KEY)
50
Option Bytes Unlock Key Register (FMC_OBKEY)
51
Status Register (FMC_STAT)
51
Control Register (FMC_CTL)
52
Address Register (FMC_ADDR)
53
Option Bytes Status Register (FMC_OBSTAT)
54
Write Protection Register (FMC_WP)
54
Wait State Enable Register (FMC_WSEN)
55
Product ID Register (FMC_PID)
55
Power Management Unit (PMU)
57
Overview
57
Characteristics
57
Function Overview
57
Figure 3-1. Power Supply Overview
57
Backup Domain
59
Dda
59
VDD Domain
60
Figure 3-2. Waveform of the POR/PDR
60
1.2V Power Domain
61
Figure 3-3. Waveform of LVD Threshold
61
Power Saving Modes
62
Table 3-1. Power Saving Mode Summary
63
Register Definition
64
Control Register (PMU_CTL)
64
Power Control/Status Register (PMU_CS)
65
Reset and Clock Unit (RCU)
67
Reset Control Unit (RCTL)
67
Overview
67
Function Overview
67
Clock Control Unit (CCTL)
68
Overview
68
Figure 4-1. the System Reset Circuit
68
Figure 4-2. Clock Tree
69
Characteristics
70
Function Overview
70
Figure 4-3. HXTAL Clock Source
70
Table 4-1. Clock Source Select
73
Table 4-2. Core Domain Voltage Selected in Deep-Sleep Mode
73
Register Definition
74
Control Register 0 (RCU_CTL0)
74
Configuration Register 0 (RCU_CFG0)
75
Interrupt Register (RCU_INT)
79
APB2 Reset Register (RCU_APB2RST)
82
APB1 Reset Register (RCU_APB1RST)
83
AHB Enable Register (RCU_AHBEN)
85
APB2 Enable Register (RCU_APB2EN)
87
APB1 Enable Register (RCU_APB1EN)
88
Backup Domain Control Register (RCU_BDCTL)
90
Reset Source /Clock Register (RCU_RSTSCK)
92
AHB Reset Register (RCU_AHBRST)
93
Configuration Register 1 (RCU_CFG1)
94
Configuration Register 2 (RCU_CFG2)
95
Control Register 1 (RCU_CTL1)
96
APB1 Additional Enable Register (RCU_ADDAPB1EN)
97
APB1 Additional Reset Register (RCU_ADDAPB1RST)
97
Voltage Key Register (RCU_VKEY)
98
Deep-Sleep Mode Voltage Register (RCU_DSV)
98
Power down Voltage Select Register (RCU_PDVSEL)
99
Interrupt / Event Controller (EXTI)
100
Overview
100
Characteristics
100
Interrupts Function Overview
100
Table 5-2. NVIC Exception Types in Cotrex
101
Table 5-3. Interrupt Vector Table
101
External Interrupt and Event Block Diagram
103
External Interrupt and Event Function Overview
103
Figure 5-1. Block Diagram of EXTI
103
Table 5-4. EXTI Source
104
Register Definition
106
Interrupt Enable Register (EXTI_INTEN)
106
Event Enable Register (EXTI_EVEN)
106
Rising Edge Trigger Enable Register (EXTI_RTEN)
107
Falling Edge Trigger Enable Register (EXTI_FTEN)
107
Software Interrupt Event Register (EXTI_SWIEV)
108
Pending Register (EXTI_PD)
109
General-Purpose I/Os (GPIO)
110
Overview
110
Characiteristics
110
Function Overview
110
Table 6-1. GPIO Configuration Table
110
GPIO Pin Configuration
111
Figure 6-1. Basic Structure of a General-Pupose I/O
111
Alternate Functions (AF)
112
Additional Functions
112
Input Configuration
112
Figure 6-2. Basic Structure of Input Configuration
112
Output Configuration
113
Analog Configuration
113
Figure 6-3. Basic Structure of Output Configuration
113
Alternate Function (AF) Configuration
114
Figure 6-4. Basic Structure of Analog Configuration
114
Figure 6-5. Basic Structure of Alternate Function Configuration
114
GPIO Locking Function
115
GPIO Single Cycle Toggle Function
115
Register Definition
116
Port Control Register (Gpiox_Ctl, X=A
116
Port Output Mode Register (Gpiox_Omode, X=A
117
Port Output Speed Register (Gpiox_Ospd, X=A
119
Port Pull-Up/Down Register (Gpiox_Pud, X=A
121
Port Input Status Register (Gpiox_Istat, X=A
122
Port Output Control Register (Gpiox_Octl, X=A
123
Port Bit Operate Register (Gpiox_Bop, X=A
123
Port Configuration Lock Register (Gpiox_Lock, X=A, B)
124
Alternate Function Selected Register0 (Gpiox_Afsel0, X=A, B, C)
125
Alternate Function Selected Register1 (Gpiox_Afsel1, X=A,B,C)
126
Bit Clear Register (Gpiox_Bc, X=A
127
Cyclic Redundancy Checks Management Unit (CRC)
128
Overview
128
Characteristics
128
Function Overview
129
Figure 7-1. Block Diagram of CRC Management Unit
129
Register Definition
131
Data Register (CRC_DATA)
131
Free Data Register (CRC_FDATA)
131
Control Register (CRC_CTL)
132
Initialization Data Register (CRC_IDATA)
132
Direct Memory Access Controller (DMA)
134
Overview
134
Characteristics
134
Block Diagram
135
Function Overview
135
DMA Operation
135
Figure 8-1. Block Diagram of DMA
135
Table 8-1. DMA Transfer Operation
136
Peripheral Handshake
137
Arbitration
137
Figure 8-2. Handshake Mechanism
137
Address Generation
138
Circular Mode
138
Memory to Memory Mode
138
Channel Configuration
138
Interrupt
139
Figure 8-3. DMA Interrupt Logic
139
Table 8-2. Interrupt Events
139
DMA Request Mapping
140
Table 8-3. DMA Requests for each Channel
140
Figure 8-4. DMA Request Mapping
141
Register Definition
143
Interrupt Flag Register (DMA_INTF)
143
Interrupt Flag Clear Register (DMA_INTC)
143
Channel X Control Register (Dma_Chxctl)
144
Channel X Counter Register (Dma_Chxcnt)
146
Channel X Peripheral Base Address Register (Dma_Chxpaddr)
147
Channel X Memory Base Address Register (Dma_Chxmaddr)
147
Debug (DBG)
149
Overview
149
Serial Wire Debug Port Overview
149
Pin Assignment
149
JEDEC-106 ID Code
149
Debug Hold Function Overview
150
Debug Support for Power Saving Mode
150
Debug Support for TIMER, I2C, RTC, WWDGT and FWDGT
150
DBG Registers
151
ID Code Register (DBG_ID)
151
Control Register 0(DBG_CTL0)
151
Control Register 1 (DBG_CTL1)
153
Analog to Digital Converter (ADC)
155
Overview
155
Characteristics
155
Pins and Internal Signals
156
Figure 10-1. ADC Module Block Diagram
156
Table 10-1. ADC Internal Input Signals
156
Table 10-2. ADC Input Pins Definition
156
Function Overview
157
Foreground Calibration Function
157
Dual Clock Domain Architecture
158
ADCON Enable
158
Routine Sequence
158
Operation Modes
158
Figure 10-2. Single Operation Mode
158
Figure 10-3. Continuous Operation Mode
159
Figure 10-4. Scan Operation Mode, Continuous Disable
160
Figure 10-5. Scan Operation Mode, Continuous Enable
160
Conversion Result Threshold Monitor Function
161
Data Storage Mode
161
Figure 10-6. Discontinuous Operation Mode
161
Sample Time Configuration
162
Figure 10-7. Data Storage Mode of 12-Bit Resolution
162
Figure 10-8. Data Storage Mode of 10-Bit Resolution
162
Figure 10-9. Data Storage Mode of 8-Bit Resolution
162
Figure 10-10. Data Storage Mode of 6-Bit Resolution
162
External Trigger Configuration
163
DMA Request
163
ADC Internal Channels
163
Table 10-3. External Trigger Source for ADC Routine Sequence
163
Battery Voltage Monitoring
164
ADC Interrupts
164
Register Definition
165
Status Register (ADC_STAT)
165
Control Register 0 (ADC_CTL0)
165
Control Register 1 (ADC_CTL1)
167
Sampling Time Register 0 (ADC_SAMPT0)
168
Sampling Time Register 1 (ADC_SAMPT1)
169
Watchdog High Threshold Register (ADC_WDHT)
170
Watchdog Low Threshold Register (ADC_WDLT)
171
Routine Sequence Register 0 (ADC_RSQ0)
171
Routine Sequence Register 1 (ADC_RSQ1)
172
Routine Sequence Register 2 (ADC_RSQ2)
172
Routine Data Register (ADC_RDATA)
173
Digital-To-Analog Converter (DAC)
173
Overview
173
Characteristic
174
Figure 11-1. DAC Block Diagram
174
Table 11-1. DAC I/O Description
174
Function Overview
175
DAC Enable
175
DAC Output Buffer
175
DAC Data Configuration
175
DAC Trigger
175
Table 11-2. External Triggers of DAC
175
DAC Workflow
176
DAC Output Calculate
176
DMA Function
176
Register Definition
177
Control Register (DAC_CTL)
177
Software Trigger Register (DAC_SWT)
178
DAC0 12-Bit Right-Aligned Data Holding Register (DAC0_R12DH)
178
DAC0 12-Bit Left-Aligned Data Holding Register (DAC0_L12DH)
179
DAC0 8-Bit Right-Aligned Data Holding Register (DAC0_R8DH)
179
DAC0 Data Output Register (DAC0_DO)
180
Status Register (DAC_STAT)
180
Comparator (CMP)
182
Overview
182
Characteristics
182
Function Overview
182
CMP Clock and Reset
183
CMP I/O Configure
183
Figure 12-1. CMP Block Diagram
183
CMP Operating Mode
184
CMP Hysteresis
184
CMP Register Write Protection
184
Figure 12-2. CMP Hysteresis
184
Register Definition
185
Control/Status Register (CMP_CS)
185
Watchdog Timer (WDGT)
189
Free Watchdog Timer (FWDGT)
189
Overview
189
Characteristics
189
Function Overview
189
Figure 13-1. Free Watchdog Timer Block Diagram
190
Table 13-1. Min / Max FWDGT Timeout Period at 40 Khz (IRC40K)
191
Register Definition
192
Window Watchdog Timer (WWDGT)
196
Overview
196
Characteristics
196
Function Overview
196
Figure 13-2. Window Watchdog Timer Block Diagram
197
Figure 13-3. Window Watchdog Timer Timing Diagram
198
Table 13-2. Min-Max Timeout Value at 36 Mhz (Fpclk1)
198
Register Definition
199
Real-Time Clock(RTC)
201
Overview
201
Characteristics
201
Function Overview
202
Block Diagram
202
Clock Source and Prescalers
202
Figure 14-1. Block Diagram of RTC
202
Shadow Registers Introduction
203
Configurable and Field Maskable Alarm
203
RTC Initialization and Configuration
204
Calendar Reading
205
Resetting the RTC
206
RTC Shift Function
206
RTC Reference Clock Detection
207
RTC Smooth Digital Calibration
208
Time-Stamp Function
210
Tamper Detection
210
Calibration Clock Output
211
Alarm Output
211
RTC Power Saving Mode Management
212
RTC Interrupts
212
Table 14-1. RTC Power Saving Mode Management
212
Table 14-2. RTC Interrupts Control
212
Register Definition
213
Time Register (RTC_TIME)
213
Date Register (RTC_DATE)
213
Control Register (RTC_CTL)
214
Status Register (RTC_STAT)
216
Prescaler Register (RTC_PSC)
218
Alarm 0 Time and Date Register (RTC_ALRM0TD)
219
Write Protection Key Register (RTC_WPK)
220
Sub Second Register (RTC_SS)
220
Shift Function Control Register (RTC_SHIFTCTL)
221
Time of Time Stamp Register (RTC_TTS)
221
Date of Time Stamp Register (RTC_DTS)
222
Sub Second of Time Stamp Register (RTC_SSTS)
223
High Resolution Frequency Compensation Register (RTC_HRFC)
223
Tamper Register (RTC_TAMP)
224
Alarm 0 Sub Second Register (RTC_ALRM0SS)
226
Backup Registers (Rtc_Bkpx) (X=0
227
Timer (Timerx)
229
Table 15-1. Timers (Timerx) Are Devided into Six Sorts
229
Advanced Timer (Timerx,X=0)
230
Overview
230
Characteristics
230
Block Diagram
231
Function Overview
231
Figure 15-1. Advanced Timer Block Diagram
231
Figure 15-2. Timing Chart of Internal Clock Divided by 1
232
Figure 15-3. Timing Chart of PSC Value Change from 0 to 2
233
Figure 15-4. Timing Chart of up Counting Mode, PSC=0/2
234
Figure 15-5. Timing Chart of up Counting Mode , Change Timerx_Car on the Go
234
Figure 15-6. Timing Chart of down Counting Mode, PSC=0/2
235
Figure 15-7. Timing Chart of down Counting Mode, Change Timerx_Car on the Go
236
Figure 15-8. Center-Aligned Counter Timechart
236
Figure 15-9. Repetition Counter Timing Chart of Center-Aligned Counting Mode
238
Figure 15-10. Repetition Counter Timing Chart of up Counting Mode
238
Figure 15-11. Repetition Counter Timing Chart of down Counting Mode
239
Figure 15-12. Channel Input Capture Principle
240
Figure 15-13. Channel Output Compare Principle (with Complementary Output, X=0, 1, 2)
241
Figure 15-14. Channel Output Compare Principle (CH3_O)
241
Figure 15-15. Output-Compare under Three Modes
242
Figure 15-16. EAPWM Timechart
243
Figure 15-17. CAPWM Timechart
243
Table 15-2. Complementary Outputs Controlled by Parameters
246
Figure 15-18. Channel Output Complementary PWM with Dead-Time Insertion
247
Figure 15-19. Output Behavior in Response to a Break(the Break High Active)
248
Figure 15-20. Example of Counter Operation in Quadrature Decoder Interface Mode
249
Figure 15-21. Example of Quadrature Decoder Interface Mode with CI0FE0 Polarity Inverted
249
Table 15-3. Counting Direction Versus Quadrature Decode Signals
249
Figure 15-22. Hall Sensor I S Used to BLDC Motor
250
Figure 15-23. Hall Sensor Timing between Two Timers
251
Table 15-4. Slave Mode Example Table
251
Figure 15-24. Restart Mode
252
Figure 15-25. Pause Mode
252
Figure 15-26. Event Mode
253
Figure 15-27. Single Pulse Mode Timerx_Chxcv = 0X04 Timerx_Car=0X60
254
Figure 15-28. TIMER0 Master/Slave Mode Timer Example
254
Table 15-5. Input Trigger of Timer0
255
Figure 15-29. Triggering TIMER0 with Enable of TIMER2
256
Figure 15-30. Triggering TIMER0 and TIMER2 with Timer2'S CI0 Input
257
Timerx Registers(X=0)
258
General Level0 Timer (Timerx, X=1, 2)
285
Overview
285
Characteristics
285
Block Diagram
285
Figure 15-31. General Level 0 Timer Block Diagram
285
Function Overview
286
Figure 15-32. Timing Chart of Internal Clock Divided by 1
287
GigaDevice Semiconductor GD32F150 Series User Manual (685 pages)
ARM Cortex-M3 32-bit MCU
Brand:
GigaDevice Semiconductor
| Category:
Microcontrollers
| Size: 26 MB
Table of Contents
Table of Contents
17
Figure 1-1. Cortex™-M3 Block Diagram
28
Figure 1-2. Series System Architecture of Gd32F130Xx and Gd32F150Xx Devices
29
Figure 1-3. Series System Architecture of Gd32F170Xx and Gd32F190Xx Devices
30
Figure 1-5. Memory Map of Gd32F170Xx and Gd32F190Xx Devices
33
Table 1-1. Flash Module Organization
35
Table 1-2. Flash Module Organization
35
Table 1-3. Boot Modes
36
Boot_Mode
38
System Configuration Register 2 (SYSCFG_R2)
43
Figure 2-1. Power Supply Overview of Gd32F130Xx and Gd32F150Xx Devices
48
Figure 2-2. Power Supply Overview of Gd32F170Xx and Gd32F190Xx Devices
49
Figure 2-3. Waveform of the Power Reset
51
Figure 2-4. Waveform of LVD Threshold
52
Table 2-1. Power Saving Mode Summary
54
Table 3-1. Base Address and Size for Flash Memory
60
Figure 3-1. Proccess of Page Erase Operation
62
Figure 3-2. Process of the Mass Erase Operation
63
Figure 3-3. Process of the Word Programming Operation
64
Table 3-4. OB_WP Bit for Pages Protected
67
Address Offset: 0X04 Reset Value: 0X0000
68
This Register Has to be Accessed by Word(32-Bit)
68
Bits Fields
68
Reserved
68
Address Offset: 0X08
68
Reset Value: 0X0000 0000
68
Reserved
70
Must be Kept at Reset Value
70
Figure 4-1. the System Reset Circuit
77
Figure 4-2. Clock Tree of Gd32F130Xx and Gd32F150Xx Devices
78
Figure 4-3. Clock Tree of Gd32F170Xx and Gd32F190Xx Devices
79
Table 4-1. Clock Source Select
83
Table 4-2. Clock Source Select
83
Table 4-3. Core Domain Voltage Selected in Deep-Sleep Mode
84
Table 4-4. Core Domain Voltage Selected in Deep-Sleep Mode
84
Figure 5-1. Basic Structure of a Standard I/O Port Bit
129
Table 5-1. GPIO Configuration Table
129
Figure 5-2. Input Floating/Pull Up/Pull down Configurations
131
Figure 5-3. Output Configuration
132
Figure 5-4. High Impedance-Analog Configuration
132
Figure 5-5. Alternate Function Configuration
133
Figure 6-1.Block Diagram of CRC Calculation Unit
148
Table 7-1. NVIC Exception Types in Cotrex-M3
153
Table 7-2. Interrupt Vector Table of Gd32F130Xx and Gd32F150Xx Devices
153
Figure 7-1. Block Diagram of EXTI
157
Table 7-4. EXTI Source of Gd32F130Xx and Gd32F150Xx Devices
158
Table 7-5. EXTI Source of Gd32F170Xx and Gd32F190Xx Devices
159
Table 8-1. DMA Transfer Operations
165
Table 8-2. DMA Interrupt Event
166
Figure 8-1. DMA Interrupt Generation Logic
167
Figure 8-2. DMA Request Mapping
168
Figure 9-1. Advanced Timer Block Diagram
177
Figure 9-7. Counter Timing Diagram, Internal Clock Divided by N
181
Figure 9-8. Counter Timing Diagram, Update Event When ARSE=0
182
Figure 9-9. Counter Timing Diagram, Update Event When ARSE=1
182
Figure 9-13. Counter Timing Diagram, Internal Clock Divided by N
185
Figure 9-14. Counter Timing Diagram, Update Event When Repetition Counter Is Not Used
185
Figure 9-15. Counter Timing Diagram, Internal Clock Divided by 1, Timerx_Carl = 0X5
186
Figure 9-17. Counter Timing Diagram, Internal Clock Divided by 4, Timerx_Carl=0X63
187
Figure 9-18. Counter Timing Diagram, Internal Clock Divided by N
188
Figure 9-19. Counter Timing Diagram, Update Event with ARSE=1(Counter Underflow)
188
Figure 9-20. Counter Timing Diagram, Update Event with ARSE=1 (Counter Overflow)
189
Figure 9-23. Capture/Compare Channel (Example: Channel 1 Input Stage)
192
Figure 9-24. Capture/Compare Channel 1 Main Circuit
193
Figure 9-25. Output Stage of Capture/Compare Channel (Channel 1 to 3)
193
Figure 9-26. Output Stage of Capture/Compare Channel (Channel 4)
193
Figure 9-27. Output Compare Toggle Mode, Toggle on OC1
195
Figure 9-28. Output Compare PWM Mode1 on OC1, Upcounting Mode
195
Figure 9-29. Output Compare PWM Mode1 on OC1, Center-Aligned Counting Mode
196
Figure 9-30. Complementary Output with Dead-Time Insertion
197
Figure 9-31. Dead-Time Waveforms with Delay Greater than the Negative Pulse
197
Figure 9-32. Dead-Time Waveforms with Delay Greater than the Positive Pulse
197
Figure 9-34. Single Pulse Mode
199
Figure 9-35. Example of Counter Operation in Encoder Interface Mode
200
Table 9-1. Counting Direction Versus Encoder Signals
200
Figure 9-36. Example of Encoder Interface Mode with TI1FP1 Polarity Inverted
201
Figure 9-37. Control Circuit in Restart Mode
201
Figure 9-38. Control Circuit in Pause Mode
202
Figure 9-39. Control Circuit in Trigger Mode
202
Figure 9-40. Timer1 Master/Slave Mode Timer Example
203
Figure 9-46. General Timer Block Diagram (TIMER2 and TIMER3)
232
Figure 9-52. Counter Timing Diagram, Internal Clock Divided by N
236
Figure 9-53. Counter Timing Diagram, Update Event When ARSE=0
236
Figure 9-54. Counter Timing Diagram, Update Event When ARSE=1
237
Figure 9-58. Counter Timing Diagram, Internal Clock Divided by N
239
Figure 9-59. Counter Timing Diagram, Update Event When Counter Is Not Used
240
Figure 9-60. Counter Timing Diagram, Internal Clock Divided by 1, Timerx_Carl = 0X5
241
Figure 9-62. Counter Timing Diagram, Internal Clock Divided by 4, Timerx_Carl=0X63
242
Figure 9-63. Counter Timing Diagram, Internal Clock Divided by N
242
Figure 9-64. Counter Timing Diagram, Update Event with ARSE=1(Counter Underflow)
243
Figure 9-65. Counter Timing Diagram, Update Event with ARSE=1 (Counter Overflow)
243
Cnt_Clk
243
Cnt_Reg
243
Cnt_Clk
244
Cnt_Reg
244
Figure 9-69. Output Stage of Capture/Compare Channel (Channel 1)
247
Figure 9-70. Output Compare Toggle Mode, Toggle on OC1
248
Figure 9-71. Output Compare PWM Mode1 on OC1, Upcounting Mode
249
Figure 9-72. Output Compare PWM Mode1 on OC1, Center-Aligned Counting Mode
249
Advertisement
Advertisement
Related Products
GigaDevice Semiconductor GD32F1 0 Series
GigaDevice Semiconductor GD32F130 Series
GigaDevice Semiconductor GD32F170 Series
GigaDevice Semiconductor GD32F190 Series
GigaDevice Semiconductor GD32F10 Series
GigaDevice Semiconductor GD32F30 Series
GigaDevice Semiconductor GD32F310 Series
GigaDevice Semiconductor GD32F20x
GigaDevice Semiconductor GD32F105 Series
GigaDevice Semiconductor GD32F107 Series
GigaDevice Semiconductor Categories
Microcontrollers
Computer Hardware
Motherboard
Semiconductors
Adapter
More GigaDevice Semiconductor Manuals
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL