STM32H747I-DISCO-CM7 SAI audio interface DMA problem
Hello there,
I am trying to build a custom voice AI solution using STM32H747I-DISCO development kit, for which I generated the NN library code by importing a .tflite model via STM32CubeIDE and it works fine with a static Input buffer.
Now, I am trying to take the input from onboard MEMS MIC and (for the time being) just record the audio and play it to verify the recorded audio. For this, I referred to an example application named "BSP" provided under the board's firmware package. I copied the related audio BSP source files to my custom project and linked to the SAI peripheral drivers as in the example application. The project builds fine and I am able to run it on the M7 Core, but the application gets stuck in the function call "BSP_AUDIO_IN_RecordPDM()" and never returns. Whereas, on stepping inside the function while debugging, everything (DMA config, audio frequencies etc) looks fine and the function executes till the return statement with return value being 0 (as I verified in debug session variables).
I tried making the clock settings and hardware/peripheral initialization as same as the example code but got no luck in getting the audio recording running. I am stuck at this point where everything seems OK but still its not working, and have no idea how to debug it now. Please suggest me any workarounds or tweaks that I can try to understand where could I be making a mistake.
Pls Note: for now, I have removed calling the AI part, just keeping the audio record and play function in the main loop
As I am new to audio processing, any leads are highly appreciated.
Thanks and regards,
Bhupendra.
