工具与软件:
大家好!
我在使用 PCM3120-Q1时遇到问题、我在这种情况下使用 I2S 接口测量数据。
我在 ADC 的输入上施加一个5kHz 的正弦波。
当我将 I2S 接口配置为96 kHz (实际频率为100 kHz)和32位字长时、测得的信号如下所示:
对我而言、它看起来要么存在数据转换错误、要么信号过冲。
无论如何、当我将 I2S 接口配置为100kHz/16位或48 (实际50) kHz/32位时、数据看起来正确。
因此、我假设既不是数据转换误差、也不是信号过冲。
100 kHz/16位
50 kHz/32位
PCM3120-Q1的初始化外观如下:
// Set page to page 0x00 pcm3120_wr_reg(REG_PAGE_CFG, 0x00); // Disable sleep pcm3120_wr_reg(REG_SLEEP_CFG, 0x01); // Sleep according to datasheet: // "Wait for at least 1 ms to allow the device to complete the internal wake-up sequence" HAL_Delay(5); // Set ADC_FSCALE to 2d = "VREF is set to 1.375 V to support 1 VRMS for the differential input or 0.5 VRMS for the single-ended input" pcm3120_wr_reg(REG_BIAS_CFG, 0x02); // Set Channel 1 input type to "Line input" pcm3120_wr_reg(REG_CH1_CFG0, 0x80); // Set Channel 1 input impedance to "Typical 10 kOhm input impedance" pcm3120_wr_reg(REG_CH1_CFG0, 0x84); // Set Channel 1 gain to 20 dB pcm3120_wr_reg(REG_CH1_CFG1, 0x50); // Enable input Channel 1 pcm3120_wr_reg(REG_IN_CH_EN, 0x80); // Set ASI to I2S mode with 16 / 24 / 32 bit word length pcm3120_wr_reg(REG_ASI_CFG0, 0x70); // 32 bit word length // pcm3120_wr_reg(REG_ASI_CFG0, 0x60); // 24 bit word length // pcm3120_wr_reg(REG_ASI_CFG0, 0x40); // 16 bit word length // Enable ASI Channel 1 output pcm3120_wr_reg(REG_ASI_OUT_CH_EN, 0x80); // Power PLL and ADC channel pcm3120_wr_reg(REG_PWR_CFG, 0x60);
我将 STM32 µC 作为主机控制器。 我的 I2S 配置如下所示:
在数据表中、我发现与此相关的唯一内容是 ASI_WLEN 配置、其中建议使用16位字长和10k Ω 输入阻抗(第8.6.2.5章、ASI_CFG0 -> ASI_WLEN):
ASI word or slot length. 0d = 16 bits (Recommended this setting to be used with 10-kΩ or 20-kΩ input impedance configuration) 1d = 20 bits 2d = 24 bits 3d = 32 bits
您能帮助我解决这个问题吗、或者解释为什么使用此设置无法实现96 kHz/32位字长吗?
谢谢、此致
Julian