当前位置:网站首页>STM32 tutorial triple ADC interleaved sampling
STM32 tutorial triple ADC interleaved sampling
2022-07-05 08:04:00 【Shallow Xu】
ps: This article is based on stm32F407ZGT6 Single chip microcomputer
stm32F4 The maximum sampling rate of single channel acquisition of single chip microcomputer is 2.4M, Therefore, it is sometimes difficult to meet higher frequency sampling , So consult the chip manual , Find out stm32F4 Support multiple ADC collection , Use the conversion time of each channel , Dislocation sampling , So as to improve the sampling rate , Turn the sampling rate to 2.4*3=7.2M. ( I started learning last year ADC When studying , be based on cube and HAL Triple of Library ADC There are few cross sampling references , I also studied for a period of time , Write this blog, hoping to help more people .)
The schematic diagram is as follows :
The following is an illustration of the official example ,
In this example, the system clock is 144MHz, APB2 = 72MHz and ADC clock = APB2 /2.
Since ADCCLK= 36MHz and Conversion rate = 5 cycles
==> Conversion Time = 36M/5cyc = 7.2Msps
This is triggered by software ADC Continuously sampled , I tried , It is feasible. . The few references on the Internet are also under the continuous conversion mode mentioned above .
But I am used to using timer to trigger sampling , Because the sampling rate is continuously adjustable , More flexible than continuous conversion .
So I started trying to trigger triple timer ADC!
The configuration is as follows : open TIM8, Hang on APB2 On , by 144M
How much is the clock frequency configured ?
Open the chip manual :
Thus we can see that The trigger source only needs to trigger ADC1 ADC2 and 3 The acquisition is automatically started after the inherent time of the triple mode set by the chip
so ADC1 Just configure 2.4M 144M/60=2.4M
ADC How to configure ?
Look at the chip manual !
DMA mode2 !
ADC1 The configuration is as follows :
( Choose the channel 12 Because it is pure Less interference )
Remember to open it. DMA !
Configuration is similar to single channel ADC+ Timer triggered !
ADC2/3 ditto I won't repeat it here !
complete !
The generated code !
How to write in the code ?
Open the chip manual again !!
So that's it ! I feel like I can !
Turn on ADC123 and TIM8:( Pay attention to triple ADC In alternate mode ,ADC1 There is an inherent opening function )
compile ! burn !
Tested last year , The epidemic situation will not be tested at home QAQ
Last year, the signal generator was used to give 100khz Sine wave signal , A cycle was picked 72 A p.m. .
ps: According to the seniors, this way is unstable , When the workload of single chip microcomputer is large, it may appear bug.
边栏推荐
- UEFI development learning 3 - create UEFI program
- After installing the new version of keil5 or upgrading the JLINK firmware, you will always be prompted about the firmware update
- Process communication mode between different hosts -- socket
- Altium designer learning (I)
- Some thoughts on extracting perspectives from ealfa and Ebeta
- Record the torch encountered by win10 cuda. is_ False problem in available()
- Class of color image processing based on Halcon learning_ ndim_ norm. hdev
- Halcon's practice based on shape template matching [2]
- UEFI development learning 4 - getting to know variable services
- Halcon's practice based on shape template matching [1]
猜你喜欢
[tutorial 15 of trio basic from introduction to proficiency] trio free serial communication
Programming knowledge -- assembly knowledge
Halcon's practice based on shape template matching [1]
如何进行导电滑环选型
Summary -st2.0 Hall angle estimation
1-stm32 operation environment construction
Correlation based template matching based on Halcon learning [II] find_ ncc_ model_ defocused_ precision. hdev
Makefile application
Reasons for rapid wear of conductive slip rings
Altium designer 19.1.18 - clear information generated by measuring distance
随机推荐
Altium designer learning (I)
Shell脚本基本语法
研究發現,跨境電商客服系統都有這五點功能!
Software designer: 03 database system
WiFi wpa_ Detailed description of supplicant hostpad interface
Beijing Winter Olympics opening ceremony display equipment record 3
Development tools -- gcc compiler usage
Introduction of air gap, etc
Altium designer 19.1.18 - hide the fly line of a network
Hardware 3 -- function of voltage follower
PMSM dead time compensation
MySQL blind note common functions
[trio basic tutorial 17 from getting started to mastering] set up and connect the trio motion controller and input the activation code
Gradle composite construction
LED display equipment records of the opening ceremony of the Beijing Winter Olympics
[professional literacy] specific direction of analog integrated circuits
Fundamentals of C language
The research found that the cross-border e-commerce customer service system has these five functions!
Cadence simulation encountered "input.scs": can not open input file change path problem
The global and Chinese market of lithographic labels 2022-2028: Research Report on technology, participants, trends, market size and share