cancel
Showing results for 
Search instead for 
Did you mean: 

Problems using DMA on DAC channel 2

infor
Associate III
Posted on May 07, 2015 at 11:17

I am experimenting STM32F429 on a discovery board.

After creating set board settings with STM32CubeMX, I created a few lines to generate a wave on DAC channel 2 using DMA.

Everything seems correct in the registers, but I see no changing values. On the other hand, if I push directly the values calling HAL_DMA_SetValue() everything works fine.

Any hints?

2 REPLIES 2
infor
Associate III
Posted on May 07, 2015 at 13:00

Perhaps the problem was a misinterpretation of the datasheet.

In facts, it seems that the DMA needs an external trigger, for example from a timer, to feed new values to the DAC. This peripheral itself cannot control the DMA transfer, so setting PFCTRL bit has no effect.

Posted on May 07, 2015 at 13:31

> This peripheral itself cannot control the DMA transfer, so setting PFCTRL bit has no effect.

''control'' is a misleading term here (as in naming of PFCTRL as well). I'd prefer to clearly distinguish in terminology the ''DMA request'' signal (which DAC is capable to, but only after being triggered as you said above) from ''DMA external stop'' or something similar, which is what PFCTRL is gating at the DMA side.

We all know that the documentation suc^H^H^Hleaves a lot to be desired. That Cube/CubeMX/SPL introduces further terminology pearls is just an added malus, and a well-deserved punishment for those who use them... 😉

JW