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.

TLV320DAC3100: TLV320DAC3100: Interfacing TLV320DAC3100 with AM3358

Part Number: TLV320DAC3100
Other Parts Discussed in Thread: AM3358, ,

Hi,

For the related query, i am having two below questions

1. We tried to run the attached tool and script. But not getting any respective output either in terms of any o/p print or any audio sound.

So requested to provide the exact steps to use attached tool and script. 

2. Also we tried to connect the TLV320DAC3100IRHBR with AM3358 processor and in the i2cdetect it's showing  address as 0x18 so just want to make sure if our connections are ok or not. 

Because as in the given script, the address mentioned as 0x30. So getting confuse about these two addresses.

Kindly resolve my queries.

Thanks!!!

Best Regards,

Yash Kishore

  • Hi, Kishore-san,

    Welcome to E2E and thank you for your interest in our products!

    Could you reattach the tool and script that you referred to? I was not able to see it in your previous post.

    Regarding your question about the I2C communication, it depends of the format that your tool uses to read the I2C address. In our TI tools, the correct I2C address would be 0x30 (0011 000x). However, in other tools, the LSB is not considered, so the address would be shifted to the right, resulting in 0x18 (001 1000).

    Best regards,
    Luis Fernando Rodríguez S.

  • Hi Luis,

    Thanks for your response.

    Please find the attached tool and script file which you had shared in the previous thread.

    Also, I am sharing that link.

    https://e2e.ti.com/support/audio/f/6/t/889265

    Thanks & Regards,

    Yash Kishore

  • Hi, Kishore-san,

    This script that I provided is directly used on our TLV320DAC3100EVM-U:

    http://www.ti.com/tool/TLV320DAC3100EVM-U

    The script is in format w 30 xx yy, being 'w' the I2C write command, '30' the I2C address, 'xx' the register address and 'yy' the register data. All of them in hex format.

    If you would like to use this script in a different circuit, you would need to adapt the script code to the correct syntax that your end equipment will use. For example, in your application, it seems that 0x18 is the I2C address for the device (which is also correct).

    Best regards,
    Luis Fernando Rodríguez S.

  • Hi

    We have tried to run given script in our linux environment. But could not received any audio related changes in our attached speaker with TLV.

    Please find the attached log from file. 

    Now we want to know how can we configure DAC IC(TLV) to receive Audio from it?

    Also let us know if we need to configure further any thing related to i2s line.

    Thanks

    i2c_scrpt_log.txt
    ubuntu@arm:~$ i2cdetect -y -r  2
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:          -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
    ubuntu@arm:~$ i2cdetect -y -r  2
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:          -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x00 0x00
    Value 0x00 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x01 0x01
    Warning - data mismatch - wrote 0x01, read back 0x00
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x04 0x03
    Value 0x03 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x06 0x08
    Value 0x08 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x07 0x00
    Value 0x00 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x05 0x91
    Value 0x91 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x0B 0x88
    Value 0x88 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x0C 0x82
    Value 0x82 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x0D 0x00
    Value 0x00 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x1B 0x00
    Value 0x00 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x3C 0x0B
    Value 0x0b written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x00 0x08
    Value 0x08 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x01 0x04
    Value 0x04 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x00 0x00
    Value 0x00 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x74 0x00
    Value 0x00 written, readback matched
    ubuntu@arm:~$
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x00 0x01
    Value 0x01 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x1F 0x04
    Value 0x04 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x21 0x4E
    Value 0x4e written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x23 0x44
    Value 0x44 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x28 0x06
    Value 0x06 written, readback matched
    ubuntu@arm:~$
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x29 0x06
    Value 0x06 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x2A 0x1C
    Value 0x1c written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x1F 0xC2
    Warning - data mismatch - wrote 0xc2, read back 0xc6
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x20 0x86
    Value 0x86 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x24 0x92
    Value 0x92 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x25 0x92
    Value 0x92 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x26 0x92
    Value 0x92 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x00 0x00
    Value 0x00 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x3F 0xD4
    Value 0xd4 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x41 0xD4
    Value 0xd4 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x42 0xD4
    Value 0xd4 written, readback matched
    ubuntu@arm:~$ i2cset -y -r 2 0x18 0x40 0x00
    Value 0x00 written, readback matched
    ubuntu@arm:~$
    
      

  • Hi, Yash,

    Excuse me, is there a way you could get the entire TLV320DAC3100 registers settings of your linux environment? This could give us a better approach to the issue and understand why you are not receiving I2S data correctly.

    Thank you.

    Best regards,
    Luis Fernando Rodríguez S.

  • Hi Luis,

    As in our Linux environment, we are using command line based i2cset command. Which can assign the given value to the given register for the I2C device.

    There could be a better approach to access those registers. I am using the command line one because of the ease of access.

    If you want me to use another approach please let me know. As I am not Linux expert.

    Here, I am attaching the sequence of i2cset commands,which I have used for TLV320DAC3100 over the I2C access.

    Thanks.

    Best Regard,

    Yash Kishore

    TLV I2C_Write.txt
    i2cset -y -r 2 0x18 0x00 0x00
    i2cset -y -r 2 0x18 0x01 0x01
    i2cset -y -r 2 0x18 0x04 0x03
    i2cset -y -r 2 0x18 0x06 0x08
    i2cset -y -r 2 0x18 0x07 0x00
    
    i2cset -y -r 2 0x18 0x05 0x91
    i2cset -y -r 2 0x18 0x0B 0x88
    i2cset -y -r 2 0x18 0x0C 0x82
    i2cset -y -r 2 0x18 0x0D 0x00
    
    i2cset -y -r 2 0x18 0x1B 0x00
    i2cset -y -r 2 0x18 0x3C 0x0B
    i2cset -y -r 2 0x18 0x00 0x08
    i2cset -y -r 2 0x18 0x01 0x04
    i2cset -y -r 2 0x18 0x00 0x00
    i2cset -y -r 2 0x18 0x74 0x00
    
    i2cset -y -r 2 0x18 0x00 0x01
    i2cset -y -r 2 0x18 0x1F 0x04
    i2cset -y -r 2 0x18 0x21 0x4E
    i2cset -y -r 2 0x18 0x23 0x44
    i2cset -y -r 2 0x18 0x28 0x06
    
    
    i2cset -y -r 2 0x18 0x29 0x06
    i2cset -y -r 2 0x18 0x2A 0x1C
    i2cset -y -r 2 0x18 0x1F 0xC2
    i2cset -y -r 2 0x18 0x20 0x86
    i2cset -y -r 2 0x18 0x24 0x92
    i2cset -y -r 2 0x18 0x25 0x92
    i2cset -y -r 2 0x18 0x26 0x92
    
    i2cset -y -r 2 0x18 0x00 0x00
    i2cset -y -r 2 0x18 0x3F 0xD4
    i2cset -y -r 2 0x18 0x41 0xD4
    i2cset -y -r 2 0x18 0x42 0xD4
    i2cset -y -r 2 0x18 0x40 0x00
    
    
    
    

  • Hi, Yash,

    I have some questions regarding this issue.

    - Do you get the ACK bit in the I2C lines when you send a command? This is to ensure that the I2C communication was successful.

    - Do you see any difference in the common-mode level of the headphone lines or in the Class-D activity before and after configuring the TLV320DAC3100 registers?

    - Which clocks (MCLK, BCLK, WCLK) are using in your system? Do you have their frequency values?

    Best regards,
    Luis Fernando Rodríguez S.

  • Hi Luis,

    Below are the answers of your questions:

    your Query: Do you get the ACK bit in the I2C lines when you send a command? This is to ensure that the I2C communication was successful.

    My Ans. Yes, I receive ACK bit when I send I2C detect command. It shows address 0x18 on console screen.

    ubuntu@arm:~$ i2cdetect -y -r 2
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --

    Your Query: Do you see any difference in the common-mode level of the headphone lines or in the Class-D activity before and after configuring the TLV320DAC3100 registers?

    My Ans: I will check the level difference of class D amplifier and share it ASAP.

    Your Query: Which clocks (MCLK, BCLK, WCLK) are using in your system? Do you have their frequency values?

    My Ans:  For the clock, I guess it's BCLK which my have used in our system. For your reference I am also attaching the clock pin snapshot. 

    Let me know if you required any further information.

    Thanks & Regards,

    Yash Kishore

  • Hi Luis,

    Below are the answers of your questions:

    your Query: Do you get the ACK bit in the I2C lines when you send a command? This is to ensure that the I2C communication was successful.

    My Ans. Yes, I receive ACK bit when I send I2C detect command. It shows address 0x18 on console screen.

    ubuntu@arm:~$ i2cdetect -y -r 2
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --

    Your Query: Do you see any difference in the common-mode level of the headphone lines or in the Class-D activity before and after configuring the TLV320DAC3100 registers?

    My Ans: I will check the level difference of class D amplifier and share it ASAP.

    Your Query: Which clocks (MCLK, BCLK, WCLK) are using in your system? Do you have their frequency values?

    My Ans:  For the clock, I guess it's BCLK which my have used in our system. For your reference I am also attaching the clock pin snapshot. 

    Let me know if you required any further information.

    Thanks & Regards,

    Yash Kishore

  • Hi Luis,

    I have captured the waveform from CRO when I enters the commands which you have given.(snap shots are attached here)

    By default there were no sound coming from the speakers but the moment, We ran the the sequence of commands, there a hissing sound starts coming from the DAC. We are also trying to control the volume level via writing on 0x74 register as mentioned in the datasheet, Can you confirm that we are using the write register for the volume control and range of the value?

    Also, let us know how to play a sound file over the I2S line.

    Thanks & Regards,

    Yash Kishore

  • Hi, Yash,

    I noticed that you mentioned that you are using a BCLK, but in order to have the I2S data fully transmitted, you also need at least of a WCLK. In addition, the registers settings that you shared require of a MCLK too.

    Could you send me some captures of the BCLK, WCLK and MCLK you are using? If the MCLK is not used, I think we will need to modify the registers settings.

    Best regards,
    Luis Fernando Rodríguez S.

  • Hi Luis,

    I am using All clocks MCLK, BCLK and WCLK. I'll share the captures of all clock ASAP.Snaps.zip

    You had also asked about the speaker common mode signals. I have captured the waveform from CRO when I enters the commands which you have given.(snapshots are attached here)

    By default there were no sound coming from the speakers, but the moment we ran the the sequence of commands, there a hissing sound starts coming from the DAC. We are also trying to control the volume level via writing on 0x74 register as mentioned in the datasheet, Can you confirm that we are using the write register for the volume control and range of the value?

    Also, let us know how to play a sound file over the I2S line.

    Thanks & Regards,

    Yash Kishore

  • Hi, Yash,

    Thank you for sharing the speaker common mode signals. This means that the I2C writing is correct. The common mode signals can be only enabled via I2C. So, the registers can be written correctly.

    So, we need to focus on the I2S lines now. We need to ensure that all the clocks BCLK, WCLK and MCLK are in the correct protocol (if not, we will need to adjust the registers configuration). Or we need to verify the PLL settings. 

    I will wait for the clocks captures in order to verify if they are set correctly.

    Best regards,
    Luis Fernando Rodríguez S.

  • Hi Luis,

    I checked in CRO, but not getting any signal for MCLK, BCLK and WCLK clocks in TLV320DAC3100.

    As per the connection, clock lines are already connected as mentioned earlier.

    Kindly let us know we need to configure anything for I2S also.

    Thanks & Regards,

    Yash Kishore

  • Hi Luis,

    Gentle reminder.

    I am waiting for your kind response.

    Thanks & Regards,

    Yash Kishore

  • Hi, Yash,

    In order to get audio at the output, you need to define if your TLV320DAC3100 will be used in master or slave mode. If you use this device to generate the WCLK and BCLK I2S clocks, a MCLK will be enough (master mode). Otherwise, if your external processor is the one that sends the I2S clocks (slave mode), the MCLK is not strongly needed. I recommend to take a look at this document for more details:

    https://www.ti.com/lit/an/slaa469/slaa469.pdf

    Best regards,
    Luis Fernando Rodríguez S.

  • Hi Luis,

    I have to configure TLV320DAC3100 as a slave device only. Now, my understanding is that we need to configure WCLK and BCLK at master side. Correct me if I am wrong and also Let me know in Linux side how exactly I have to configure.

    Thanks & Regards,

    Yash Kishore

  • Hi, Yash,

    You are correct, you would need to configure WCLK and BCLK at the master side. We actually don't support the linux side so I cannot provide details about it. I just recommend to have a BCLK = WCLK x (# channels) x (data length). This will allow a correct I2S data transmission.

    Best regards,
    Luis Fernando Rodríguez S.

  • Hi Luis,

    We have tried to configure I2S for the DAC, but didn't get any response from DAC IC. We have doubt whether we are going on the right direction or not. 

    Can you share any reference to configure I2S from any other environment?

    Thanks & Regards,

    Yash Kishore

  • Hi Luis,

    As attached log, two register settings are getting failed. Can we ignore this failure or it is actually required?

    Thanks & Regards,

    Yash Kishore