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.

TLV320ADC3001: reference code

Part Number: TLV320ADC3001

Currently debugging the TLV320ADC3001IYZHR chip, is there a reference code?
Pure linux or MCU code, thank you!

  • Hi, Piero,

    The datasheet of the ADC3001 has a reference code for the ADC configuration in section11.2.2.1.3. This code is set in a TI standard used for all the tools for the audio converters we have. Unfortunately, we don't have a specific reference on Linux or MCU code for this device. I have seen some codes on the web for the ADC3101, which is an audio ADC which shares the same register map of ADC3001, so you may want to look for them as reference.

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • We measured the peripheral circuits, power supply 1.8V and 3.3V are available, the data is correct (waveform below, address 0x30), but the device ADC3001 in the 9thbit has no ACK.

    pls suggest

    the initial code as below:

    static int TLVADC_reset(void)

    {

            printf("%s enter\n", __func__);

     

            GpioSetDirection(30, GPIO_DIRECTION_OUTPUT);

     

            GpioSetLevel(30, GPIO_LEVEL_HIGH);

            mdelay(10);

            GpioSetLevel(30, GPIO_LEVEL_LOW);

            mdelay(10);

    //        GpioSetLevel(30, GPIO_LEVEL_HIGH);  //拉高,拉低都试过

    //        mdelay(10);

     

            return 0;

    }

     

    #define TLVADC_I2C_BUS 0

    #define TLVADC_I2C_CLIENT (0x18) //(0x18)

     

    static int TLVADC_write(unsigned char reg_addr, unsigned char reg_data)

    {

            ret = gx_i2c_tx(TLVADC_I2C_BUS, TLVADC_I2C_CLIENT, reg_addr, &reg_value, 1);

    }

     

    int TLVADC_init(void)

    {

            //Power up appicable external hardware power supplies

            while(1) {

            TLVADC_reset();

     

            //Set register page to 0

            TLVADC_write(0x00, 0x00);

            //Initiate SW Reset

            TLVADC_write(0x01, 0x01);

     

            mdelay(1000);

            }

     

            //Clock Settings

            TLVADC_write(0x04, 0x00);

            TLVADC_write(0x05, 0x11);

            TLVADC_write(0x06, 0x04);

            TLVADC_write(0x07, 0x00);

            TLVADC_write(0x08, 0x00);

    The log file as below:

    TLVADC_reset enter

    gx_i2c_open(),find active i2c device,i2c_devid = 0

    +++++gx_i2c_transaction, bus:0, client:0x18, width:1, addr:0, count:1, flag:0

    +++++gx_i2c_transfer, bus:0, client:0x18, width:1

    i2c_dw_xfer: msgs: 2

    i2c_dw_handle_tx_abort: slave address not acknowledged (7bit mode)

    TLVADC_write: i2c_write cnt=0 error=-1

    gx_i2c_open(),find active i2c device,i2c_devid = 0

    +++++gx_i2c_transaction, bus:0, client:0x18, width:1, addr:1, count:1, flag:0

    +++++gx_i2c_transfer, bus:0, client:0x18, width:1

    i2c_dw_xfer: msgs: 2

    i2c_dw_handle_tx_abort: slave address not acknowledged (7bit mode)

    TLVADC_write: i2c_write cnt=0 error=-1

    TLVADC_reset enter

    gx_i2c_open(),find active i2c device,i2c_devid = 0

    +++++gx_i2c_transaction, bus:0, client:0x18, width:1, addr:0, count:1, flag:0

    +++++gx_i2c_transfer, bus:0, client:0x18, width:1

    i2c_dw_xfer: msgs: 2

    i2c_dw_handle_tx_abort: slave address not acknowledged (7bit mode)

    TLVADC_write: i2c_write cnt=0 error=-1

    gx_i2c_open(),find active i2c device,i2c_devid = 0

    +++++gx_i2c_transaction, bus:0, client:0x18, width:1, addr:1, count:1, flag:0

    +++++gx_i2c_transfer, bus:0, client:0x18, width:1

    i2c_dw_xfer: msgs: 2

    i2c_dw_handle_tx_abort: slave address not acknowledged (7bit mode)

    TLVADC_write: i2c_write cnt=0 error=-1

  • We measured the peripheral circuits, power supply 1.8V and 3.3V are available, the data is correct (waveform below, address 0x30), but the device ADC3001 in the 9th bit has no ACK.

    Pls suggest . Btw, I cant paste the initial code in this page.

  • Hi, Piero,

    As you mention, the I²C data sent is correct, so if the ADC3001 si not responding, it is likely that the device is in reset mode or the power supplies are not properly connected to the device. Can you please verify that hardware Reset is High and the power supplies connected to the device are correct?. Can you replicate this behavior across different boards?

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • the reset is high and the power is good. 

    I2C can operate to another device correctly.

    replicate this behavior across different boards, same issue.

  • Piero,

    Thanks for the feedback. It is unclear why your ADC3001 is unable to communicate if RESET is high and the power supplies provided are correct. This is not a normal behavior of the device, maybe there is something else in your circuit which may be interfering with the  ADC. Can you share your schematic so I can look for any issues?

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • pls check the pic for the related sch. There's pull up resistors for I2C interface in other side of the sch.

  • Piero,

    The schematic seems fine, there is no apparent reason for the device to not respond to I²C commands. Do you have a different I²C master to interface with the ADC and see if it responds?. 

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer