Hello Everyone,
We have encountered something unexpected in our experiment with TLV320ADC3101.
We're trying to get stereo samples from TLV320ADC3101, working as an I2S slave. The MCLK from master device is 12.8MHz, and the scheduled sampling rate is 50ksps. According to our understanding and the clock tool provided, this could be achieved by a simple clock division. We have selected MCLK as the ADC_CLKIN input, and set NADC=1, MADC=2, AOSR=128. The 50kHz WCLK and 3.2MHz BCLK had been also generated by master device and connected to CLK pins. All clock signals have been verified by an oscilloscope, yet we have only got invalid numbers like 0, 32767, -32768, ... on the DOUT pin.
I have checked varieties of parameter combination. An interesting thing is, when the MADC is set to 3 or 4, we can get readings, and the data got are somehow reasonable except when MADC=4, each sample point repeats once (A A B B C C D D ...) and when MADC=3 the repeating problem happens every other number (A B B C D D ...). I think this verifies the hardware connections on our PCB, and the repeating problem is caused by the clock being not fast enough. But when I set MADC=2, no valid number can be got from DOUT.
Could anyone kindly give us some hint about this problem and how could we fix it? Thanks.
P.S. the registers were set according to the example on the datasheet.
// Page 0:
{0x00, 0x00}; //Select Page 0;
{0x04, 0x00}; // MCLK as the PLL CLKin and the Codec in
//{0x05, 0x11}; // PLL DOWN, P = 1, R = 1; (not used)
//{0x06, 0x04}; // PLL J = 16; (not used)
//{0x07, 0x00}; // PLL D-Val MSB = 0; (not used)
//{0x08, 0x00}; // PLL D-Val LSB = 0; (not used)
{0x12, 0x81}; // NADC Power UP, N=1
{0x13, 0x82}; // MADC Power UP, M=2;
{0x14, 0x80}; // AOSR = 128
{0x1B, 0x00}; //I2S, 16bits, BCLK input, WCLK input, disable DOUT 3-state
{0x3d, 0x01}; //Select ADC Signal Processing Block PRB_R1
// Page 1
{0x00, 0x01}; //Select Page 0;
{0x33, 0x00}; //Mic Bias Not used
{0x3b, 0x00}; //Left PGA = 0dB
{0x3c, 0x00}; //Right PGA = 0dB
{0x36, 0x0f}; //Left channel = IN1L(P) - IN1R(M) Differential
{0x37, 0x3f}; //Right channel = IN2R(P) - IN3R(M) Differential
// Page 0
{0x00, 0x00}; //Select Page 0;
{0x51, 0xc2}; //Power up both ADCs
{0x52, 0x00}; //Unmute volume control and set fine-gain to 0dB