Comparing the BSPs of the stm32F407 and stm32F746 Discover boards, I find that the 407 calls dspc_asrc_init_Q15 at initialization to initialize Mic_ASRC. During processing, the code will also use the following three functions to determine the jitter buffer valid data.
Dspc_asrc_write_input_Q15 (& Mic_ASRC, PCMBuffer, INPUT_BLOCKSIZE);
NSamplesAvail = dspc_asrc_output_avail (& Mic_ASRC);
Dspc_asrc_read_output_linear_Q15 (& Mic_ASRC, Mic_ASRCSamples, OUTPUT_BLOCKSIZE);
Then AWEProcessing uses Mic_ASRCSamples for the audio processing.
But in the stm32F746 code, the function directly uses the peripheral to read the data ((fract16 *) & AudioBufferIn [nInReadNdx]), not the converted Mic_ASRCSamples.
Is it because the 746 mic and the play are using the same SAI peripherals, and the 407 uses two different peripherals and needs to confirm whether the mic sample is done?
Looking forward to your reply
Thanks
1:24pm
Hi,
Yes, you are correct. The stereo mic input on the STM32F746 board is connected to the Wolfson CODEC. The SAI DMA complete interrupt for the CODEC processes both the input and output audio streams.
On the STM32F407 board the mono mic is connected directly to the processor over SPI and thus is in a separate clock domain.
Thanks
-Axel