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: Interfacing TLV320DAC3100 with AM3358

Part Number: TLV320DAC3100


Hi,

I am working with beaglebone green. I need to interface TLV320DAC3100 with it. 

Could someone please walk me through the configuration steps for the same?

Regards,

Ambuj

  • Hi, Ambuj,

    I don't have experience about the beaglebone green, but I can provide information about the TLV320DAC3100.

    When this audio DAC is interfaced with an external controller/processor, you basically need to be able to provide I2C command lines and I2S communication lines for audio streaming.

    Your beaglebone green should be able to provide SCL and SDA lines for I2C communication. In case of the I2S lines, it depends of the configuration you need. If your beaglebone is able to work as master or slave. I suggest to take a look at this document for details:

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

    If you have at least these communication lines, you should be able to control the TLV320DAC3100.

    Please let me know if you have additional questions or comments. We will be glad to help you.

    Best regards,
    Luis Fernando Rodríguez S.

  • Hi Luis,

    Thank you for the reply. 

    I am able to detect my DAC over I2C however not be able to configure it properly.

    Do you have any scripts/ sample settings which I could use for reference.

    Thanks & regards,

    Ambuj Agarwal

  • Hi, Ambuj,

    Yes, we have this initialization script that we use in our evaluation module. It is in format w 30 yy xx; where w is an I2C write command, 30 is the I2C address, yy is the register address and xx is the register data.

    # Key: w 30 XX YY ==> write to I2C address 0x30, to register 0xXX, data 0xYY
    # # ==> comment delimiter
    #
    # The following list gives an example sequence of items that must be executed in the time
    # between powering the # device up and reading data from the device. Note that there are
    # other valid sequences depending on which features are used.
    # 1. Define starting point:
    # (a) Power up applicable external hardware power supplies
    # (b) Set register page to 0
    #
    w 30 00 00
    #
    # (c) Initiate SW reset (PLL is powered off as part of reset)
    #
    w 30 01 01
    #
    # 2. Program clock settings
    # (a) Program PLL clock dividers P, J, D, R (if PLL is used)
    #
    # PLL_clkin = MCLK,codec_clkin = PLL_CLK
    w 30 04 03
    # J = 8
    w 30 06 08
    # D = 0000, D(13:8) = 0, D(7:0) = 0
    w 30 07 00 00
    #
    # (b) Power up PLL (if PLL is used)
    # PLL Power up, P = 1, R = 1
    #
    w 30 05 91
    #
    # (c) Program and power up NDAC
    #
    # NDAC is powered up and set to 8
    w 30 0B 88
    #
    # (d) Program and power up MDAC
    #
    # MDAC is powered up and set to 2
    w 30 0C 82
    #
    # (e) Program OSR value
    #
    # DOSR = 128, DOSR(9:8) = 0, DOSR(7:0) = 128
    w 30 0D 00 80
    #
    # (f) Program I2S word length if required (16, 20, 24, 32 bits)
    # and master mode (BCLK and WCLK are outputs)
    #
    # mode is i2s, wordlength is 16, slave mode
    w 30 1B 00
    # (g) Program the processing block to be used
    #
    # Select Processing Block PRB_P11
    w 30 3C 0B
    w 30 00 08
    w 30 01 04
    w 30 00 00
    #
    # (h) Miscellaneous page 0 controls
    #
    # DAC => volume control thru pin disable
    w 30 74 00
    # 3. Program analog blocks
    #
    # (a) Set register page to 1
    #
    w 30 00 01
    #
    # (b) Program common-mode voltage (defalut = 1.35 V)
    #
    w 30 1F 04
    #
    # (c) Program headphone-specific depop settings (in case headphone driver is used)
    #
    # De-pop, Power on = 800 ms, Step time = 4 ms
    w 30 21 4E
    #
    # (d) Program routing of DAC output to the output amplifier (headphone/lineout or speaker)
    #
    # LDAC routed to HPL out, RDAC routed to HPR out
    w 30 23 44
    #
    # (e) Unmute and set gain of output driver
    #
    # Unmute HPL, set gain = 0 db
    w 30 28 06
    # Unmute HPR, set gain = 0 dB
    w 30 29 06
    # Unmute Class-D, set gain = 18 dB
    w 30 2A 1C
    #
    # (f) Power up output drivers
    #
    # HPL and HPR powered up
    w 30 1F C2
    # Power-up Class-D driver
    w 30 20 86
    # Enable HPL output analog volume, set = -9 dB
    w 30 24 92
    # Enable HPR output analog volume, set = -9 dB
    w 30 25 92
    # Enable Class-D output analog volume, set = -9 dB
    w 30 26 92
    #
    # 4. Apply waiting time determined by the de-pop settings and the soft-stepping settings
    # of the driver gain or poll page 1 / register 63
    #
    # 5. Power up DAC
    # (a) Set register page to 0
    #
    w 30 00 00
    #
    # (b) Power up DAC channels and set digital gain
    #
    # Powerup DAC left and right channels (soft step enabled)
    w 30 3F D4
    #
    # DAC Left gain = -22 dB
    w 30 41 D4
    # DAC Right gain = -22 dB
    w 30 42 D4
    #
    # (c) Unmute digital volume control
    #
    # Unmute DAC left and right channels
    w 30 40 00

    Please let me know if you have additional questions or comments on this.

    Best regards,
    Luis Fernando Rodríguez S. 

  • Hi Luis,

    Thank you for sharing the link to the initialization script. I will try to configure DAC with the help of this and update/follow up.

    Regards,

    Ambuj