2021-02-17 12:54 PM
Hello,
I would like to use ADC with a group of several channels (ScanMode = Enabled) along with the DMA. However, I would like to avoid to use the DMA in circular buffer mode. I have seen so far that most of the examples and external literatures are based on a DMA in circular mode and the ADC running in continous mode. Moreover, I also would like to avoid using the external triggering via HW pins or internal timers because I would like to use a software-based approach to start the ADC conversions without any interrupt context (dma irq callback) or pure-ADC-Flag polling. The idea would be to: Start the ADC conversions via a SW trigger and let the ADC and DMA do its job. Next time, big time slice in-between, collect the data from the DMA buffer,process it and start the next ADC conversion. According to the documentation, the DMA one-shot mode can/should be used. But here, there are no examples to give an indication how to integrate it. So far I have only found pure polling, IT-based, Injection, CircularDMA and interleaving method examples, but there is nothing about the scenario I have described above.
As a result of this, I would to know if there are some simple examples, code snippets or even some detailed feedback which can be used to accelerate this setup. I used CubeIDE to setup few ADC channels and the DMA in its specific mode. But so far, I am a little bit lost due to missing documentation - (which HAL or LL lib function call in order to restart ADC conversion which will indirectly trigger the DMA) - and I don't see any activities inside the DMA buffer when I execute the "auto-generated" code on the board.