2026-04-01 7:54 AM
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,
Solved! Go to Solution.
2026-04-01 8:14 AM - edited 2026-04-01 8:16 AM
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.
2026-04-01 8:14 AM - edited 2026-04-01 8:16 AM
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.