文件名称:STM32F746-ADC
- 所属分类:
- 微处理器(ARM/PowerPC等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2015-10-30
- 文件大小:
- 52kb
- 下载次数:
- 1次
- 提 供 者:
- M***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
这个是STM32F746源碼演示了如何使用ADC3及DMA传输连续
转换后的数据从ADC3记忆。
ADC3的配置不断转换的adc_channel_8。
每次转换结束时,DMA传输,循环模式,这
转换数据寄存器变量的uhadcxconvertedvalue ADC3博士。
的uhadcxconvertedvalue读取的值是12位编码,参考电压VREF +连接
在VDD的板(+3.3V),VREF参考电压连接板上到地面。
要转换为伏特的读取值,这里是应用的方程:
电压= uhadcxconvertedvalue *(Vref+ - VREF)/(2 ^ 12)= uhadcxconvertedvalue * 3.3 / 4096
在这个例子中,系统时钟是216mhz,APB2 = 108MHz和ADC时钟= APB2 / 4。
自从ADC3时钟为27 MHz采样时间设定为3个周期,转换
时间12位数据是12个周期,总转换时间(12 + 3)/ 27 = 0.56us(1.57msps)。
用户可以改变adc_channel_8电压施加在引脚连接到Arduino pf10 5引脚A1输入电压。
STM32评估板的发光二极管可以用来监控传输状态:
- LED1在转换完成时。
- LED1闪烁在初始化时发生错误。-This is STM32F746 code 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记忆。
ADC3的配置不断转换的adc_channel_8。
每次转换结束时,DMA传输,循环模式,这
转换数据寄存器变量的uhadcxconvertedvalue ADC3博士。
的uhadcxconvertedvalue读取的值是12位编码,参考电压VREF +连接
在VDD的板(+3.3V),VREF参考电压连接板上到地面。
要转换为伏特的读取值,这里是应用的方程:
电压= uhadcxconvertedvalue *(Vref+ - VREF)/(2 ^ 12)= uhadcxconvertedvalue * 3.3 / 4096
在这个例子中,系统时钟是216mhz,APB2 = 108MHz和ADC时钟= APB2 / 4。
自从ADC3时钟为27 MHz采样时间设定为3个周期,转换
时间12位数据是12个周期,总转换时间(12 + 3)/ 27 = 0.56us(1.57msps)。
用户可以改变adc_channel_8电压施加在引脚连接到Arduino pf10 5引脚A1输入电压。
STM32评估板的发光二极管可以用来监控传输状态:
- LED1在转换完成时。
- LED1闪烁在初始化时发生错误。-This is STM32F746 code 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