2022-12-29 04:01 AM
HI,
After having configured the SAI PORT of the STM32L5 to communicate with a CODEC do you know how to recover the data ?
Thank for your helps
Regards
2023-01-02 08:59 AM
Received data are in the SAI FIFO, read through SAI_xDR registers. Normally SAI is read by DMA, but while experimenting, you can handle it by polling, too. See Internal FIFOs subchapter of SAI chapter in RM.
JW
2023-01-03 12:25 AM
Hi,
First I open the example with the evaluation kit STM32L552E-EV, the file SAI Audio Play. But I need to read information from a sensor and not a pre-record.
After after configuring the SAI PORT with CubeMX, I don't know how to read samples.
You say
Do you have the code so that I can concretely see how it works ? You says in RM what does that mean ?
Thank you
2023-01-03 01:36 AM
RM = reference manual ( download from STM )
+
example code - see
to read, use : HAL_SAI_Receive(SAI...) or HAL_SAI_Receive_DMA() , read in HAL lib .
2023-01-03 03:44 AM
Hi,
I have this example in my IDE environment
And I can see the function :
HAL_StatusTypeDef HAL_SAI_Receive(SAI_HandleTypeDef *hsai, uint8_t *pData, uint16_t Size, uint32_t Timeout)
In this example SAI_AudioPlay it's not the same thing i'm looking for. First I don't have the same CODEC and I just need to acquire the data via an input from the CODEC that's all.