文件名称:stm32f746_ADC
- 所属分类:
- 微处理器(ARM/PowerPC等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2015-10-28
- 文件大小:
- 52kb
- 下载次数:
- 0次
- 提 供 者:
- l**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
本例介绍如何使用ADC3和DMA,从ADC3到存储器不断传输转换后的数据。
该ADC3配置为连续转换ADC_CHANNEL_8。
每次转换结束时的DMA传输,在循环模式下,
从ADC3 DR转换后的数据注册到uhADCxConvertedValue变量。
该uhADCxConvertedValue读值编码为12位,VREF +基准电压连接
在董事会到VDD(+ 3.3V)时,Vref-之间的参考电压连接在电路板到地面。
要转换的电压读取值,这里是方程适用于:
电压= uhADCxConvertedValue *(VREF + - VREF-)/(2 ^ 12)= uhADCxConvertedValue * 3.3 / 4096
在这个例子中,系统时钟是216MHz,APB2 = 108MHz的和ADC时钟= APB2 / 4。
因为ADC3时钟是27MHz和采样时间被设定为3个周期,在转换
时间12bit的数据是12个周期所以总的转换时间为(12 + 3)/ 27 = 0.56us(1.57Msps)。
用户可以通过应用引脚PF10连接到Arduino的CN5针A1的输入电压改变ADC_CHANNEL_8电压。
STM32评估板的LED可用于监控传输状态:
- LED1为ON时,转换完成。
- 当初始化错误发生LED1闪烁。-This example describes how to use the ADC3 and DMA to transfer continuously
converted data ADC3 to memory.
The ADC3 is configured to convert continuously ADC_CHANNEL_8.
Each time an end of conversion occurs the DMA transfers, in circular mode, the
converted data ADC3 DR register to the uhADCxConvertedValue variable.
The uhADCxConvertedValue read value is coded on 12 bits, the Vref+ reference voltage is connected
on the board to VDD (+3.3V), the Vref- reference voltage is connected on the board to the ground.
To convert the read value in volts, here is the equation to apply :
Voltage = uhADCxConvertedValue* (Vref+- Vref-)/(2^12) = uhADCxConvertedValue* 3.3/4096
In this example, the system clock is 216MHz, APB2 = 108MHz and ADC clock = APB2/4.
Since ADC3 clock is 27 MHz and sampling time is set to 3 cycles, the conversion
time to 12bit data is 12 cycles so the total conversion time is (12+3)/27 = 0.56us(1.57Msps).
User can vary the ADC_CHANNEL_8 voltage by app
该ADC3配置为连续转换ADC_CHANNEL_8。
每次转换结束时的DMA传输,在循环模式下,
从ADC3 DR转换后的数据注册到uhADCxConvertedValue变量。
该uhADCxConvertedValue读值编码为12位,VREF +基准电压连接
在董事会到VDD(+ 3.3V)时,Vref-之间的参考电压连接在电路板到地面。
要转换的电压读取值,这里是方程适用于:
电压= uhADCxConvertedValue *(VREF + - VREF-)/(2 ^ 12)= uhADCxConvertedValue * 3.3 / 4096
在这个例子中,系统时钟是216MHz,APB2 = 108MHz的和ADC时钟= APB2 / 4。
因为ADC3时钟是27MHz和采样时间被设定为3个周期,在转换
时间12bit的数据是12个周期所以总的转换时间为(12 + 3)/ 27 = 0.56us(1.57Msps)。
用户可以通过应用引脚PF10连接到Arduino的CN5针A1的输入电压改变ADC_CHANNEL_8电压。
STM32评估板的LED可用于监控传输状态:
- LED1为ON时,转换完成。
- 当初始化错误发生LED1闪烁。-This example describes how to use the ADC3 and DMA to transfer continuously
converted data ADC3 to memory.
The ADC3 is configured to convert continuously ADC_CHANNEL_8.
Each time an end of conversion occurs the DMA transfers, in circular mode, the
converted data ADC3 DR register to the uhADCxConvertedValue variable.
The uhADCxConvertedValue read value is coded on 12 bits, the Vref+ reference voltage is connected
on the board to VDD (+3.3V), the Vref- reference voltage is connected on the board to the ground.
To convert the read value in volts, here is the equation to apply :
Voltage = uhADCxConvertedValue* (Vref+- Vref-)/(2^12) = uhADCxConvertedValue* 3.3/4096
In this example, the system clock is 216MHz, APB2 = 108MHz and ADC clock = APB2/4.
Since ADC3 clock is 27 MHz and sampling time is set to 3 cycles, the conversion
time to 12bit data is 12 cycles so the total conversion time is (12+3)/27 = 0.56us(1.57Msps).
User can vary the ADC_CHANNEL_8 voltage by app
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ADC\ADC_RegularConversion_DMA\EWARM\Project.ewd
...\.........................\.....\Project.ewp
...\.........................\.....\Project.eww
...\.........................\.....\startup_stm32f746xx.s
...\.........................\.....\stm32f746xx_flash.icf
...\.........................\Inc\main.h
...\.........................\...\stm32f7xx_hal_conf.h
...\.........................\...\stm32f7xx_it.h
...\.........................\MDK-ARM\Project.uvoptx
...\.........................\.......\Project.uvprojx
...\.........................\.......\startup_stm32f746xx.s
...\.........................\readme.txt
...\.........................\Src\main.c
...\.........................\...\stm32f7xx_hal_msp.c
...\.........................\...\stm32f7xx_it.c
...\.........................\...\system_stm32f7xx.c
...\.........................\.W4STM32\startup_stm32f746xx.s
...\.........................\........\STM32746G_DISCOVERY\.cproject
...\.........................\........\...................\.project
...\.........................\........\...................\STM32F746NGHx_FLASH.ld
...\.........................\........\STM32746G_DISCOVERY
...\.........................\EWARM
...\.........................\Inc
...\.........................\MDK-ARM
...\.........................\Src
...\.........................\SW4STM32
...\ADC_RegularConversion_DMA
ADC