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.

ADC on the TMDSPDK6727

Can you please guide me in how to make the audio codec interact with the DSP board (TMDSPDK6727 or PADK)? Please direct me as to where I can find some literature or some how-to guides on it. 

I have been looking at the 'analog loopback' project files that have been provided with the board. I only want to use one channel giving it analog input. I understand that DMAX is memory on the DSP board and the buffers are being created on there, but I am unable to fully understand the code. For example I don't understand: how to turn-off all the channels except one, how often is the DMAX buffer updated? How can I process the signal?

I have used the C6713 which has a readSample and writeSample in its library. Is there some sort of function for the PADK?

Please provide me any help you can in this regard!

Thank you 

  • Can you please explain this code snippet that has been written in the AnalogLoopback.pjt

    interrupt void dmax_isr( void )
    {
        unsigned PP;
        volatile unsigned *GPTransferEntry;
        static int *pDac = (int *)dmaxDacBuffer[0];
        static int *pAdc = (int *)dmaxAdcBuffer[0];

        // Verify if a DAC transfer completed
        if( hDmaxDac->regs->DTCR0 & (1<<DAC_TCC) )
        {
            hDmaxDac->regs->DTCR0 = (1<<DAC_TCC);

            // Save the pointer of the audio buffer that has just been transmitted
            GPTransferEntry  = (unsigned *)&hDmaxDac->regs->HiPriorityEventTable;
            GPTransferEntry += ((*(hDmaxDac->hiTableEventEntryPtr)>>8)&0x07F);
            PP = GPTransferEntry[2] >> 31;        
            pDac = (int *)dmaxDacBuffer[!PP];
        }
        // Verify if a ADC transfer completed
        if( hDmaxAdc->regs->DTCR0 & (1<<ADC_TCC) )
        {
            hDmaxAdc->regs->DTCR0 = (1<<ADC_TCC);

            // Save the pointer of the audio buffer that has just been filled
            GPTransferEntry  = (unsigned *)&hDmaxAdc->regs->HiPriorityEventTable;
            GPTransferEntry += ((*(hDmaxAdc->hiTableEventEntryPtr)>>8)&0x07F);
            PP = GPTransferEntry[2] >> 31;        
            pAdc = (int *)dmaxAdcBuffer[!PP];
           
            // Copy new samples in transmit buffer
            memcpy( pDac, pAdc, FRAME_SIZE*NUM_CHANNEL*2*sizeof(int) );
        }
    }

     

    I am trying to only use channel 1 on one of the ADC. Should the pAdc always only have signals corresponding to Channel 1 since I only have that port connected. And saving the pAdc to an array on every interrupt should give me an array of samples of my signal?

    I would really appreciate your response!

    Thank you