2022-04-28 09:22 PM
Hi,
I'm implementing SAI(I2S format) audio project using STM32H7B3-discovery.
I checked data input and output of CS42L51.
The SAI frame size is 64bit and slot size is 32bit.
SAI and CS42L51 work properly.
But, when i convert input data to integer value, the result was not square wave.
I sent data to desktop using uart. Below picture is result.
First question.
I think the dma and SAI buffer work as below.
Is it right?
Second question.
I sent 32bit 16k sample to desktop using uart.
I set uart baud rate to 1.5Mbps.
desktop os is windows 10 and i implemeted serial program using pyserial.
Is this baud rate enough?
Last question.
I convert 24bit data using below code.
def byte3_to_integer(value1, value2, value3):
d1 = value1 & 0x7F
d2 = value2 & 0xFF
d3 = value3 & 0xFF
result = (d1 << 16) + (d2 << 8) + d3
if (value1 & 0x80) == 0x80:
result -= 0x800000
return result
Is there anything wrong in the process of converting sample?
This is my previous question(link)
Regards,
Youngjun