Skip to main content
Graduate
November 29, 2023
Question

STM32F412RGT6 adc problem

  • November 29, 2023
  • 1 reply
  • 1359 views

Hello all,

i am facing a problem while wokring with adc on stm32f412rgt6. i am facing problem of adc accuracy i am using 5 analog channel (ADC1_AN1, ADC1_AN10, ADC1_AN11, ADC_AN12, ADC_AN13) in discontinous mode.

when i am connecting analog input pin to ground, digital outout varies from 10-25 and linearity with input voltage change is also not good.

while trying multiple this and that to solve this problem i found when i use sysTick as timebase source then average digital output varies from 1-4 and when any other timer as in my case it is TIM4 then average digital output varies from 10-25.

here i am taking average of 200 adc samples per second.

i have to use systick for FREERTOS tick so i have to any other timer as timebase source.

i have to C files for your reference.

Thank you.

 

 

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    December 21, 2023

    Hello @sanju ,

    I think  AN4073 How to improve ADC accuracy when using STM32F2xx and STM32F4xx microcontrollers application note can help to improve ADC accuracy.
    Also, this application explains the firmware methodology, which can be applied to reduce the ADC error and gives some general tips on writing firmware for better ADC accuracy.

    I hope this help you.

    Thank you.

    Kaouthar