CODEC with STM32
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-21 12:24 AM - last edited on ‎2023-08-30 9:40 AM by Amel NASRI
Hello,
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
- Labels:
-
STM32L5 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-21 12:53 AM
some STM32 example(s) and application(s) may be a good reference.
for example, AN3997 Audio playback and recording using the STM32F4DISCOVERY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-21 12:56 AM - edited ‎2023-08-21 1:01 AM
Hi,
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-21 8:34 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-22 1:58 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-23 1:34 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-24 12:52 AM
Hi jiangfan,
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.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-24 1:10 AM
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 ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-24 1:10 AM
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-24 1:43 AM - edited ‎2023-08-24 1:45 AM
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 ?
