2024-03-11 02:58 AM
HI everybody,
i am using STM32G0B1 and in an older project i used successful ADC multichannel DMA
conversion of 8 channel. I started a multichannel ADC conversion of 8 channel and a ADC callback
sets the finished bit and later on i read the result for 8 channel from DMA buffer and start a new 8-chan conversion again. It works well.
For a new project i want to keep this method for 10 channel but unfortunately i can only convert 8 channel
one after another, the Number Of Conversion in ADC Paramter Setting in MXCube is maximum 8,
I guess, due to the ADC channel selection register, reserved only for max. 8 channel.
Now my question, how can i setup a DMA multichannel ADC conversion for 10 channel
without reprogramming Channel and Rank before each conversion ?
Possibly by an injected conversion of the 2 upper channel - if yes, pls with a hint for setting it right in CubeMX
and possible HAL code.
Thanks in advance,
Kai
Solved! Go to Solution.
2024-03-11 06:17 AM
> Now my question, how can i setup a DMA multichannel ADC conversion for 10 channel without reprogramming Channel and Rank before each conversion ?
Set the sequencer to Not fully configurable. In that mode, all channels will be converted in order (forward) or in reverse order (backward) depending on how scan conversion mode is set.
2024-03-11 06:17 AM
> Now my question, how can i setup a DMA multichannel ADC conversion for 10 channel without reprogramming Channel and Rank before each conversion ?
Set the sequencer to Not fully configurable. In that mode, all channels will be converted in order (forward) or in reverse order (backward) depending on how scan conversion mode is set.
2024-03-13 08:41 AM
Hi TDK,
thanks for your answer, it works.
I have chosen 10 channel with the above Sequencer setting
and all 10 (marked) channel are measured one after another.
That means the VBAT channel data will be stored in the dma array buffer with index 9.
2024-03-24 11:45 AM
I was looking to understand ADC behavior and found your answer. Is there any resource link explaining ADC settings in CubeIDE?