cancel
Showing results for 
Search instead for 
Did you mean: 

STM32f446re

Murali3252
Associate

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.

2 REPLIES 2
SofLit
ST Employee

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?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
TDK
Guru

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

If you feel a post has answered your question, please click "Accept as Solution".