I used STM32L431 as the master to receive audio signals from TLV320. The test found that the trend of the data is right, as the input becomes larger, the output also becomes larger. But the amplitude of the signal seems to be wrong, and the duty cycle of WCLK is not 50%, but 1 bit high and 63 bits low. My configuration is I2S mode, 8K sampling, 32 bits, why does this happen and how can I troubleshoar it?tlv320aic3109-q1.pdf
The amplitude might be incorrect because it is expecting a 50% duty cycle but your STM controller is providing the 1 bit duty cycle. 1 bit wide WCLK is typically found in TDM or DSP formats so I believe you have a problem on the host side. Once that's resolved the codec should behave properly.
Yes, you're right. My host configuration is misconfigured and I fixed it, but I can't figure out how to convert the read value to voltage.
Each I2S data sample is a two's complement number, where the maximum value correlates to the full scale input of the ADC. The ADC has a fullscale input value of .707Vrms. This means that when the I2S reaches a maximum value, the ADC is measuring a 1Vp. I recommend using an I2S analyzer tool, as measuring the data sample by sample is quite tedious. An analyzer will also provide better debugging and measurement tools such as a fourier transform.
0x7FFFFFFF would represent 1 volt peak.
0x00000040 would represent 4 * 1/[(2^31)-1] Volts