2021-03-23 03:36 AM
I am trying to use DAC Channel 1 on STM32H7 with DMA to control the ramp-up of a PA. The DAC must always be driven (enabled). A ramp-up sequence is written at the start of a burst and a ramp-down at the end of the burst.
The FIFO error flag is set on the second write (ramp-down) and in this case the DMA does not write even though the channel is not disabled. If I write again after this (3rd time) then it works.
Given my setup described below, what can be causing this, and why is it only for the second write?
Initialisation is as follows:
When writing new DAC values:
When doing the write for the second time, a FIFO error interrupt is generated even before the timer is enabled.
I've read AN4031 but do not think it is relevant where it states that the peripheral must be enabled after enabling DMA since my peripheral must always be enabled to always drive the output.