MCU输出主时钟给音频ADC芯片,让ADC芯片工作在master 模式,产生standerd philips I2S格式(64FS,FS=48K),但从MCU端看,接收到的数据有错位情况。
举例:MCU I2S配置如下,I2S时钟误差为0,
I2S_InitStructure.I2S_Standard = I2S_Standard_Phillips;
I2S_InitStructure.I2S_DataFormat = I2S_DataFormat_32b;
I2S_InitStructure.I2S_MCLKOutput = I2S_MCLKOutput_Disable;
I2S_InitStructure.I2S_AudioFreq = I2S_AudioFreq_48k;
I2S_InitStructure.I2S_CPOL = I2S_CPOL_Low;
I2S_InitStructure.I2S_Mode = I2S_Mode_SlaveRx;
I2S_Init(SPI2, &I2S_InitStructure);
如果ADC连续发0x1234 5678,MCU接收到的数据有可能是这样的0x2345 6781 或者0x3456 0x7812,感觉是MCU I2S无视WS信号,只是用位时钟驱动移位寄存器,而造成错位。 |