Skip to main content
Associate II
October 1, 2024
Question

ADC multiple Channel issue

I have issue for ADC multiple channel not working. I am using nucleo-H503RB board. I am select ADC1 of IN0,IN1,IN3,IN5,IN14,IN19. But its read value only IN0.

This topic has been closed for replies.

13 replies

Associate II
October 1, 2024

Can you check, I have attached main.c and ioc file

TDK
October 1, 2024

> hadc1.Init.NbrOfConversion = 6;

Se up the ADC to convert only a single channel, not all 6.

Before conversion, set the channel in rank 1 to what you want it to be. Only change the channel number here.

 sConfig.Channel = ADC_CHANNEL_0; // <-- only change this each iteration
 sConfig.Rank = ADC_REGULAR_RANK_1;
 sConfig.SamplingTime = ADC_SAMPLETIME_2CYCLES_5;
 sConfig.SingleDiff = ADC_SINGLE_ENDED;
 sConfig.OffsetNumber = ADC_OFFSET_NONE;
 sConfig.Offset = 0;

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate II
October 1, 2024

Above changes i was already doing but its not work.

 

TDK
October 1, 2024

Include your modified main.c file.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate II
October 3, 2024

What i include in my main.c file. I can't understand what you are saying.

Associate II
October 10, 2024

Not Accepted solution. My issue has not resolved. 

 

Karl Yamashita
Principal
October 10, 2024

If you're unable to figure it out, there is always Plan B

 

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source