2017-11-08 02:21 AM
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 #wav2017-11-08 03:33 PM
I don't Cube.
Is the DMA circular?
JW
2017-11-09 03:09 AM