Skip to main content
AlexanderKibarov
Associate III
September 14, 2024
Question

Why Does ADC Reading Work Only One Time?

  • September 14, 2024
  • 1 reply
  • 1227 views

Hello,

I am using the STM32F413ZH model. In fact, there is no problem in the code I wrote below, everything works correctly, but if I call the HAL_ADC_START function outside the while and do not use the HAL_ADC_STOP command, this time it only makes one reading, what is the reason for this? In this case, he has to read continuously, doesn't he?

Thank You.Ekran görüntüsü 2024-09-14 204642.pngEkran görüntüsü 2024-09-14 204719.pngEkran görüntüsü 2024-09-14 204746.png

This topic has been closed for replies.

1 reply

ST Employee
January 31, 2025

Hello @AlexanderKibarov,

You can find in the reference manual of the STM32F413ZH microcontroller [Link: here]:  information about ADC conversion modes (Single Conversion and Continuous Conversion).

Additionally, the two examples available in STM32CubeF4, namely ADC_RegularConversion_DMA and ADC_RegularConversion_Interrupt, can guide you for the correct implementation.

I hope my answer has helped you. When your question is answered, please select this topic as solution that answered you, it will help others find that answer faster.

Thanks for your contribution.

Dor_RH

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Dor_RH