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.

using DSPF_sp_fftSPxSP in mcaspPlayBk example (Mcasp) issue

I use LCDK6748 board and CCSv5.5  to do speech processing, my design modifies mcaspPlayBk.c program from C6748_StarterWare_1_20_04_01.

When do FFT/IFFT processing using dsplib kernel from dsplib_c674x_3_1_0_0, it generates ‘click’ noise due to interrupt. I found  DSPF_sp_fftSPxSP is not interruptible. Could you please tell me where or how I could get interruptible FFT/IFFT kernel?

my design modifies mcaspPlayBk.c program from C6748_StarterWare_1_20_04_01. It uses EDMA, when buffer is filled, it generates interrupt. Basically it is package in and package out. When used buffer size 256, there is no click sound, when increase package size 512, 1024,… it starts generate bad click noise. Larger package size, worse noise.

Could you please help? this is McASP problem or FFT non-iterruptible problem? how to solve it?

  • Hi Mike,

    Thanks for your post.

    Basically for an N-point FFT, if N=256, single pass implementation would be the best choice, but if you go beyong N-512, 1024 etc., you should go for multi-pass implementation (break-up large FFT's into several sub-FFT's). For more details on this, please refer Sections 3.3.3.1 & 3.3.3.2 the below doc.

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

    Also, i don't think, it could be a interrupt problem, might be some buffer exceptions. Please refer the C67x DSP lib. programmer's reference guide to check the algorithm implementation in your code is compliant to the specified below doc.

    http://www.ti.com/lit/ug/spru657c/spru657c.pdf

    In the above doc, please refer DSPF_sp_fftSPxSP function in page no. 49.

    In addition to the above, please refer the below E2E threads which would give you better clarity:

    http://e2e.ti.com/support/development_tools/compiler/f/343/t/185941.aspx

    http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/t/95526.aspx

    Thanks & regards,

    Sivaraj K

    ------------------------------------------------------------------------------------------------------- 
    Please click the Verify Answer button on this post if it answers your question.
    -------------------------------------------------------------------------------------------------------
  • Thanks Sivaraj!  I re-check  my program and will talk to you again.

    This thread said  DSPF_sp_fftSPxSP is not interruptible,  some TI document says it is interruptible. What is your comment?

    http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/p/12357/318933.aspx#318933

    Best Regards,

    Mike

  • Hi Sivaraj:

    Unfortunately, I have not made it yet.  I tried different ways. From following test, I think mcasp abstract physical layer holds too much time in mcaspPlayBk.c, and does not release time interval quickly from buffer to buffer when dealing with Tx /Rx, so it does not have enought time slot to do process,  Please correct me if I am warong.  If it is, please tel me which parameters in mcasp, I could twist so I can have longer processig time.

     

    The following is my test to show my thought,

    In mcaspPlayBk.c,  when run loopback  without do any processing as TI released, it works,  Then still do loopback as exactly as before, just put real FFT /IFFT before 

     

    BufferTxDMAActivate(lastSentTxBuf, NUM_SAMPLES_PER_AUDIO_BUF,

                                    (unsigned short)parToSend,

                                    (unsigned short)parToLink);

    to comsume computing cycles. it starts have 'click' noise.

     

     

               

    // Real FFT of length N/2

               

    for (j = 0; j < N / 2; j++)

                {

                pRFFT_In[2 * j] = (

    float) buf_rx[2 * j];            //arrange real input sequence to

                pRFFT_In[2 * j + 1] = (

    float) buf_rx[2 * j + 1];    //N/2 complex sequence..

                }

               

    memcpy (pRFFT_InOrig, pRFFT_In, N * sizeof (float));

               

    // Forward FFT Calculation using N/2 complex FFT..

                DSPF_sp_fftSPxSP (N / 2, pRFFT_In, twiddle, pTemp, brev, rad, 0, N / 2);

               

    // FFT Split call to get complex FFT out of length N..

                FFT_Split (N / 2, pTemp, A, B, pRFFT_Out);

               

    // Inverse FFT calculation

               

    // IFFT Split call to get complex Inv FFT out of length N..

                IFFT_Split (N / 2, pRFFT_Out, A, B, pTemp);

               

    // Inverse FFT Calculation using N/2 complex IFFT..

                DSPF_sp_ifftSPxSP (N / 2, pTemp, twiddle, pRFFT_InvOut, brev, rad, 0, N / 2);

  • Hi Sivaraj;

    I wonder if you had a chance to look at my issue.

    Thanks,

    Mike

  • Mike,

    Ideally, as per TI doc, it is absolutely interruptible but there are few exceptions/known issues.

    FYI, for our newer devices (674x core) we have released an updated DSPLIB:

    http://wiki.davincidsp.com/index.php?title=C674x_DSPLIB

    Please go through the below E2E threads for the known issues on some DSP Library functions:

    There are attached IIR kernels (672xFilters.zip) written for c672x which might be useful in the below E2E thread (#12368)

    http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/t/12368.aspx

    http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/t/48070.aspx

    Note: You need to disable interrupts before the DSP library function calls mentioned below and restore interrupts after, failing to do so, it will crash the application

    • DSPF_sp_minval
    • DSPF_sp_maxval
    • DSPF_sp_ifftSPxSP
    • DSPF_sp_dotprod
    • DSPF_sp_fir_gen
    •  DSPF_sp_fir_r2

    Thanks & regards,

    Sivaraj K

    ------------------------------------------------------------------------------------------------------- 

    Please click the Verify Answer button on this post if it answers your question.
    -------------------------------------------------------------------------------------------------------