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.

CCS/CC3200: Issue with I2S data out

Part Number: CC3200
Other Parts Discussed in Thread: TLV320AIC3106

Tool/software: Code Composer Studio

Hi,

My application needs to receive and send data to and from an audio codec TLV320AIC3106. I have configured I2S in CPU mode and could successfully read audio data from codec but unable to send data to codec. I probed an oscilloscope and there is no signal in I2S data out line. When I use I2SDataPut(I2S_BASE,I2S_STS_XDATA,ulDummy) the program gets stuck. Below is the I2S initialization code and I2S  handler code and pinmux configuration. I am also attaching the schematic for you guys to make sure the pinmux configuration is correct.

void I2SIntHandler(void)
{
unsigned long ulStatus;

// Get the interrupt status
ulStatus = I2SIntStatus(I2S_BASE);
// Check if there was a Transmit interrupt; if so write next data into the tx buffer and acknowledge
// the interrupt
if(ulStatus & I2S_STS_XDATA)
    {
   I2SDataPutNonBlocking(I2S_BASE,I2S_DATA_LINE_0,ulDummy);  // replaced ulDummy with 0x55 to see whether anything is coming,but no result
    I2SIntClear(I2S_BASE,I2S_STS_XDATA);
    }
// Check if there was a receive interrupt; if so read the data from the rx buffer and acknowledge
// the interrupt
if(ulStatus & I2S_STS_RDATA)
{

    I2SDataGetNonBlocking( I2S_BASE, I2S_DATA_LINE_1,&ulDummy);
    I2SIntClear(I2S_BASE,I2S_STS_RDATA);
    audio_data_buffer[i2s_handler_index++]=ulDummy;
    if(i2s_handler_index>=320){  // checking for 320 samples
        i2s_handler_index=0;
        i2sdatarecvdflag=1;
    }

}
}


/*
//Initialize the I2S peripheral
*/
void AudioCaptureRendererConfigure(unsigned char bitsPerSample,
                                    unsigned short bitRate,
                                    unsigned char noOfChannels,
                                    unsigned char RxTx,
                                    unsigned char dma)
{

    unsigned long	bitClk;
    // Initialising the McASP
    //
    MAP_PRCMPeripheralClkEnable(PRCM_I2S,PRCM_RUN_MODE_CLK);
    PRCMPeripheralReset(PRCM_I2S);
    bitClk = bitsPerSample * bitRate * noOfChannels;
    dma=1;

    if(bitsPerSample == 16)
        {
            MAP_PRCMI2SClockFreqSet((bitClk*10)); //(bitClk*10));//512000);  (I2S_BASE,(bitClk*10),bitClk,I2S_SLOT_SIZE_16|
            MAP_I2SConfigSetExpClk(I2S_BASE,(bitClk*10),bitClk,I2S_SLOT_SIZE_16| I2S_PORT_CPU); //(I2S_BASE,512000,bitClk,I2S_SLOT_SIZE_16|
        }


    MAP_I2SIntRegister(I2S_BASE, I2SIntHandler);
      MAP_I2SIntEnable(I2S_BASE,I2S_INT_XDATA);
    MAP_I2SIntEnable(I2S_BASE,I2S_INT_RDATA);

    if(RxTx == I2S_MODE_RX_TX)
    {
        I2SSerializerConfig(I2S_BASE,I2S_DATA_LINE_1,I2S_SER_MODE_RX,
                                 I2S_INACT_LOW_LEVEL);
    }

    if(RxTx & I2S_MODE_TX)
    {
       I2SSerializerConfig(I2S_BASE,I2S_DATA_LINE_0,I2S_SER_MODE_TX,
                                 I2S_INACT_LOW_LEVEL);
    }
    if(RxTx == I2S_MODE_RX_TX)
    {
        MAP_I2SEnable(I2S_BASE,I2S_MODE_TX_RX_SYNC);
    }
    else if(RxTx & I2S_MODE_TX)
    {
        MAP_I2SEnable(I2S_BASE,I2S_MODE_TX_ONLY);
    }


}

void
PinMuxConfig(void)
{

// Initialising the McASP
    //
    MAP_PRCMPeripheralClkEnable(PRCM_I2S,PRCM_RUN_MODE_CLK);
    PRCMPeripheralReset(PRCM_I2S);
    
  MAP_PinTypeI2S(PIN_64, PIN_MODE_7); //PIN_MODE_7


    MAP_PinTypeI2S(PIN_62, PIN_MODE_13);


    MAP_PinTypeI2S(PIN_63, PIN_MODE_7);

 
    MAP_PinTypeI2S(PIN_50, PIN_MODE_6); 

}


Thanks & regards,

Vishnu Pradeep