2021-10-10 07:50 PM
The documentation for the DAC says "A DMA request can be generated when an external trigger (but not a software trigger) occurs if DMA requests are enabled"
But I want to configure the DAC to have no trigger, and instead use TIM12_TRGO to drive the DAC conversion pace, using it as a DMAMUX synchronization input.
Will this work? Or do I absolutely need to configure the DAC with an external trigger to use DMA?
2021-10-10 09:20 PM
it is not clear which STM32H7 you use.
it is possible to use Timer to trigger DAC conversion.
According to RM0468 Reference manual, STM32H723/733, STM32H725/735 and STM32H730 Value line. DAC conversion may be triggered by TIM1/2, TIM4~8, TIM15 and so on. DAC conversion may also be triggered by external pin: exti9.
2021-10-10 09:29 PM
It is the STM32H725, but DAC conversion can also be triggered by simply writing to the DAC_DHRx if the TENx bit is 0 (i.e., no trigger).
So my question is, in this case (TENx=0), can the pace of the DAC writes be driven by DMAMUX synchronization?
2021-10-10 10:43 PM
I suppose, the idea is, to use Timer (such as TIM12) to trigger DMA transfer automatically in a desired period, the DMA will perform transfer from memory (data buffer) to DAC data holding register (such as DAC_DHR12R1), and DAC output is updated in very short time with TEN1=0 (data written into the DAC_DHR1 register are transferred one dac_pclk clock cycle later to the DAC_DOR1 register).
I think this should work.