Skip to main content
pxia.1
Associate II
September 20, 2024
Solved

Possibility not to align the choice of one-shot vs. circular mode in ADC and DMA?

STM32G474
In RM0440 Rev 8, page 641, I learned the "DMACFG bit" in ADC configuration register (ADC_CFGR) set the ADC in either one-shot mode or circular mode. But there is a separate mode setting in DMA which is also one shot vs circular mode. If we use DMA to ransfer ADC result to memory, I am wondering whether this is a legitimate use case that we set the ADC and DMA in different mode?

This topic has been closed for replies.
Imen.DBest answer
ST Technical Moderator
September 20, 2024

Hello @pxia.1 ,

We can put them in different modes: ADC one-shot and DMA circular. In this case it will be one-shot.

So, if you need circular, you need both to be circular. Otherwise, it will be one-shot.

If only one is circular, it will not be circular.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks

1 reply

Imen.DBest answer
ST Technical Moderator
September 20, 2024

Hello @pxia.1 ,

We can put them in different modes: ADC one-shot and DMA circular. In this case it will be one-shot.

So, if you need circular, you need both to be circular. Otherwise, it will be one-shot.

If only one is circular, it will not be circular.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks