cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746-Discovery, Audio Line In jack not supported for SW4STM?

Christopher Pappas
Senior II
Posted on October 27, 2015 at 13:14

On the STM32F746-Discovery Example firmware version 1.2.0, for System Workbench, the low-level drivers and HAL code say that the Audio Line In jack is not supported, Is this a hardware issue with the board, or just a software issue with the current release of FW? Thanks!!

1 ACCEPTED SOLUTION

Accepted Solutions
Christopher Pappas
Senior II
Posted on November 12, 2015 at 14:37

For now, I am looking into using the PWM pins on the Arduino header to use as audio output. The good thing, many PWM pins available. The bad thing, low resolution, poor freq response, and high CPU usage.

View solution in original post

7 REPLIES 7
Nesrine M_O
Lead II
Posted on October 28, 2015 at 10:56

Hi chris,

Could you precise where did you found this information, so that we can verify it?

-Syrine-

Christopher Pappas
Senior II
Posted on October 28, 2015 at 16:15

In the example for BSP, the file stm32746g_discovery_audio.c contains this restriction to mic input only.

Here is a clipping of that code:

uint8_t BSP_AUDIO_IN_OUT_Init(uint16_t InputDevice, uint16_t OutputDevice, uint8_t Volume, uint32_t AudioFreq)

{

  uint8_t ret = AUDIO_ERROR;

  uint32_t deviceid = 0x00;

  uint32_t slot_active;

  if (InputDevice != INPUT_DEVICE_DIGITAL_MICROPHONE_2)  /* Only MICROPHONE_2 input supported */

  {

    ret = AUDIO_ERROR;

  }

  else

  {

    /* Disable SAI */

    SAIx_In_DeInit();

    SAIx_Out_DeInit();

Nesrine M_O
Lead II
Posted on October 29, 2015 at 10:16

Hi chris,

In fact, BSP drivers describe the hardware, so this is necessarily a HW limitation related to discovery board. 

I'd highly recommend you to have a look to the STM32F746G-DISCO discovery User manual ( 

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/DM00190424.pdf

) to have more information about hardware features on the board.

-Syrine-

Christopher Pappas
Senior II
Posted on October 31, 2015 at 00:49

Yes, I understand now looking at the driver and BSP code. There is no combination of TDM timeslots that can simultaneously handle async Line in/Headphone out. A big drawback of the discovery board vs the evaluation board. No connection to the line out pins.

briancavanagh91
Associate II
Posted on November 06, 2015 at 03:40

TDM is only one of five protocols that may be used with the digital input and output audio ports.  The other three are standard i2s, justify left i2s, justify right i2s, and DSP mode.

I have uploaded to the thread on STM32F7 line in and headphone out, source and binary code which implements a copy from line in to headphone out.  This code copies from the AIF1 ADC Output to the AIF DAC Input, which is directed to the headphone output.

Unfortunately, there is a quite a lot of accompanying noise.

I would love to find out where that noise is coming from so I can turn it off.

briancavanagh91
Associate II
Posted on November 10, 2015 at 22:23

I've tried everything I can find to eliminate the noise in Line1 input, but to no avail.

As a result, I am moving my beginners audio project to an Olimex STM34F405 header board.  

My guess is the fault lies in either a weakness in the WM8994 codec, or insufficient care given to signal routing in the STM32F7 discovery board.  

But I cannot rule out my own ignorance.

Christopher Pappas
Senior II
Posted on November 12, 2015 at 14:37

For now, I am looking into using the PWM pins on the Arduino header to use as audio output. The good thing, many PWM pins available. The bad thing, low resolution, poor freq response, and high CPU usage.