DAC with DMA
Hi,
I'm using DAC with DMA to implement a shape generator on STM32F746.
So i'm creating a buffer filled with the datas of the shape concerned that i transmit to the DMA with HAL_DAC_Start_DMA() function.
While most of the time everything is ok and the shape is generated well, there is sometimes an issue with the DMA : the CNDTR register stay stuck to the last value of the data array (involving a constant output instead of a PWM).
I didn't see any error code in the DMA structure that could cause the trouble. The only difference between a working signal and a problematic one is the CNDTR who stay stuck.
However, there's a error in the DAC structure :
hdac->State = HAL_DAC_STATE_ERROR
hdac->ErrorCode = 1 (DMA underrun on channel 1)
Does anyone could help me ?
Thank you.