Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


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

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)
{
HAL_Init();
SystemClock_Config();


BSP_LED_Init(LED3);
BSP_LED_Init(LED4);
BSP_LED_Init(LED5);
BSP_LED_Init(LED6);
BSP_PB_Init(BUTTON_KEY,BUTTON_MODE_EXTI);


while (!UserPressButton)Toggle_Leds();


if(BSP_AUDIO_IN_Init(DEFAULT_AUDIO_IN_FREQ, DEFAULT_AUDIO_IN_BIT_RESOLUTION, DEFAULT_AUDIO_IN_CHANNEL_NBR) != AUDIO_OK){
//if (BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_AUTO, DEFAULT_VOLMAX, AUDIO_FREQUENCY_16K)!= 0)
BSP_LED_On(LED3);
}
else{
BSP_LED_On(LED3);
BSP_LED_On(LED4);
}

for(;;);
}

  • I attached screen shot of my project main function (audioTest.png)


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:
https://www.dropbox.com/sh/7fx7cu3ko5wtrn8/AACmi_OFUGxJYTuIJohumWWXa?dl=0Question

Thank you very much

I remember that for one project I have seen some errors (not at building phase) when I open some .c source files. Anyway, I close that source files and then I deleted the errors and then there was no build error.

I don’t know if this will work for you, but you can try:
- close the files that have errors in editor window (C/C++ Perspective). you can close all files.
- in “Problems” window clear all existing errors
- build the project


From what I now, the red highlited functions are reported as errors by Eclipse Code Analisys (Codan) and not by compiler/linker.
What is more intersting is the location where the compiler found the error (if there are any compiling errors).

I tried your method but still build failed.
I deleted all errors, the 2 errors appeared again when I tried to build the project.

Anyway, thank you. :-)