首页|嵌入式系统|显示技术|模拟IC/电源|元件与制造|其他IC/制程|消费类电子|无线/通信|汽车电子|工业控制|医疗电子|测试测量
首页 > 分享下载 > 常用文档 > STM32F10x参考手册

STM32F10x参考手册

资料介绍
STM32F10x参考手册
1 文档中的约定...............................................................................................................................1
1.1 寄存器描述中使用的缩写列表........................................................................................1
2 存储器和总线构架.........................................................................................................................2
2.1 系统构架.........................................................................................................................2
2.2 存储器组织.....................................................................................................................3
2.3 存储器映像.....................................................................................................................4
2.3.1 外设存储器映像.......................................................................................................5
2.3.2 嵌入式SRAM...........................................................................................................6
2.3.3 位段.........................................................................................................................6
2.3.4 嵌入式闪存..............................................................................................................6
2.4 启动配置.........................................................................................................................8
3 电源控制(PWR) ............................................................................................................................9
3.1 电源...............................................................................................................................9
3.1.1 独立的A/D转换器供电和参考电压...........................................................................9
3.1.2 电池备份.................................................................................................................9
3.1.3 电压调节器............................................................................................................10
3.2 电源管理器...................................................................................................................10
3.2.1 上电复位(POR)和掉电复位(PDR)..........................................................................10
3.2.2 可编程电压监测器(PVD) .......................................................................................10
3.3 低功耗模式...................................................................................................................11
3.3.1 降低系统时钟........................................................................................................12
3.3.2 外部时钟的控制.....................................................................................................12
3.3.3 睡眠模式...............................................................................................................12
3.3.4 停止模式...............................................................................................................13
3.3.5 待机模式...............................................................................................................14
3.3.6 低功耗模式下的自动唤醒(AWU)............................................................................15
3.4 电源控制寄存器............................................................................................................16
3.4.1 电源控制寄存器(PWR_CR)...................................................................................16
3.4.2 电源控制/状态寄存器.............................................................................................17
3.5 PWR寄存器映像...........................................................................................................18
4 复位和时钟控制..........................................................................................................................19
4.1 复位..............................................................................................................................19
4.1.1 系统复位...............................................................................................................19
4.1.2 电源复位...............................................................................................................19
STM32F10x参考手册 第一版 目录
4.1.3 备份域复位............................................................................................................20
4.2 时钟..............................................................................................................................20
4.2.1 HSE时钟...............................................................................................................22
4.2.2 HSI时钟.................................................................................................................22
4.2.3 PLL .......................................................................................................................23
4.2.4 LSE时钟................................................................................................................23
4.2.5 LSI时钟.................................................................................................................23
4.2.6 系统时钟(SYSCLK)选择........................................................................................24
4.2.7 时钟安全系统(CSS)...............................................................................................24
4.2.8 RTC时钟...............................................................................................................24
4.2.9 看门狗时钟............................................................................................................24
4.2.10 时钟输出...............................................................................................................25
4.3 RCC寄存器描述...........................................................................................................26
4.3.1 时钟控制寄存器(RCC_CR) ...................................................................................26
4.3.2 时钟配置寄存器(RCC_CFGR)...............................................................................27
4.3.3 时钟中断寄存器 (RCC_CIR)..................................................................................29
4.3.4 APB2外设复位寄存器 (RCC_APB2RSTR)............................................................32
4.3.5 APB1外设复位寄存器 (RCC_APB1RSTR)............................................................33
4.3.6 AHB外设时钟使能寄存器 (RCC_AHBENR) ..........................................................35
4.3.7 APB2外设时钟使能寄存器(RCC_APB2ENR)........................................................36
4.3.8 APB1外设时钟使能寄存器(RCC_APB1ENR)........................................................37
4.3.9 备份域控制寄存器 (RCC_BDCR)..........................................................................39
4.3.10 控制/状态寄存器 (RCC_CSR) ...............................................................................40
4.4 RCC寄存器映像...........................................................................................................43
5 通用和复用功能I/O(GPIO和AFIO) ..............................................................................................44
5.1 GPIO功能描述..............................................................................................................44
5.1.1 通用I/O(GPIO).......................................................................................................45
5.1.2 单独的位设置或位清除..........................................................................................45
5.1.3 外部中断/唤醒线....................................................................................................46
5.1.4 复用功能(AF).........................................................................................................46
5.1.5 软件重新映射I/O复用功能.....................................................................................46
5.1.6 GPIO锁定机制.......................................................................................................46
5.1.7 输入配置...............................................................................................................46
5.1.8 输出配置...............................................................................................................47
5.1.9 复用功能配置........................................................................................................48
STM32F10x参考手册 第一版 目录
5.1.10 模拟输入配置........................................................................................................49
5.2 GPIO寄存器描述..........................................................................................................50
5.2.1 端口配置低寄存器(GPIOx_CRL) (x=A..E) .............................................................50
5.2.2 端口配置高寄存器(GPIOx_CRH) (x=A..E) ............................................................51
5.2.3 端口输入数据寄存器(GPIOx_IDR) (x=A..E) ..........................................................52
5.2.4 端口输出数据寄存器(GPIOx_ODR) (x=A..E).........................................................52
5.2.5 端口位设置/复位寄存器(GPIOx_BSRR) (x=A..E) ..................................................53
5.2.6 端口位复位寄存器(GPIOx_BRR) (x=A..E).............................................................53
5.2.7 端口配置锁定寄存器(GPIOx_LCKR) (x=A..E) .......................................................54
5.3 复用功能I/O和调试配置(AFIO) .....................................................................................55
5.3.1 把OSC_IN/OSC_OUT引脚作为GPIO端口PD0/PD1 .............................................55
5.3.2 BXCAN复用功能重映射........................................................................................55
5.3.3 JTAG/SWD复用功能重映射...................................................................................55
5.3.4 定时器复用功能重映射..........................................................................................56
5.3.5 USART复用功能重映射.........................................................................................57
5.3.6 I2C 1 复用功能重映射...........................................................................................58
5.3.7 SPI 1复用功能重映射............................................................................................58
5.4 AFIO寄存器描述...........................................................................................................59
5.4.1 复用重映射和调试I/O配置寄存器(AFIO_MAPR)....................................................60
5.4.2 外部中断配置寄存器1(AFIO_EXTICR1)................................................................62
5.4.3 外部中断配置寄存器2(AFIO_EXTICR2)................................................................62
5.4.4 外部中断配置寄存器3(AFIO_EXTICR3)................................................................63
5.4.5 外部中断配置寄存器4(AFIO_EXTICR4)................................................................63
5.5 GPIO 和AFIO寄存器地址映象......................................................................................64
5.5.1 GPIO寄存器地址映象............................................................................................64
5.5.2 AFIO寄存器地址映象............................................................................................65
6 中断和事件................................................................................................................................66
6.1 嵌套向量中断控制器(NVIC) .....................................................................................66
6.1.1 系统嘀嗒(SysTick)校准值寄存器...........................................................................66
6.1.2 中断和异常向量.....................................................................................................66
6.2 外部中断/事件控制器(EXTI) .........................................................................................68
6.2.1 主要特性...............................................................................................................68
6.2.2 框图.......................................................................................................................69
6.2.3 唤醒事件管理........................................................................................................69
6.2.4 功能说明...............................................................................................................69
STM32F10x参考手册 第一版 目录
6.2.5 外部中断/事件线路映像.........................................................................................71
6.3 EXTI 寄存器描述..........................................................................................................72
6.3.1 外部中断/事件寄存器映像.....................................................................................75
7 DMA 控制器(DMA) ................................................................................................................76
7.1 简介..............................................................................................................................76
7.2 主要特性.......................................................................................................................76
7.3 功能描述.......................................................................................................................77
7.3.1 DMA处理...............................................................................................................77
7.3.2 仲裁器...................................................................................................................77
7.3.3 DMA 通道..............................................................................................................78
7.3.4 错误管理...............................................................................................................79
7.3.5 DMA请求映像........................................................................................................79
7.4 DMA寄存器..................................................................................................................82
7.4.1 DMA中断状态寄存器(DMA_ISR)...........................................................................82
7.4.2 DMA中断标志清除寄存器(DMA_IFCR) .................................................................82
7.4.3 DMA通道x配置寄存器(DMA_CCRx)(x = 1…7) .....................................................83
7.4.4 DMA通道x传输数量寄存器(DMA_CNDTRx)(x = 1…7)..........................................85
7.4.5 DMA通道x外设地址寄存器(DMA_CPARx)(x = 1…7) ............................................85
7.4.6 DMA通道x存储器地址寄存器(DMA_CPARx)(x = 1…7).........................................85
7.5 DMA寄存器映像...........................................................................................................86
8 实时时钟(RTC) ......................................................................................................................88
8.1 简介..............................................................................................................................88
8.2 主要特性.......................................................................................................................88
8.3 功能描述.......................................................................................................................88
8.3.1 概述.......................................................................................................................88
8.3.2 复位过程...............................................................................................................90
8.3.3 读RTC寄存器........................................................................................................90
8.3.4 配置RTC寄存器.....................................................................................................90
8.3.5 RTC标志的设置.....................................................................................................90
8.4 RTC寄存器描述............................................................................................................91
8.4.1 RTC控制寄存器高位(RTC_CRH) .....................................................................91
8.4.2 RTC控制寄存器低位(RTC_CRL) ......................................................................92
8.4.3 RTC预分频装载寄存器(RTC_PRLH/RTC_PRLL).............................................93
8.4.4 RTC预分频分频因子寄存器(RTC_DIVH / RTC_DIVL) ..........................................94
8.4.5 RTC计数器寄存器 (RTC_CNTH / RTC_CNTL) .....................................................95
STM32F10x参考手册 第一版 目录
8.4.6 RTC闹钟寄存器(RTC_ALRH/RTC_ALRL)........................................................95
8.5 RTC寄存器映像............................................................................................................97
9 备份寄存器(BKP)........................................................................................................................98
9.1 简介..............................................................................................................................98
9.2 特性..............................................................................................................................98
9.3 侵入检测.......................................................................................................................98
9.4 RTC校准......................................................................................................................98
9.5 BKP寄存器描述............................................................................................................99
9.5.1 备份数据寄存器x(BKP_DRx) (x = 1 … 10)............................................................99
9.5.2 RTC时钟校准寄存器(BKP_RTCCR).................................................................99
9.5.3 备份控制寄存器(BKP_CR) ....................................................................................99
9.5.4 备份控制/状态寄存器(BKP_CSR)........................................................................100
9.6 BKP寄存器映像..........................................................................................................101
10 独立看门狗(IWDG) ............................................................................................................103
10.1 简介............................................................................................................................103
10.1.1 硬件看门狗..........................................................................................................103
10.1.2 寄存器访问保护...................................................................................................103
10.1.3 调试模式.............................................................................................................104
10.2 IWDG寄存器描述.......................................................................................................104
10.2.1 键寄存器(IWDG_KR)......................................................................................104
10.2.2 预分频寄存器(IWDG_PR) ...................................................................................105
10.2.3 重装载寄存器(IWDG_RLR) .................................................................................106
10.2.4 状态寄存器(IWDG_SR).......................................................................................106
10.3 IWDG寄存器映像.......................................................................................................107
11 窗口看门狗(WWDG)..........................................................................................................108
11.1 简介............................................................................................................................108
11.2 主要特性.....................................................................................................................108
11.3 功能描述.....................................................................................................................108
11.4 如何编写看门狗超时程序............................................................................................109
11.5 调试模式.....................................................................................................................110
11.6 寄存器描述................................................................................................................. 111
11.6.1 控制寄存器(WWDG_CR) .................................................................................... 111
11.6.2 配置寄存器(WWDG_CFR) .................................................................................. 111
11.6.3 状态寄存器(WWDG_SR) ....................................................................................112
11.7 WWDG寄存器映像.....................................................................................................113
STM32F10x参考手册 第一版 目录
12 高级控制定时器(TIM1).......................................................................................................114
12.1 简介............................................................................................................................114
12.2 主要特性.....................................................................................................................114
12.3 框图............................................................................................................................115
12.4 功能描述.....................................................................................................................116
12.4.1 时基单元.............................................................................................................116
12.4.2 计数器模式..........................................................................................................117
12.4.3 重复向下计数器...................................................................................................125
12.4.4 时钟选择.............................................................................................................126
12.4.5 捕获/比较通道.....................................................................................................129
12.4.6 输入捕获模式......................................................................................................131
12.4.7 PWM输入模式.....................................................................................................132
12.4.8 强置输出模式......................................................................................................132
12.4.9 输出比较模式......................................................................................................133
12.4.10 PWM 模式....................................................................................................134
12.4.11 互补输出和死区插入....................................................................................136
12.4.12 使用刹车功能...............................................................................................138
12.4.13 在外部事件时清除OCxREF信号...................................................................139
12.4.14 六步PWM的产生..........................................................................................140
12.4.15 单脉冲模式...................................................................................................141
12.4.16 编码器接口模式............................................................................................143
12.4.17 定时器输入异或功能....................................................................................144
12.4.18 与霍尔元件的接口........................................................................................145
12.4.19 定时器和外部触发的同步.............................................................................146
12.4.20 定时器同步...................................................................................................149
12.4.21 调试模式......................................................................................................149
12.5 TIM1寄存器描述.........................................................................................................150
12.5.1 控制寄存器1(TIM1_CR1) ....................................................................................150
12.5.2 控制寄存器2(TIM1_CR2) ....................................................................................151
12.5.3 从模式控制寄存器(TIM1_SMCR) ........................................................................153
12.5.4 DMA/中断使能寄存器(TIM1_DIER).....................................................................154
12.5.5 状态寄存器(TIM1_SR) ........................................................................................156
12.5.6 事件产生寄存器(TIM1_EGR)...............................................................................157
12.5.7 捕获/比较模式寄存器1(TIM1_CCMR1) ...............................................................158
12.5.8 捕获/比较模式寄存器2(TIM1_CCMR2) ...............................................................161
STM32F10x参考手册 第一版 目录
12.5.9 捕获/比较使能寄存器(TIM1_CCER) ....................................................................162
12.5.10 计数器(TIM1_CNT) ......................................................................................165
12.5.11 预分频器(TIM1_PSC) ..................................................................................165
12.5.12 自动重装载寄存器(TIM1_ARR)....................................................................165
12.5.13 周期计数寄存器(TIM1_RCR) .......................................................................166
12.5.14 捕获/比较寄存器1(TIM1_CCR1) ..................................................................166
12.5.15 捕获/比较寄存器2(TIM1_CCR2) ..................................................................167
12.5.16 捕获/比较寄存器3(TIM1_CCR3) ..................................................................167
12.5.17 捕获/比较寄存器(TIM1_CCR4) ....................................................................168
12.5.18 刹车和死区寄存器(TIM1_BDTR)..................................................................168
12.5.19 DMA控制寄存器(TIM1_DCR).......................................................................170
12.5.20 连续模式的DMA地址(TIM1_DMAR).............................................................170
12.6 TIM1寄存器图............................................................................................................171
13 通用定时器(TIMx)..............................................................................................................173
13.1 概述............................................................................................................................173
13.2 主要特性.....................................................................................................................173
13.3 框图............................................................................................................................174
13.4 功能描述.....................................................................................................................175
13.4.1 时基单元.............................................................................................................175
13.4.2 计数器模式..........................................................................................................176
13.4.3 时钟选择.............................................................................................................183
13.4.4 捕获/比较通道.....................................................................................................185
13.4.5 输入捕获模式......................................................................................................187
13.4.6 PWM输入模式.....................................................................................................187
13.4.7 强置输出模式......................................................................................................188
13.4.8 输出比较模式......................................................................................................188
13.4.9 PWM 模式...........................................................................................................189
13.4.10 单脉冲模式...................................................................................................191
13.4.11 在外部事件时清除OCxREF信号...................................................................193
13.4.12 编码器接口模式............................................................................................193
13.4.13 定时器输入异或功能....................................................................................195
13.4.14 定时器和外部触发的同步.............................................................................195
13.4.15 定时器同步...................................................................................................198
13.4.16 调试模式......................................................................................................202
13.5 TIMx寄存器描述.........................................................................................................203
STM32F10x参考手册 第一版 目录
13.5.1 控制寄存器1(TIMx_CR1) ....................................................................................203
13.5.2 控制寄存器2(TIMx_CR2) ....................................................................................205
13.5.3 从模式控制寄存器(TIMx_SMCR) ........................................................................206
13.5.4 DMA/中断使能寄存器(TIMx_DIER).....................................................................207
13.5.5 状态寄存器(TIMx_SR).........................................................................................209
13.5.6 事件产生寄存器(TIMx_EGR)...............................................................................211
13.5.7 捕获/比较模式寄存器1(TIMx_CCMR1)................................................................212
13.5.8 捕获/比较模式寄存器2(TIMx_CCMR2)................................................................215
13.5.9 捕获/比较使能寄存器(TIMx_CCER) ....................................................................216
13.5.10 计数器(TIMx_CNT) ......................................................................................218
13.5.11 预分频器(TIMx_PSC)...................................................................................218
13.5.12 自动重装载寄存器(TIMx_ARR) ....................................................................218
13.5.13 捕获/比较寄存器1(TIMx_CCR1)...................................................................219
13.5.14 捕获/比较寄存器2(TIMx_CCR2)...................................................................220
13.5.15 捕获/比较寄存器3(TIMx_CCR3)...................................................................220
13.5.16 捕获/比较寄存器(TIMx_CCR4).....................................................................221
13.5.17 DMA控制寄存器(TIMx_DCR).......................................................................221
13.5.18 连续模式的DMA地址(TIMx_DMAR).............................................................222
13.6 TIMx寄存器图.............................................................................................................223
14 控制器局域网(bxCAN) .......................................................................................................225
14.1 简介............................................................................................................................225
14.2 主要特点.....................................................................................................................225
14.3 总体描述.....................................................................................................................225
14.3.1 CAN 2.0B内核.....................................................................................................226
14.3.2 控制、状态和配置寄存器....................................................................................226
14.3.3 发送邮箱.............................................................................................................226
14.3.4 接收过滤器..........................................................................................................226
14.3.5 接收FIFO ............................................................................................................227
14.4 工作模式.....................................................................................................................228
14.4.1 初始化模式..........................................................................................................228
14.4.2 正常模式.............................................................................................................228
14.4.3 睡眠模式(低功耗)............................................................................................228
14.4.4 测试模式.............................................................................................................229
14.4.5 静默模式.............................................................................................................229
14.4.6 环回模式.............................................................................................................229
STM32F10x参考手册 第一版 目录
14.4.7 环回静默模式......................................................................................................230
14.5 功能描述.....................................................................................................................230
14.5.1 发送处理.............................................................................................................230
14.5.2 时间触发通信模式...............................................................................................232
14.5.3 接收管理.............................................................................................................232
14.5.4 标识符过滤..........................................................................................................234
14.5.5 报文存储.............................................................................................................238
14.5.6 出错管理.............................................................................................................239
14.5.7 位时间特性..........................................................................................................239
14.6 中断............................................................................................................................241
14.7 寄存器访问保护..........................................................................................................243
14.8 CAN 寄存器描述.........................................................................................................243
14.8.1 控制和状态寄存器...............................................................................................243
14.8.2 邮箱寄存器..........................................................................................................255
14.8.3 CAN过滤器寄存器...............................................................................................260
14.9 bxCAN寄存器列表......................................................................................................264
15 I2C接口.............................................................................................................................267
15.1 介绍............................................................................................................................267
15.2 主要特点.....................................................................................................................267
15.3 概述............................................................................................................................268
15.4 功能描述.....................................................................................................................269
15.4.1 I2C从模式...........................................................................................................269
15.4.2 I2C主模式...........................................................................................................271
15.4.3 错误条件.............................................................................................................274
15.4.4 SDA/SCL线控制..................................................................................................275
15.4.5 SMBus ................................................................................................................275
15.4.6 DMA请求.............................................................................................................277
15.4.7 包错误校验(PEC) ................................................................................................278
15.5 中断请求.....................................................................................................................279
15.6 I2C寄存器描述...........................................................................................................281
15.6.1 控制寄存器1(I2C_CR1).......................................................................................281
15.6.2 控制寄存器2(I2C_CR2).......................................................................................283
15.6.3 自身地址寄存器1 (I2C_OAR1) ............................................................................284
15.6.4 自身地址寄存器2(I2C_OAR2) .............................................................................285
15.6.5 数据寄存器(I2C_DR)...........................................................................................285
STM32F10x参考手册 第一版 目录
15.6.6 状态寄存器1(I2C_SR1) .......................................................................................285
15.6.7 状态寄存器2 (I2C_SR2) ......................................................................................288
15.6.8 时钟控制寄存器(I2C_CCR) .................................................................................289
15.6.9 TRISE寄存器(I2C_TRISE) ..................................................................................290
15.7 I2C寄存器地址映象....................................................................................................291
16 串行外设接口(SPI) ............................................................................................................292
16.1 简介............................................................................................................................292
16.2 主要特征.....................................................................................................................292
16.3 功能描述.....................................................................................................................292
16.3.1 概述.....................................................................................................................292
16.3.2 SPI从模式...........................................................................................................295
16.3.3 SPI主模式...........................................................................................................296
16.3.4 单向通信.............................................................................................................297
16.3.5 状态标志.............................................................................................................297
16.3.6 CRC计算.............................................................................................................298
16.3.7 利用DMA的SPI通信............................................................................................299
16.3.8 错误标志.............................................................................................................299
16.3.9 中断.....................................................................................................................300
16.4 SPI寄存器描述...........................................................................................................300
16.4.1 SPI控制寄存器1(SPI_CR1).................................................................................300
16.4.2 SPI控制寄存器2(SPI_CR2).................................................................................302
16.4.3 SPI 状态寄存器(SPI_SR) ....................................................................................303
16.4.4 SPI 数据寄存器(SPI_DR)....................................................................................304
16.4.5 SPI CRC多项式寄存器(SPI_CRCPR) .................................................................304
16.4.6 SPI Rx CRC寄存器(SPI_RXCRCR)....................................................................305
16.4.7 SPI Tx CRC寄存器(SPI_TXCRCR).....................................................................305
16.5 SPI 寄存器地址映象...................................................................................................306
17 USART收发器(USART).....................................................................................................307
17.1 介绍............................................................................................................................307
17.2 概述............................................................................................................................308
17.2.1 框图.....................................................................................................................309
17.2.2 USART 特征描述.................................................................................................310
17.2.3 发送器.................................................................................................................310
17.2.4 接收器.................................................................................................................312
17.2.5 分数波特率的产生...............................................................................................315
STM32F10x参考手册 第一版 目录
17.2.6 17.2.6 多处理器通信...........................................................................................316
17.2.7 校验控制.............................................................................................................317
17.2.8 LIN(局域互联网)模式......................................................................................318
17.2.9 USART 同步模式.................................................................................................320
17.2.10 单线半双工通信............................................................................................322
17.2.11 智能卡..........................................................................................................322
17.2.12 IrDA SIR ENDEC 功能块..............................................................................324
17.2.13 利用DMA连续通信.......................................................................................325
17.2.14 硬件流控制...................................................................................................326
17.3 中断请求.....................................................................................................................327
17.4 USART寄存器描述.....................................................................................................329
17.4.1 状态寄存器(USART_SR).....................................................................................329
17.4.2 数据寄存器(USART_DR) ....................................................................................330
17.4.3 波特比率寄存器(USART_BRR)...........................................................................331
17.4.4 控制寄存器1 (USART_CR1) ...............................................................................331
17.4.5 控制寄存器2(USART_CR2) ................................................................................333
17.4.6 控制寄存器3(USART_CR3) ................................................................................335
17.4.7 保护时间和预分频寄存器(USART_GTPR) ..........................................................336
17.5 USART寄存器地址映象..............................................................................................338
18 USB全速设备接口(USB)....................................................................................................339
18.1 导言............................................................................................................................339
18.2 主要特征.....................................................................................................................339
18.3 方框图........................................................................................................................339
18.4 功能描述.....................................................................................................................340
18.4.1 USB功能模块描述...............................................................................................341
18.5 编程中需要考虑的问题...............................................................................................342
18.5.1 通用USB设备编程...............................................................................................342
18.5.2 系统复位和上电复位............................................................................................342
18.5.3 双缓冲端点..........................................................................................................346
18.5.4 同步传输.............................................................................................................347
18.5.5 挂起/恢复事件.....................................................................................................348
18.6 USB寄存器描述..........................................................................................................350
18.6.1 通用寄存器..........................................................................................................350
18.6.2 端点寄存器..........................................................................................................355
18.6.3 缓冲区描述表......................................................................................................358
STM32F10x参考手册 第一版 目录
18.7 USB寄存器映像..........................................................................................................361
19 模拟/数字转换(ADC)..........................................................................................................363
19.1 介绍............................................................................................................................363
19.2 主要特征.....................................................................................................................363
19.3 引脚描述.....................................................................................................................365
19.4 功能描述.....................................................................................................................365
19.4.1 ADC开关控制......................................................................................................365
19.4.2 ADC时钟.............................................................................................................365
19.4.3 通道选择.............................................................................................................365
19.4.4 单次转换模式......................................................................................................366
19.4.5 连续转换模式......................................................................................................366
19.4.6 时序图.................................................................................................................367
19.4.7 模拟看门狗..........................................................................................................368
19.4.8 扫描模式.............................................................................................................368
19.4.9 注入通道管理......................................................................................................369
19.4.10 间断模式......................................................................................................369
19.5 校准............................................................................................................................370
19.6 数据对齐.....................................................................................................................371
19.7 可编程的通道采样时间...............................................................................................371
19.8 外部触发转换.............................................................................................................371
19.9 DMA请求....................................................................................................................372
19.10 双ADC模式.................................................................................................................372
19.10.1 同时注入模式...............................................................................................374
19.10.2 同时规则模式...............................................................................................374
19.10.3 快速交替模式...............................................................................................375
19.10.4 慢速交替模式...............................................................................................375
19.10.5 交替触发模式...............................................................................................376
19.10.6 独立模式......................................................................................................377
19.10.7 混合的规则/注入同步模式............................................................................377
19.10.8 混合的同步规则+交替触发模式....................................................................377
19.10.9 混合同步注入+交替模式...............................................................................378
19.11 温度传感器.................................................................................................................378
19.12 中断............................................................................................................................379
19.13 ADC寄存器描述..........................................................................................................381
19.13.1 ADC状态寄存器(ADC_SR) ..........................................................................381
STM32F10x参考手册 第一版 目录
19.13.2 ADC控制寄存器1(ADC_CR1) ......................................................................382
19.13.3 ADC控制寄存器2(ADC_CR2) ......................................................................384
19.13.4 ADC采样时间寄存器1(ADC_SMPR1)..........................................................387
19.13.5 ADC采样时间寄存器2(ADC_SMPR2)..........................................................387
19.13.6 ADC注入通道数据偏移寄存器x (ADC_JOFRx)(x=1..4)................................388
19.13.7 ADC看门狗高阀值寄存器(ADC_HTR)..........................................................388
19.13.8 ADC看门狗低阀值寄存器(ADC_LRT) ..........................................................388
19.13.9 ADC规则序列寄存器1(ADC_SQR1) ............................................................390
19.13.10 ADC规则序列寄存器2(ADC_SQR2) ............................................................390
19.13.11 ADC规则序列寄存器3(ADC_SQR3) ............................................................391
19.13.12 ADC注入序列寄存器(ADC_JSQR)...............................................................391
19.13.13 ADC 注入数据寄存器x (ADC_JDRx) (x= 1..4) .............................................392
19.13.14 ADC规则数据寄存器(ADC_DR) ...................................................................392
19.14 ADC寄存器地址映像..................................................................................................394
20 调试支持(DBG)..................................................................................................................396
20.1 概况............................................................................................................................396
20.2 ARM参考文献.............................................................................................................397
20.3 SWJ调试端口(serial wire and JTAG)..........................................................................397
20.3.1 JTAG-DP和SW-DP切换的机制...........................................................................397
20.4 引脚分布和调试端口脚...............................................................................................398
20.4.1 SWJ调试端口脚..................................................................................................398
20.4.2 灵活的SWJ-DP脚分配.........................................................................................398
20.4.3 JTAG脚上的内部上拉和下拉...............................................................................399
20.4.4 利用串行接口并释放不用的调试脚作为普通I/O口................................................400
20.5 STM32F10x JTAG TAP 连接......................................................................................400
20.6 ID 代码和锁定机制.....................................................................................................401
20.6.1 MCU DEVICE ID编码..........................................................................................401
20.6.2 TMC TAP ............................................................................................................401
20.6.3 Cortex-M3 TAP ...................................................................................................401
20.6.4 Cortex-M3 JEDEC-106 ID代码............................................................................401
20.7 JTAG调试端口............................................................................................................402
20.8 SW调试端口...............................................................................................................403
20.8.1 SW协议介绍........................................................................................................403
20.8.2 SW协议序列........................................................................................................403
20.8.3 SW-DP状态机(Reset, idle states, ID code) .........................................................404
20.8.4 DP和AP读/写访问...............................................................................................404
STM32F10x参考手册 第一版 目录
20.8.5 SW-DP寄存器.....................................................................................................405
20.8.6 SW-AP寄存器.....................................................................................................405
20.9 对于JTAG-DP或SWDP都有效的AHB-AP (AHB 访问端口) .........................................405
20.10 内核调试.....................................................................................................................406
20.11 调试器主机在系统复位下的连接能力..........................................................................407
20.12 FPB (Flash patch breakpoint) ....................................................................................407
20.13 DWT(data watchpoint trigger)................................................................................407
20.14 ITM (instrumentation trace macrocell)........................................................................408
20.14.1 概述.............................................................................................................408
20.14.2 时间戳包,同步和溢出包.............................................................................408
20.15 MCU调试模块(MCUDBG) ..........................................................................................409
20.15.1 低功耗模式的调试支持.................................................................................409
20.15.2 支持定时器和看门狗和bxCAN的调试...........................................................409
20.15.3 调试MCU配置寄存器...................................................................................410
20.16 TPIU (trace port interface unit)...................................................................................411
20.16.1 导言.............................................................................................................411
20.16.2 跟踪引脚分配...............................................................................................412
20.16.3 TPUI格式器..................................................................................................414
20.16.4 TPUI帧异步包..............................................................................................414
20.16.5 同步帧包的发送............................................................................................415
20.16.6 同步模式......................................................................................................415
20.16.7 异步模式......................................................................................................415
20.16.8 TRACECLKIN在STM32F10x内部的连接.....................................................415
20.16.9 TPIU寄存器..................................................................................................416
20.16.10 配置的例子...................................................................................................416
20.17 DBG寄存器地址映象..................................................................................................417……
STM32F10x参考手册
本地下载

评论