Skip to main content
Visitor II
August 18, 2024
Question

Problems with ADC data

  • August 18, 2024
  • 1 reply
  • 1242 views

Hello,

We are uing STM32F303RBT6 controller to read the current parameters of stepper motors.

So, 7ADC1 ADC channels are used, which are read through DMA1 Channel1 . InitADC() driver initialization is succesfull, StartADC() conversion is called once every 1ms, but the raw data in the adc_hw_data[] buffer is incorrect.

MC power supply voltage VDD and pin VDDA = 3.270V, voltages at the inputs aof ADC channels PA2 = 3.054V, PA3 = 2.845V.

Цhen we use an F4 series controller with similar parameters everything works as it should.

So, what cn be te problem?

Thank you in advance.

 

    This topic has been closed for replies.

    1 reply

    Super User
    August 18, 2024

    Hi,

    Did you calibrate the ADC?

    ( Calling hal_adcex_calibration_start... )

    Anna_ChenAuthor
    Visitor II
    August 20, 2024

    Hi,

    We don't use the HAL library, we use LL instead, and through its calls the calibration is called and seems to complete properly, judging by the flag.

    Super User
    August 20, 2024

    I cannot tell about the LL , I only use HAL lib.

    Because it's working and If i need something fast, anyway the DMA is to be used and this can be started by HAL also.

    So would recommend to use the hal functions, to get it running, then still can try to do it faster - if needed.