I would like to know how to retrieve the acquisition values : INPUT -> ADC -> SAI -> µP like the diagram below :
I have a program that works for this : DMA -> SAI -> DAC But this is not the way I would have wanted to make my CODEC work. Do you have any idea how should i proceed ? Thanks in advance
I saw but it does not correspond to what I want to do, it takes the recordings via an SD card and goes through a DAC and then the HP which does not correspond to what I am looking for. If you have an example of the taking into account of the microphone via ADC and SAI via the microprocessor that would interest me
what audio codec you use?
if you also use AUDIO_CODEC WM8994 (or a similar one), stm32h743i_eval_audio.c may be a good reference: SAI and record.
I use CODEC SGTL5000 (but it's the same principle except for a few details). I can see the example but
I do not see where is the part of code that interests me and the configuration under CUBEMX.
Besides, why go looking for an example of another evaluation board with another CODEC or I have an STM32L552E-EV evaluation board with a CODEC on this board already.
I suppose CODEC SGTL5000 not used by STM32 boards (from ST).
if you want to start from STM32L552E-EV evaluation board, on which codec CS42L51 used, in similar way, BSP driver is stm32l552e_eval_audio.c, component driver is cs42l51.c.
Thank you for this link but where is what is the code where it uses the CODEC to retrieve the values via an ADC ? I've explored all examples of this CODEC with this card and haven't seen a single place where one can retrieve the data via an ADC.
Thank you for your helps.
in this L552 example is:
+ Call the function BSP_EVAL_AUDIO_IN_Record() to record audio stream. The recorded data are stored to user buffer in raw (L, R, L, R ...). Instance : Select the input instance. Can be 0 (SAI) or 1 (DFSDM).
SAI input is from codec ADC ... so what is the problem ??
as you mentioned, path is INPUT -> ADC -> SAI -> µP.
for codec CS42L51 on STM32L552E-EV evaluation board, BSP_AUDIO_IN_Init(), BSP_AUDIO_IN_Record() should be the functions to follow. Instance : Select the input instance. Can be 0 (SAI)
Yes jiangfan this is the case for INPUT -> ADC -> SAI -> µP. In this cas I use the link that you give me before
Or I can find in the example provided by stmicroelectronics ? But the function BSP_AUDIO_IN_Record(), I can use a microphone to record my voice for example and where is the .ioc configuration file that goes with this project ?