AnsweredAssumed Answered

STM32 DAC with DMA constant value

Question asked by Ben Sch on Apr 12, 2018
Latest reply on Apr 17, 2018 by Ben Sch

Hi to all,

 

I am encountering a problem, concerning the DAC of the stm32L476. I only want to use the DAC with a constant value but with DMA, so that I can use the CPU during that operation. Without DMA the DAC works as desired.

Now my question is: How can I start the DAC with DMA without a Timer? The function we used is:

 

 HAL_DAC_Start_DMA(&hdac1,DAC_CHANNEL_1,(uint32_t*)dacVal,1,DAC_ALIGN_12B_R);

 

and since we want to use a software trigger, we added

 

  DAC1->SWTRIGR=DAC_SWTRIGR_SWTRIG1;

afterwards, to start the DAC-conversion. Nevertheless, we cannot measure any voltage. In CubeMX we configured the DAC with a Software trigger and the DMA as Normal and Half Word.

 

Can anyone help us out?

We just don't know what else we can do.

 

Thank you a lot in advance,

Bene

Outcomes