cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407 DAC Output (12Bit) Droning

Jakob Czekansky
Associate II
Posted on November 08, 2017 at 11:21

Hey guys,

I have some problem with the output of my DAC and I hope you have some idea, what went wrong...

Situation: 

   I am trying to play a WAV audio file with the DAC of my STM32F407VET. I use a double buffer, the DMA and I trigger    the DAC with a Timer which has the frequency of the ~SampleRate of the track. 

Used: 

   SDIO (�SD Card),

   FatFs,

   DAC with output buffer (CubeMX),

   Timer to trigger DAC,

   DMA (double buffer to DAC),

   DMA Callback Functions for 'Half/Full Transfer Completed' to notify the free buffer part

Problem: 

   I can play the WAV file and the quality of the 12Bit output is 'ok', but there is always a droning in the sound - some    audible frequency which shouldn't be there. As I found out I can change the frequency of the droning by changing the    size of my buffer. Smaller buffer => higher frequency...

I attach the schematic of my board and some of the code. I really hope you experts can find my bug... 

Greets

Ps.: I had to change the HAL_DAC_Start_DMA for double buffering. 

#audio #stm32f4 #dma #dac #wav
2 REPLIES 2
Posted on November 09, 2017 at 00:33

I don't Cube.

Is the DMA circular?

JW

174732CGIL2