cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure the SAI with a CODEC

DYann.1
Senior II

Hello,

I would like to know if there are people who have already configured the SAI with a CODEC to recover the data ? With this link below:

https://wiki.st.com/stm32mpu/wiki/SAI_device_tree_configuration

I can see this figure but I don't quite understand this configuration. I know a little about SAI but not in depth.

DYann1_0-1700559816623.png

I don't understand the line SDA from the SAI to the CODEC, what is this line for ?

Thank you for your helps.

Regards

8 REPLIES 8
PatrickF
ST Employee

HI @DYann.1 

have you looked at https://wiki.st.com/stm32mpu/wiki/Soundcard_configuration#STM32MP15_disco_board_sound_card_configuration ?

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
DYann.1
Senior II

Hi,

I looked at your link there is this part that interests me but it is not the same microprocessor.

DYann1_0-1700735666162.png

I don't have a STM32MP15 disco board, I have STM32L552ZET6QU microcontroller. Your link is too general and does not explain how to configure the SAI simply without having to read tons of pages to know how to do anything afterwards. Simpler and more practical please.

Thank you

PatrickF
ST Employee

Hi @DYann.1 ,
you originally posted this ticket in MPU forum.
STM32MP1 products are running Linux. For sure very different than STM32L5 way of working.

moved in right location,

regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi,

You can see :

DYann1_0-1700747699277.png

The SAI is inside the MCU inside the microprocessor to my knowledge right ? Where did you see it in linux for my Topic ?

Where should I put this topic? Can you move it to the correct section ?

Thank you

Hi,

I already moved on 'MCU topic' on purpose, which was created on

PatrickF_0-1700749196351.png

and you mention a wiki MPU link related to device tree (which is a Linux concept) in your initial post.

Don't worry, it is easy to mix-up, and we are here to help you.

For MCU, maybe have a look to https://www.st.com/content/st_com/en/stm32-mcu-developer-zone.html

Regards.

 

 

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thank you for this move to the correct section. But Now my question is much simpler than you think. We talk a lot to say nothing. Look at my question at the very beginning of the topic.

DYann1_0-1700749943830.png

For this question I you gave me links and I wasted an entire day reading your documentation which is of absolutely no use. The document is very complete, even too complete, there is everything except the solution! Maybe it's your job to drown people like me in documentation ?

 

Sorry, I don't work on MCU products, but I can try to answer for HW point of view.
FS is synchro (usually audio sample rate)

SCK is clock for serial data sent on SDA and receive on SDB (if there is audio input path). usually 256xFS

info in STM32L5-Peripheral_Serial_Audio_Interface_SAI.pdf

Regards

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi,

Thank you, we are approaching the subject (after your .pdf) this information is interesting :

DYann1_0-1700772703856.png

After your explanation you say : 'SCK is clock for serial data sent on SDA and receive on SDB (if there is audio input path)'

But I have nothing to send, I just need to retrieve the values ​​sent by the CODEC via the SAI only, in this case I just use the SDB right , 

Currently I have this configuration :

DYann1_1-1700773471199.png

And it works, I can simulate data sent by the CODEC with an array initialized by myself and I receive the values ​​in the RX array. Now I move on to another step which consists of recovering the real data sent by the CODEC. In this case I don't needto use SD_B right ?

DYann1_2-1700773743600.png

Probably, I keep this configuration but in my code I will only use SD_A (which I use to retrieve the data).