Skip to main content
Tomas Zahradnik
Associate II
September 18, 2017
Question

How to get work SPKR_OUT on STM32F469I-DISCO

  • September 18, 2017
  • 1 reply
  • 2055 views
Posted on September 18, 2017 at 08:00

Hi all,

I'm trying to get work speaker output on my Discovery kit (STM32F469I-DISCO) but not succeed yet. I have connected

https://www.gme.cz/reproduktor-ls45n-3-r8-45mm-8ohm-1w

on pins 15 and 16 of extension connector CN12 and have used example 'Audio_playback_and_record' from 'STM32Cube_FW_F4_V1.16.0' repository, but cannot hear anything.

I have changed configuration AUDIO_PLAYER_Init in waveplayer.c from OUTPUT_DEVICE_AUTO to OUTPUT_DEVICE_BOTH and OUTPUT_DEVICE_SPEAKER but still not working.

Headphones on 3.5 jack output works fine and when I connect speaker to the headphone's output, I can head sound, so speaker is OK.

I have looked briefly into source code in BSP and couldn't find any handling of PE3 which should be used for switching between Headphones and speaker output which looks strange. I have tried to find any existing solution or similar issue and found just

https://community.st.com/0D50X00009XkZevSAF

where WM8994 chip is used. But on STM32F469I kit is used CS43L22 chip.

Do you have some suggestions for me?

Thanks for your help.

Tomas

#speaker #stm32f469i-disco #audio-playback #cs43l22
This topic has been closed for replies.

1 reply

Technical Moderator
September 19, 2017
Posted on September 19, 2017 at 15:47

Hello,

Did you followed the different steps in the readme.txt for hardware configuration ?

Did you tested that speaker is working on another connector?

Kind Regards

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Tomas Zahradnik
Associate II
September 19, 2017
Posted on September 19, 2017 at 21:38

Hello Imen,

I have read readme.txt from example folder and there is just mentioned JP4. But his jumper is not on STM32F469I-Disco. I read also Datasheet for Discovery kit and in chapter 6.5. Analog output is some mention about PE3. I suppose that this signal should be somehow handled in BSP analog driver.

I have also tested speaker on headphone output as I wrote and I could head some sound. So the speaker is fine (it's also brand new).

Documentation at the beginning of stm32469i_discovery_audio.c describe to call BSP_AUDIO_OUT_Init with argument OUTPUT_DEVICE_HEADPHONE1 or OUTPUT_DEVICE_HEADPHONE2 but later is described as OUTPUT_DEVICE_SPEAKER or OUTPUT_DEVICE_HEADPHONE. But I suppose that this is just not updated comment.

What I also don't understand is PE3 signal. Should I control it independently to BSP_Audio driver and should I Set it or Reset it for enabling speakers?

So any other idea? Does anybody tested this functionality?

Best regards

Tomas

Technical Moderator
October 17, 2017
Posted on October 17, 2017 at 16:35

Hello,

To get sound on the speaker, you should connect his loudspeaker (Left, Right and GND) to SPKR_OUTAN (pin 15 on CN12), SPKR_OUTAP(pin16 on CN12) and GND pin.0690X00000608fWQAQ.png0690X00000608YVQAY.png

SPKR/HP mapped on PE3 is an input Speaker/Headphone switch. It powers down the left and/or right channel of the speaker and/or headphone outputs as described in CS43L22 codec datasheet.

To power down the channel of the speaker/headphone, you have to configure this pin as input and connect it either to GND or VDD.

However, this pin is not exposed on the STM32F469I-Discovery, then it cannot be controlled. It?s a choice made to not power down speaker/headphone; so no BSP API is supporting this switch.

After checking, the ?Audio_playback_and_record? application worked fine with the sound on headphone and speaker (on SPKR_OUTAN and SPKR_OUTAP pins).

Kind Regards,

Imen.
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks