This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TLV320ADC3101: Where to Start to get a setup for the registers in the TLV320?

Part Number: TLV320ADC3101
Other Parts Discussed in Thread: TLV320AIC3204EVM-K

I've included a TLV320 as the front end for part of a Bluetooth Speaker design.  The TLV320 will take analog inputs and convert them to I2S in stereo.  There's a host processor that's connected to the TLV320 over I2C.  I can see there's a tool called purepath studio which I haven't delved into yet, will purepath studio allow me to generate the register settings for the TLV320 based on the input data I provide?

Thanks,

  • Hi, Ted,

    Thanks for your interest in our 'ADC3101. This device has an available Graphical User Interface  (GUI) that is used to configure the 'ADC3101 EVM. This GUI features some example configuration scripts that could be useful for you. The tool is available in the product folder of the TLV320ADC3101 EVM.

    PurePath Studio (PPS) is a tool that also is compatible with the 'ADC3101, however, PPS is used to program the miniDSP of the 'ADC3101. If you don't need the miniDSP functionality of the device, PPS is not required as all the basic configurations of the device can be achieved with the previously mentioned GUI.

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Diego,

    Thanks for the prompt reply, I'll download PPS and check it out.

    Ted

  • Diego,

    I downloaded and installed the 'ADC3101CS tool but it seems not to do anything without the TLV320ADC3101 Evaluation Module and I can't find any example configuration scripts in the install folders?
  • Hi, Ted,

    You should be able to see the Recording options under the Quick Start Info section of the software even if the EVM is not connected. If you are unable to see these functions (i.e., a white screen only), please try running the software as administrator.

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Diego,

    I ran as administrator and now I see stuff in the central window, I'll play with it today and see what I can figure out.

    Thanks,

    Ted
  • Can the tool be used to calculate values without me owning a TLV320ADC3101EVM system? It seems that I might be able to configure inputs and PLL settings and then generate the results as a list of the register settings needed to achieve those settings; is that possible or are you suggesting that I just look at the recording scripts?

    Thanks,

    Ted
  • Hi, Ted,

    Unfortunately, the tool requires the 'ADC3101EVM to be connected in order to track the register commands required for the device configuration. I would recommend you to look at the recording scripts as reference and then modify them per your system design needs.

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Thanks Diego,

    I just ordered a TLV320AIC3204EVM-K from Digikey. I have other product ideas that can use this chip and the TLV320AIC3204EVM-K was only $100.

    I did get I2C communications running with the TLV320 today after I figured out that the I2C address was 0x18, not 0x30, that's very confusing as the scripts show it as 0x30 but the 7 bit address in the datasheet is actually shown as 0011 000 (when both Adrr lines are low) which is a very non-standard way of writing 7 bits, I would expect it to be 001 1000. If anyone reading this wants to know why, it's because the I2S system takes the 7 bit address and adds a R/nW bit so a write to the device would actually be 0011 0000 where the last bit is the R/nW bit.

    The basic setup of the TLV320 seems fairly straightforward and there's a step-by-step listing of how to get it going in the datasheet; my next project will use the digital processing features too but this one is just an Aux in port for a digital amplifier.

    One question I still have is can I disable the external clock on MCLK and still talk to the I2C registers?

    Ted
  • Hi, Ted,

    Thanks for the feedback and sorry for the I²C address confusion. Regarding your question, MCLK signal can be disabled and you should still be able to configure the device. You just need to make sure the device receives proper clocks before entering normal operation mode.

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Just so I don't confuse anyone, I should have said " the I2C system takes the 7 bit address and adds a R/nW bit ", I2S does not use addressing like this.

  • Hi, Ted,

     

    Thanks for the clarification! please let us know if you have further questions.

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Although I got a full initialization done for the TLV320 I got no streaming I2S; it turns out my design was messed up because it sent 3.3 volts to DVDD and that is in process of being corrected with an LDO.  I'll report back when this is done.

  • Diego,

    I've gotten this to the point where I think it should be working but I'm getting no signals out of the TLV320, the BCLK line sits high and the WCLK & DOUT lines sit low.  All I'm doing is feeding a stereo signal (from an iPad) into IN1R and IN1L and I'm feeding a 12 MHz clock into MCLK. I tried to follow the example code that starts on page 80 of the datasheet with the main difference that I'm using MCLK as an input to drive the PLL.  Can you please take a look at my setup script and see if you can spot what I'm doing wrong?

    Note that m I2C routine has functions that can write 1 or 2 bytes at once - I've tried reading back registers after I've written them and I do get back what I wrote so it looks near certain that I2C is working properly.  I send the register parameter as a decimal number as that's how they are listed in the datasheet but I send the values as hex because it's easier to translate them to binary in my head.

    void setupTLV320(void)
    {   
        // the values and the order they are written in is taken from page 79-81 of DS (para 11.2.2.2)
        I2C_Write1(TLV320_ADDR, 0x00, 0x00); // set TLV320 to page 0
        I2C_Write1(TLV320_ADDR, 0x01, 0x01); // trigger soft reset the TLV320 will come out of reset on its own
        CyDelay(100);                        // but it needs time so wait 0.1 seconds for device (may be unecessary)
        // table 1 on page 23 of DS gives parameters
        // MCLK = 12 MHz, P=1, R=1, J=7, D=5264, Achieved Fs = 441. kHz
        I2C_Write1(TLV320_ADDR, 4, 0x00);        
        I2C_Write1(TLV320_ADDR, 5, 0x11);        // p47 - P = 1, R = 1
        I2C_Write1(TLV320_ADDR, 6, 0x07);        //       J = 7
        I2C_Write2(TLV320_ADDR, 7, 0x14, 0x90);  //       D = 5264 = 0x1490 (Note this sends 2 bytes out in 1 write)
        I2C_Write1(TLV320_ADDR, 5, 0x91);        //       Pwr on to PLL and P = 1, R = 1
        I2C_Write2(TLV320_ADDR, 18, 0x88, 0x82); // p48 - NADC Pwr On and Val = 8, MADC Pwr On and Val = 2 (Note this sends 2 bytes out in 1 write)
        I2C_Write1(TLV320_ADDR, 20, 0x80);       // AOSR = 128    
        I2C_Write1(TLV320_ADDR, 27, 0x0B);       // I2S, 16 bits, BCLKop WCLKop DoutEn
        I2C_Write1(TLV320_ADDR, 61, 0x01);       // use PRB 01 (processing block)
        
        I2C_Write1(TLV320_ADDR, 0, 0x01);        // Set register Page to 1
        I2C_Write1(TLV320_ADDR, 51, 0x00);       // Set MICBIAS to not used
        // Program PGA level
        I2C_Write2(TLV320_ADDR, 59, 0x1E, 0x1E);  // Set Left, Right Analog  00 = 0dB 0x1E = +15dB (2 locations set)
        // Program routing of inputs/common mode to ADC input
        I2C_Write1(TLV320_ADDR, 52, 0xFC);        // Left ADC Input selection for Left PGA = IN1L(P) as Single-Ended
        I2C_Write1(TLV320_ADDR, 55, 0xFC);        // Right ADC Input selection for Right PGA = IN1R(M) as Single-Ended
        // Unmute analog PGAs and set analog gain
        I2C_Write1(TLV320_ADDR, 0, 0x00);        // set TLV320 back to page 0
        I2C_Write1(TLV320_ADDR, 81, 0xC2);       // Power up ADC channel
        I2C_Write1(TLV320_ADDR, 82, 0x00);        // Unmute digital volume control and set gain = 0 dB
    }

  • Hi, Ted,

     

    I reviewed the register configuration and I have a couple comments:

    • For the Master device configuration, WCLK should be configured as an output as well, so Page 0: Register 27 should have a value of 0x0D.
    • The input clock for the device tree is selected as MCLK by default, but as you are using the PLL, you need to change the source for CODEC_CLK to PLL_CLK. This is done by setting Page 0: Register 4 as 0x03.
    • The BCLK divider should be configured and powered to output the internally generated BCLK. For this, you need to configure Page 0: Register 30.

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Diego,

    Thanks for the review, I made the changes you suggested making the value written to register 30 (page 0) to 0x88.  Now I get the BCLK/WCLK at 1.41 MHz/44.1 kHz which is what I expected (I think those are good) but the data line stays low - either it's not configured correctly or the input is muted/the gain is too low.  I'm going to check the register settings but, given I feed a iPad stereo output straight into the IN1R/L inputs through 1 uF series capacitors, what sor of gain settings will reflect 'normal' listening volumes? Any idea?

  • Diego,

    Forget my last message - I found that I was trying to unmute the Aux in by writing to register 0x82 instead of 82, problem is solved and it sounds AWESOME!

    Thanks for all your help :D

    Have a great holiday break

    Ted

  • Hi, Ted,

    Thanks for the feedback, we are glad to hear you are able to hear the digital audio from the device. Please let us know if you have further questions!

    Thanks, happy holidays!.

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer