Skip to main content
Jakob Czekansky
Associate II
November 8, 2017
Question

STM32F407 DAC Output (12Bit) Droning

  • November 8, 2017
  • 2 replies
  • 1550 views
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
This topic has been closed for replies.

2 replies

waclawek.jan
Super User
November 8, 2017
Posted on November 09, 2017 at 00:33

I don't Cube.

Is the DMA circular?

JW

Jakob Czekansky
Associate II
November 9, 2017
174732CGIL2