Skip to main content
Explorer
July 18, 2024
Question

STM32f446re

  • July 18, 2024
  • 2 replies
  • 649 views

HAL_ADC_Start(&hadc1);

HAL_ADC_PollForConversion(&hadc1,1000);

readValue1 = HAL_ADC_GetValue(&hadc1);

HAL_ADC_Stop(&hadc1);

HAL_Delay(100);

 

HAL_ADC_Start(&hadc2);

HAL_ADC_PollForConversion(&hadc2,1000);

readValue2 = HAL_ADC_GetValue(&hadc2);

HAL_ADC_Stop(&hadc2);

HAL_Delay(100);

 

HAL_ADC_Start(&hadc3);

HAL_ADC_PollForConversion(&hadc3,1000);

readValue3 = HAL_ADC_GetValue(&hadc3);

HAL_ADC_Stop(&hadc3);

HAL_Delay(100);




after executing this adc code the read values of readValue1, readValue2 and readValue3

are mutually reading the same value. i.e when i try to change the adc value of readValue3 with pot the other values are also changing

 

 

 

need help here...

 

 

 

thank you.

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    July 18, 2024

    Hello,

    I invite you to read the tips on how to post a thread in this community as you are not following our recommendations in posting especially the title and the the code sharing.

    https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228

    So could you please edit your post according to these recommendations?

    Super User
    July 18, 2024

    Show your ADC setup. Nothing wrong in the code you posted. Are the ADCs perhaps all looking at the same channel?