2022-09-15 06:18 AM
hello,
i'm using stm32h745 mcu.
i want to using SAI interface to use MEMS MIC, ADAU7002 .
this sensor transmit 20bit PCM , 22050 hz data.
i used CUBEMX and SAI & DMA setting is here.
i can't select SAI interface data size 20bit, so i fixed HAL Driver to set datasize 20bit, but i don't receive 20bit data.
i can receive only 16bit data.
if i try to read 3bytes from buffer to read 20 bit data, but cracked data.
i try to read 2bytes from buffer, i can read data and save 16bit pcm .wav file.
i can't understand why i can read correct data and create .wav file .
where is lefted 4bit per pcm data??
i think that occured problem by dma.
can i fixed dma setting change half word to 4byte words??
if you think dma has no problem, please tell me what you think to solve this problem??
thankyou.
2022-10-04 02:18 AM
Hello @hkim.5 & welcome to ST Community :grinning_face:
As you have already noted, the only supported Protocol data sizes in both CubeMX and the HAL driver are mentioned below.
What is the behavior if you set Data Size to the value "16 Bits Extended" in STM32CubeMX?
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.
2022-10-04 07:19 PM
If any of you would look at I2S format timing graph, you would see that the format is designed to be compatible between different data sizes. Therefore one can receive 20-bit data also with a 24-bit or 32-bit configuration.