cancel
Showing results for 
Search instead for 
Did you mean: 

DAC registers configuration to generate signals on both channels simultaneously

stleraburg
Associate II

I use STM32F407 Discovery board to generate analog signals using DAC with DMA transfer. The goal is to use both DAC channels to have two signals generated simultaneously. However, I cannot enable the DMA request for the second channel. 

photo1704970312.jpeg

After analyzing previous posts, I understood that I need to change the settings on the low level and deal with registers.

The reference manual states:

To efficiently use the bus bandwidth in applications that require the two DAC channels at the
same time, three dual registers are implemented: DHR8RD, DHR12RD and DHR12LD. A
unique register access is then required to drive both DAC channels at the same time.

The problem is that I cannot find the way to configure these registers in STM32CubeIDE and understand what exactly do I need to change to enable the dual DAC channel converstion. 

Could you answer whether I am on the right way of thinking, and if yes, what can I do to access the register values of the DAC and enable the DMA request for the second channel? Are there any other useful resources to understand how to work with the microcontroller peritherals (especially DAC) on the low level? Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
AScha.3
Chief II

Hi,

i see no problem on F407 :

AScha3_0-1704971584950.png

-> go with mouse to the red marked ... system should tell you, what you doing wrong.

 

btw

You have set :

AScha3_0-1704971750396.png

 

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
AScha.3
Chief II

Hi,

i see no problem on F407 :

AScha3_0-1704971584950.png

-> go with mouse to the red marked ... system should tell you, what you doing wrong.

 

btw

You have set :

AScha3_0-1704971750396.png

 

If you feel a post has answered your question, please click "Accept as Solution".
stleraburg
Associate II

Thank you very much! It was conflicting wuth USART... no need to go deep woods 🙂

LCE
Principal

I just had a short look at the ref manual, to me it seems that you could solve this with 1 DMA channel only, when you choose one of the dual DAC data registers as peripheral target register for the DMA.