cancel
Showing results for 
Search instead for 
Did you mean: 

reading of 16 ADC channels on STM32f446

fab04
Senior

Hi everybody,

I read 15 analog channels with DMA on my STM32f446. It works very well (It's tiggrered by TIM3 every 200ms).

So I'd like to add Vbat. First, I've added it as the 16th channel of DMA, it works, but I saw the battery voltage decreases (around 0.05V in two hours), so I think I read it too often.

So I'd like to read it periodically (every minute for example).

I'm trying to read my 15 first channels with DMA and then a classic read for Vbat, but the value is always wrong (around 560 instead of 1000).

Is it possible to do that (two different means to read ADC) ?

Thank you,

1 ACCEPTED SOLUTION

Accepted Solutions
mƎALLEm
ST Employee

Hello,

Use the injected mode for the Vbat reading and use a timer which triggers the reading with one minute period.

Keep the remaining 15 channels reading in regular scan mode with DMA.

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.

View solution in original post

1 REPLY 1
mƎALLEm
ST Employee

Hello,

Use the injected mode for the Vbat reading and use a timer which triggers the reading with one minute period.

Keep the remaining 15 channels reading in regular scan mode with DMA.

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.