2020-08-04 08:21 PM
Hi, is there a way to slow down the DMA speed for DAC? I am using stm32F72x, and I am trying to generate a customize PWM wave from using DMA+DAC.
2020-08-04 08:29 PM
start by generating a pwm from a timer pin and connect it to the DAC trigger pin. once happy, use internal signals...
2020-08-04 08:52 PM
DMA2 is controlled by APB2 is there a way to change the time source ?
2020-08-04 09:27 PM
>DMA2 is controlled by APB2
No, it is not. Normally, DMA transfers from memory into DAC are triggered by DAC itself.
In turn, you should trigger DAC (transfer from DAC holding to output register) from a timer, as . said above. Read the DAC (and DMA and TIM) chapter in Reference Manual (RM).
JW
2020-08-04 11:00 PM
I mean If I only want to trigger once and let the DMA run in a circular mode the DMA speed of each element is controlled by APB right ?
2020-08-05 03:16 AM
You need a constant sample rate. I would use memory to peripheral dma triggered by a timer. the dmas have independent source and destination addresses so that a dma triggered by a timer can do a memory to dac output register transfer.
2020-08-05 04:16 AM
> I would use memory to peripheral dma triggered by a timer
There's no point to do that. The timer triggered DAC is there for a reason. DMAing into non-triggered DAC (DAC_CR.TENx=0) results in DAC output being subject to DMA jitter, unnecessarily.
JW
2020-08-05 04:21 AM
> I mean If I only want to trigger once and let the DMA run in a circular mode the DMA speed of each element is controlled by APB right ?
Trigger what?
If you'd use non-triggered DAC (DAC_CR.TENx=0) and use the DAC-requested DMA stream/channel, then the APBx clock would have some impact on the transfer speed, but there are more influences involved - transfers of other streams of the same DMA, transfers and their latencies on the memory side of the DMA, conflicts between DMA and processor within the given APB. You'd have a high and irregular transfer rate. OTOH, DAC's analog side wouldn't be able to cope with that speed anyway.
Why don't you want to do things as they are supposed to be done? I've outlined the procedure above.
JW