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.

set sampling rate AIC3204

Other Parts Discussed in Thread: TLV320AIC3204, TMS320C5515

Hello,

I would want to know how can I configure the AIC3204 to set the sampling rate to selected sampling rates as 24Khz or 32 KHz.

I am working with BCLK and WCLK as inputs.

From a configuration working at 48Khz, I tried to change values of divisors to get this sampling frequencies and I only get loud noise.

Thanks!

  • Hi, Albert,

    I believe there is a PLL configuration tool in the GUI for the EVM. Can you download it and check to see if it can help you with the clocking?

    -d2

  • I did it, but in fact I don't know how it works. Every time I connect the target and run the GUI, it says that EVM is disconnected.

  • Hi, Albert,

    Sorry that you are having troubles...

    Let me ask my colleague to walk you thru the steps.

    -d2

  • Hi Albert,

    Do you use our TLV320AIC3204_54_RHB_EVM board? After you connected the EVM board to your PC's USB port, what shows in your PC Device Manager? Is it the name "USB-miniEVM" under Sound, video and game controllers?

    Thanks.

  • No, I don't. I am using TMX320C5515 EVM.

  • Hi Albert,

    You mentioned that "From a configuration working at 48Khz, I tried to change values of divisors to get this sampling frequencies and I only get loud noise." Have you made it work fine at 48kHz sample rate? 

    Thanks.

  • Hi Albert,

    Changing the sample rate, you can just change below parameters:

    Here it is assumed that the Master Clock input for AIC3204 is 12.288MHz, using PLL as the Clock_IN for Codec.

    BTW:

    It is better that you can provide your configuration scripts or code for AIC3204 Clocks.

    Thanks!

  • I am working with BCLK and WCLK as inputs. PLL Clock as codec Clock in and BCLK as PLL Clock In.

    Thanks! 

  • Hi Albert,

    It is easy to configure this with our EVM GUI software, you can download it from AIC3204 EVM page, changing the PLL clock source to BCLK.

    The link is here: http://www.ti.com/tool/tlv320aic3204evm-k

    Thanks!

  • I have already downloaded it. However, as I said I don't know how it works. It doesn't detect my board TMS320C5515 EVM.

  • Hi Albert,

    What you mean that "It doesn't detect your board TMS320C5515 EVM"? Have you used C5515 to provide the Clocks AIC3204 needed? Can you capture some scope pictures for I2S signals generated by C5515 and post them here?

    What's your complete configuration code for AIC3204 running on C5515?

    Thanks. 

  • Hi There,

    I am using C5515EVM. I am trying to read the audio samples from the Stereo In1 and Stereo In2 simultaniously.

    The two inputs are working fine if I read the samples from one interrupt source at a time but not when used at the same time as given below. I want to read the data from the two independent audio sources connected to the Stereo In1 and Stereo In 2 respectively. When I use a loopback test of the received audio the second source is not reaching the DSP.  Currently I am stuck don't know what to do, your help is much appreciated.

    Thanks in advance

    Please find the code below:

    for ( ;; ) {

    /* Read Digital audio */

    while((Rcv & I2S2_IR) == 0);   // Wait for receive interrupt to be pending

            data1 = I2S2_W0_MSW_R;

            data2 = I2S2_W1_MSW_R;

    data0 = stereo_to_mono (data1, data2);

    while((Rcv & I2S2_IR) == 0);   // Wait for receive interrupt to be pending

    data3 = I2S2_W0_MSW_R;

    data4 = I2S2_W1_MSW_R;

    data = stereo_to_mono (data3, data4);

    }

    AIC3204 initialization is given below:

        AIC3204_rset(  0, 0x00 );    

        AIC3204_rset(  1, 0x01 );    

        AIC3204_rset(  0, 0x01 );    

        AIC3204_rset(  1, 0x08 );    

        AIC3204_rset(  2, 0x00 );    

        AIC3204_rset(  0, 0x00 );    

        AIC3204_rset( 27, 0x00 );    

        AIC3204_rset(  4, 0x07 );    

        AIC3204_rset(  6, 0x20 );    

        AIC3204_rset(  7, 0 );       

        AIC3204_rset(  8, 0 );       

        AIC3204_rset(  5, 0x92 );    

        AIC3204_rset( 13, 0x00 );    

        AIC3204_rset( 14, 0x80 );    

        AIC3204_rset( 20, 0x80 );    

        AIC3204_rset( 11, 0x84 );    

        AIC3204_rset( 12, 0x82 );    

        AIC3204_rset( 18, 0x84 );    

        AIC3204_rset( 19, 0x82 );    

        AIC3204_rset(  0, 0x01 );    

        AIC3204_rset( 14, 0x08 );    

        AIC3204_rset( 15, 0x08 );    

        AIC3204_rset(  0, 0x00 );    

        AIC3204_rset( 64, 0x02 );    

        AIC3204_rset( 65, 0x08 );    

        AIC3204_rset( 63, 0xd4 );    

        AIC3204_rset(  0, 0x01 );    

        AIC3204_rset( 18, 0x00 );    

        AIC3204_rset( 19, 0x00 );    

        AIC3204_rset(  9, 0x0C );    

        AIC3204_rset(  0, 0x00 );    

        EVM5515_wait( 500 );       

        AIC3204_rset(  0, 0x01 );    

        AIC3204_rset( 52, 0x30 );    

        AIC3204_rset( 55, 0x30 );    

        AIC3204_rset( 52, 0x0C );   

        AIC3204_rset( 55, 0x0C );   

        AIC3204_rset( 54, 0x03 );    

        AIC3204_rset( 57, 0xC0 );    

        AIC3204_rset( 59, 0x0f );    

        AIC3204_rset( 60, 0x0f );    

        AIC3204_rset(  0, 0x00 );    

        AIC3204_rset( 81, 0xc0 );    

        AIC3204_rset( 82, 0x00 );    

        EVM5515_wait( 200 );

    // Wait

      

    /* I2S settings */

        I2S2_SRGR = 0x0015;

        I2S2_ICMR = 0x0028;  

    // Enable interrupts

        I2S2_CR   = 0x8012;     

    // Unmute Left and Right ADC

  • When you put this:

    AIC3204_rset( 52, 0x0C );   

    you are selecting which line is working. The input is connected to audio codec TLV320AIC4304. Sample are digitized and send to C5515 microprocessor using I2S bus.

    I think that what you are trying to do is not possible at least with this configuration. You can check the codec settings and propertis from TI datasheet.