cancel
Showing results for 
Search instead for 
Did you mean: 

Audio feedback/cross problem with STM32F7 Discovery board

misterstarshine
Associate III
Posted on October 13, 2016 at 18:40

Hi.

There is audio feedback when line-in and headphone jack are used simultaneously on STM32F7 Discovery board.

This issue seems to have been discussed in other threads but it doesn't seem clear why this happens.

Could it be something wrong in the firmware libraries? Could it be a board layout issue with very close traces?

This is a problem I really would like to get solved since my application needs both line-in and headphone out at the same time.

#stm32f746g-disco #stm32f7-wm8994-headphone
1 REPLY 1
misterstarshine
Associate III
Posted on October 13, 2016 at 19:10

Hi again.

I might have solved the problem hopefully. These lines

/* Select DAC1 (Left) to Left Headphone Output PGA (HPOUT1LVOL) path */
counter += CODEC_IO_Write(DeviceAddr, 0x2D, 0x0001);
/* Select DAC1 (Right) to Right Headphone Output PGA (HPOUT1RVOL) path */
counter += CODEC_IO_Write(DeviceAddr, 0x2E, 0x0001);

were replaced by me by

/* Select DAC1 (Left) to Left Headphone Output PGA (HPOUT1LVOL) path */
counter += CODEC_IO_Write(DeviceAddr, 0x2D, 1<<8);
/* Select DAC1 (Right) to Right Headphone Output PGA (HPOUT1RVOL) path */
counter += CODEC_IO_Write(DeviceAddr, 0x2E, 1<<8);

This is around line 540 in wm89c in the BSP audio library. The datasheet description (page 266) for the 0x0001 setting is for the two registers 0x2D and 0x2E: ''Left DAC1 to MIXOUTL Mute'' and ''Right DAC1 to MIXOUTR Mute'' while my setting is ''HPOUT1LVOL (Left Headphone Output PGA) InputSelect = DAC1L'' and similar for the right channel ''HPOUT1RVOL (Right Headphone Output PGA) InputSelect = DAC1R''. This was a seriously hard challenge with lots of trial and error. I guess I could've used the speaker output for this purspose but since it is a Bridge-Tied-Load configuration on that one it would've required some external circuits for line level or headphone driving. Hope this post helps.