Several issues to note when using STM32 ADC

Publisher:SparklingStarLatest update time:2016-09-02 Source: eefocusKeywords:STM32  ADC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
All STM32 chips have a successive approximation ADC module, which is widely and frequently used. However, some problems are often encountered during the application process. I will try to summarize them and share them with you as some reminders.


1. Vdda is not powered or is not powered normally. There are many STM32 series, and this parameter cannot be generalized. For details, please refer to the data manual of each chip.

Several issues to note when using STM32 ADCSeveral issues to note when using STM32 ADC

2. The sampling resistor value is not appropriate and does not match the sampling time. It is often manifested as too large input resistance and short configured sampling time. In actual design, you can refer to the relevant circuits of the official STM32 series evaluation boards. In addition, you can refer to the official ST application note AN2834. For other application notes on ADC applications, you can go to WWW.STMCU.COM.CN and search for ADC.

Several issues to note when using STM32 ADC

3. It takes a while for the ADC to be stable after it is powered on, that is, Tstab. This parameter is introduced in the data sheet. Pay special attention to this time when using register operations. In addition, it should be noted that powering on the ADC peripheral, enabling the ADC function, starting the ADC conversion, and actual AD conversion are different actions and different time points.

Several issues to note when using STM32 ADC

4. The input signal amplitude exceeds the ADC reference voltage range, resulting in data errors in the conversion result.
5. The fluctuation of the chip power supply, especially the fluctuation of VREF and external interference will cause abnormal ADC conversion values.
6. When using injection trigger conversion, the time interval of the trigger event must be greater than the conversion time required for the injection conversion sequence. For example, if there are two injection channels with a conversion time of 28 ADCLK, then the interval of the trigger event must be greater than 28 ADCLK, such as 29, 30 ADCLK, etc.
7. Most STM32 ADC modules need to be calibrated before use. Calibration must be completed before starting AD conversion. In principle, it is enough to calibrate the ADC peripheral once after powering on, but when the reference voltage fluctuates greatly and the temperature changes drastically, it needs to be calibrated again.
8. It is recommended to enable the DMA function of the ADC after ADC calibration. In other words, do not enable the DMA function of the ADC before calibrating the ADC. Especially when it comes to multi-channel ADC DMA transmission, pay attention to this order.
9. If ADC DMA transmission is used, DMA must be configured and enabled when starting AD conversion.
10. When using the internal SENSOR ADC channels, please note that it takes time for these channels to be turned on and stabilized, just like turning on the ADC module; for the AD sampling time of these specific sensor channels, the manual often has relevant parameters clearly stated, please refer to it. For example, the sampling time of the internal temperature sensor channel is recommended to be 17us.
11. The modification of the ADC channel sequence should be performed in the ADC stop state.
12. In multi-channel ADC DMA transmission, abnormal conditions often occur due to inconsistency between buffer data type and source data type. This is mainly caused by inconsistent data width.
13. When an external signal is selected as the trigger signal for injection conversion, only its rising edge is valid.

The above are just reminders to start a new round of research. Pay more attention when designing applications, especially the 7th, 8th, 9th, and 12th four reminders. The ADC peripherals of STM32 are not exactly the same between different series, especially when it involves multiple ADC modules to cooperate with sampling conversion, it is still quite complicated. At any time, don't forget to check the STM32 English reference manual and data sheet.

Keywords:STM32  ADC Reference address:Several issues to note when using STM32 ADC

Previous article:Design of home service robot system based on STM32
Next article:Talk about DFU programming of STM32 chips and related topics

Recommended ReadingLatest update time:2024-11-16 22:26

STM32 Advanced Timer 1 Configuration Notes
void TIM1_Int_Init(u16 arr,u16 psc) { TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; NVIC_InitTypeDef NVIC_InitStructure; RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1, ENABLE); //①Clock TIM1 enable //Timer TIM1 initialization TIM_TimeBaseStructure.TIM_Period = arr; //Set the value of the automatic reload register period
[Microcontroller]
Send interrupt flag in STM32
Explanation of this flag bit in the data sheet: Bit 7 TXE : Transmit data register empty This bit is set by hardware when the content of the TDR register has been transferred into  the shift register. An interrupt is generated if the TXEIE bit =1 in the USART_CR1 register. It  is cleared by a write to the USART_DR reg
[Microcontroller]
STM32 study notes---EXTI external key interrupt experiment based on UCOSII
After doing the IWDG independent watchdog experiment based on UCOSII, we continued with the 25th experiment - the EXTI external key interrupt experiment based on UCOSII. This experiment adds EXTI to the IWDG experiment based on UCOSII. Three keys are pressed separately to output key information in the serial port! IWD
[Microcontroller]
STM32 study notes---EXTI external key interrupt experiment based on UCOSII
STM32 DMA detailed description
The DMA part I used is relatively simple. Of course, maybe this is a new thing, and I can't use its complex functions for the time being. The following is a question and answer format to express my thoughts. What is DMA used for? Direct memory access is used to provide high-speed data transfer between peripherals and
[Microcontroller]
STM32 DMA detailed description
STM32 APB1 and APB2 hook-up ports
SYSCLK system clock, maximum 72MHzHCLK: AHB bus clock, obtained by dividing the system clock SYSCLK, usually without frequency division, equal to the system clock through the bus bridge AHB-- APB. By setting the frequency division, PCLK1 and PCLK2 clocks can be obtained from HCLK, but the maximum PCLK2 clock can reach
[Microcontroller]
STM32 Problem Record: This time Keil compiler is to blame
I recently wrote an STM32 serial port program that uses a circular buffer to send data: use the head pointer (front) to point to the next data to be sent, and use the tail pointer (rear) to point to the location where the new data is stored. The interrupt will determine whether front and rear are equal. If they are eq
[Microcontroller]
STM32 ADC_3 (internal channel)
Internal channels of ADC:    In addition to using external channels to collect external analog voltage signals, the ADC of STM32 also has two internal channels 16 and 17. Channel 16 is connected to the temperature sensor on the chip, and channel 17 is connected to the internal power module. (So these two channels can
[Microcontroller]
Using time-interleaved ultra-high-speed analog-to-digital converters at the PCB level
Using time-interleaved analog-to-digital converters (ADCs) to acquire synchronously sampled analog signals at a rate of billions of times per second is a great technical challenge for design engineers and requires very sophisticated mixed-signal circuits. The fundamental goal of time-interleaving is to double the sa
[Analog Electronics]
Using time-interleaved ultra-high-speed analog-to-digital converters at the PCB level
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号