Skip to main content
Visitor II
September 20, 2024
Solved

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

  • September 20, 2024
  • 1 reply
  • 645 views

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.
    Best answer by Imen.D

    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.

    1 reply

    Imen.DAnswer
    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.