AnsweredAssumed Answered

[Solved]Unable to use Audio_in/out_init, using stm32f411e-disco & sw4stm32

Question asked by sim.kae_wanq on Oct 9, 2015
Latest reply on Oct 28, 2015 by Nesrine M
Hi all,
I am newbie in stm32f411e-disco and sw4stm32.
I am trying to write a audio playback program in my board, but I met some problem in using BSP_Audio_In_Init() and BSP_Audio_Out_Init().

This is how I start my program:
1. Create new C program with project's name "audioTest", and choose "Ac6 STM32 MCU GCC" as Toolchain.
2.In MCU Configuration, "STM32F411E-Disco" was chosen directly.
3. In Project Firmware Configuration, "CubeHAL" was chosen and "STM32_Audio" as additional driver.
The rest remain unchanged.

In project properties,
1. I updated the Linker Script to "STM32F411VETx_FLASH.ld", which I get from CubeMX
2. I added ":libPDMFilter_CM4F_GCC.a" to libraries
The rest remain unchanged

What I want it to do in my program is:
1. toggle 4 LEDs (LED3,4,5,6) until Pushbutton is press
2. Call Audio_In_Init() (or Audio_Out_Init()).
3. IF call FAIL, Led3 will on. (false case)
    ELSE both Led3 and Led4 will on. (true case)

here is my main.c:
 int main(void)
                 while (!UserPressButton)Toggle_Leds();

My code was compiled and built successfully, and when I port it to my stm32f411e-disco, leds was toggling as my expectation.

However, when I press the pushbutton, the LED stop toggling, but neither true case nor false case present.
The LEDs just remain their state when I press the pushbutton.

I know program stop at calling BSP_Audio_In/Out_Init() function, but I don't know why this happen and how to fix it.
Can anyone help me and give me some advices?

Here I uploaded my full set of 'audioTest'project:

Thank you very much