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.

Reconfiguring AIC3204 on 5515EVM

Hi all!

I want to use the  5515EVM to test some algorithms using both the AIC3204 and the C5515. I modified the loopback routine that came with the board, but with little success. When I try to change the Sampling Rate from 48kHz to 20kHz by changing the PLL register values, it stops working. I found literally no documentation concerning the connection and Clocks involved. Maybe someone can point me in the right direction.

Many Thanks in Advance,

Best,

Axel

  •  

    Axel,

    1881.tlv320aic3204.pdf

    Attached is the AIC3204 data sheet.

        AIC3204_rset( 0, 0 );      // Select page 0
        AIC3204_rset( 1, 1 );      // Reset codec
        AIC3204_rset( 0, 1 );      // Point to page 1
        AIC3204_rset( 1, 8 );      // Disable crude AVDD generation from DVDD
        AIC3204_rset( 2, 1 );      // Enable Analog Blocks, use LDO power
        AIC3204_rset( 0, 0 );
        /* PLL and Clocks config and Power Up  */
        AIC3204_rset( 27, 0x1d );  // BCLK and WCLK is set as o/p to AIC3204(Master)
        AIC3204_rset( 28, 0x00 );  // Data ofset = 0
        AIC3204_rset( 4, 3 );      // PLL setting: PLLCLK <- MCLK, CODEC_CLKIN <-PLL CLK
        AIC3204_rset( 6, 7 );      // PLL setting: J=7
        AIC3204_rset( 7, 0x06 );   // PLL setting: HI_BYTE(D)
        AIC3204_rset( 8, 0x90 );   // PLL setting: LO_BYTE(D)
        AIC3204_rset( 30, 0x88 );  // For 32 bit clocks per frame in Master mode ONLY
                                   // BCLK=DAC_CLK/N =(12288000/8) = 1.536MHz = 32*fs
        AIC3204_rset( 5, PLLPR );   //PLL setting: Power up PLL, P=1 and R=1
        AIC3204_rset( 13, 0 );     // Hi_Byte(DOSR) for DOSR = 128 decimal or 0x0080 DAC oversamppling
        AIC3204_rset( 14, 0x80 );  // Lo_Byte(DOSR) for DOSR = 128 decimal or 0x0080
        AIC3204_rset( 20, 0x80 );  // AOSR for AOSR = 128 decimal or 0x0080 for decimation filters 1 to 6
        AIC3204_rset( 11, 0x87 );  // Power up NDAC and set NDAC value to 7
        AIC3204_rset( 12, 0x82 );  // Power up MDAC and set MDAC value to 2
        AIC3204_rset( 18, 0x87 );  // Power up NADC and set NADC value to 7
        AIC3204_rset( 19, 0x82 );  // Power up MADC and set MADC value to 2
    

    This is a sample of how to program the AIC3204 for your reference.

    Regards.

  • I'm having similar troubles - I'm trying to understand the process of the various division stages from the system clock to the I2S module in the 5515 to the AIC3204 device.

    I am beginning to understand everything other than how to know what the actual system clock is - I can't find anything the code which makes use of a PLL or anything, so am I to assume it is exactly the same as what is coming out of the oscillator?

    I'm trying to get my foot into the door of understanding this, so any help would be greatly appreciated...

  • Hello!

     

    As far as I have deciphered the Code Example performing various Loopbacks with the 3204, it strictly uses the I2S Clock from the C55 as Master,

    /* I2S settings */
    I2S2_SRGR = 0x0015;
    I2S2_ICMR = 0x0028;    // Enable interrupts
    I2S2_CR   = 0x8012;    // 16-bit word, Master, enable I2C

    and then sets up the 3204 PLL to match 48kHz

    AIC3204_rset(  0, 0x00 );      // Select page 0
    AIC3204_rset( 27, 0x00 );      // BCLK and WCLK is set as i/p to AIC3204(Slave)
    AIC3204_rset(  4, 0x07 );      // PLL setting: PLLCLK <- BCLK and CODEC_CLKIN <-PLL CLK
    AIC3204_rset(  6, 0x20 );      // PLL setting: J=32
    AIC3204_rset(  7, 0 );         // PLL setting: HI_BYTE(D = 0)
    AIC3204_rset(  8, 0 );         // PLL setting: LO_BYTE(D) = 0
    // For 48 KHz sampling
    AIC3204_rset(  5, 0x92 );      // PLL setting: Power up PLL, P=1 and R=2

    thus far I managed to change it to 24 or 12kHz by dividing by 2 or 4 less.

    However, when making the 3204 Master, no I2C Interupt is generated. This would be necessary to use other sampling rates, e.g. 20kHz as I am trying to do..

    Still, any help would be most welcome.

    Axel

  • I am using EVMC5515. In my application I need two input audio sources working simultaneously not independently.  We bought EVMC5515 since it has two stereo inputs.  Unfortunately, we are unable to make it work for the dual input scenario.  If you have any ideas help us please. 

    Single input case everything looks good. Also, I can switch between the inputs by changing the register (52-54) configuration of the AIC3204 Codec.  Here the problem is I need to read the two different samples from the codec to the DSP using the I2S2.  Unfortunately it doesn’t work. Your help.. help… will be much appreciated.  Thanks in advance.

  • Hi Krishna,

    I recommend you to open up a new post to get more attention.

     

    Regards,

    Shankari

  • Hi Krishna,

    I'm not absolutely clear on what you are trying to do here, but I'll start with some details about the AIC3204.

    First of all, it only has 2 ADCs and 2 DACs, so you can only capture 2 different channels and produce 2 different channels (stereo in, stereo out).

    Secondly, it has a built in multiplexor so you can make use of several inputs and outputs (e.g. on a portable device you may want to switch the audio from internal speakers to headphones) - BUT it selectively routes them to only two ADCs/DACs.

    I'm not sure if you were trying to get 4 channels in, or if you simply want to mix 2 inputs into each ADC - I'm not sure if you can mix (I don't think so, but check the data sheet), but you certainly can't get 4 channels.

    I hope this helps...

  • Hi Antony,

    Thank you so much for the reply. 

    1.  We want to read audio samples from two different input sources and we are using EVMC5515.  This EVM has two built in microphones (x2) and  two line inputs.

    2. The two audio sources are connected to two line inputs and the AIC3204 codec is configured to read inputs from two line inputs.

    3. Unfortunately the samples from the second audio source are not reaching the DSP.

    4. The big question is ..

    Using EVM5515, is it possible to use two audio inputs (line inputs)  simultaniously to read samples from two different sources?

    5. Do you have any suggestions on which TIEVMs  to use for proving audio processing algorithms such as dual microphone noise cancellation.

    Thanks in advance

    KP.

     

  • Hi,

    Please don't append your new issues into very old post. In order to get more focus towards your issue, please open up a new thread for the above.

    Thanks & regards,

    Sivaraj K