Showing results for 
Search instead for 
Did you mean: 

STM32f746 disco: audio play with wm8994 ... I get nothing but noise.

Associate III

Hi all,
I manage to move/modify the code for the wm8994 in the BSP project for STM32f746 disco board into my toughGFX project. I get no compile/run errors. The BSP readme says: "Copy file 'audio_sample_tdm.bin' (available in Binary) directly in the flash at @0x08080000 using ST-Link utility". But this file is too big and won't fit at that address. So... I made a smaller version (rodoTest1.bin, can not attach to this post sorry).
I program the project from cubeIDE and to test it I run the program without the sound file. I get noise on the headphones as expected. There is no sound file but there is data and it is being read so I expect noise. Then I use the cubeProgrammer to download "rodoTest1.bin" to the address 0x08080000 but I still get noise. What Am I doing wrong? BTW "rodoTest1.bin" is supposed to be stereo, 16-bit PCM, 48kHz sampling. headerless. I used Audacity to create it. Here is what the AudioPlay_demo() looks like. It runs inside a freeRTOS task (audioTest_task):



void AudioPlay_demo (void)
  uint32_t *AudioFreq_ptr;
  AudioFreq_ptr = AudioFreq+6; /*AF_48K*/
  uwPauseEnabledStatus = 1;    /* 0 when audio is running, 1 when Pause is on */
  uwVolume = 70;

  BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_HEADPHONE, uwVolume, *AudioFreq_ptr);

  while (1)