I'm using an STM32F446.
I use the circular DMA feature with a DAC output to generate a sinus waveform.
My sinus buffer has 32 values.
What I would like to do is :
- run the DMA for a "large" amount of time
- be able to stop the DMA when I want, but only at end of buffer (so that the latest data sent to the DAC output is known and fixed).
I tried to change the "circular mode" to "normal mode" while the DMA is running (supposing the DMA would continue until end of buffer), but it doesn't work.
I know one of the way is to run in "normal mode" and use the "HALF-DMA" interrupt, but I would like to avoid this because it increases CPU load due to the interrupt.
Any idea ?
Thanks for help.