cancel
Showing results for 
Search instead for 
Did you mean: 

How to setup project for TouchGFX AND Audio Output

JLubb.1
Associate III

Hi All,

I want to start a project using TouchGFX, but it must also contain Audio Output on the headphone jack of my STM32F746G-DISCO board.

I managed to get these two things to work separately: The TouchGFX part using TouchGFX Designer, and the Audio Output using CubeIDE and an example project.

However, I cannot figure out how to get the sound output into my TouchGFX project! My approach is to call the appropriate BSP function (BSP_Audio_Out_Init / BSP_Audio_Out_Play) in the Model class of TouchGFX. Obviously, I need to include the necessary header files etc. - but that's where I run into problems. There are multiple dependencies so adding all manually is difficult and error-prone. And even if I manage to do all this, I'm getting compile/linker errors that I don't understand.

So my question is: Is there any automated way I can set up my project so I can use the Audio BSP functions from my TouchGFX code?

2 REPLIES 2
Foued_KH
ST Employee

Hello @JLubb.1​ ,

Please you can refer to the available examples in the STM32F7 CubeFW :

For audio : Playback and record : STM32Cube_FW_F7_V1.17.0\Projects\STM32746G-Discovery\Applications\Audio

You can use the code the code from the TouchGFX and use the Audio BSP functions.

Foued

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

JLubb.1
Associate III

Hi, thanks for the quick reply.

This was of course the first thing I tried. But this is exactly what does NOT work. The audio example app was even a pain to get running as a single app (without TouchGFX).

There are examples for either audio or TouchGFX, but nothing with both and combining the examples doesn't work.