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.

TMS320F28377D: Complex FFT of FPU library c28x_fpu_dsp_library on TMS320F28377D.

Part Number: TMS320F28377D

We have been working on TI's FPU library "c28x_fpu_dsp_library" on TMS320F28377 dsp.

We have used following functions:
1) CFFT_f32
2) CFFT_f32_mag_TMU0
3) ICFFT_f32

We have used "CFFT_f32" function with 9 stages i.e. 512 point fft.

As mentioned in document of this library, we have provided memory allocation and alignment as follows.

cfftmagBuff     : > RAMGS5,       PAGE = 1
cfftF32Coef    : > RAMGS5,        PAGE = 1
cfftin1Buff       : > RAMGS5,        PAGE = 1, ALIGN = 2048
cfftoutBuff       : > RAMGS5,        PAGE = 1, ALIGN = 2048

We have used above mentioned functions in such a way that all three are executed in same order.

First, we perform forward fft using "CFFT_f32",then we calculate magnitude from it using "CFFT_f32_mag_TMU0".
After that we manipulate the input buffer for "ICFFT_f32" as per our requirement and we perform inverse FFT on that buffer using "ICFFT_f32".

The issue we are facing is sometimes randomly for 1 cycle(of FFT input) interval, the output obtained at end of above mentioned operation get distorted (zero).
That distirtion remains for 1 cycle interval only.

As shown in above, it is output obtained after "ICFFT_f32". The time duration for which it remains zero is 20msec(1 input cycle of fft).

  • Hi Amtech,

    Thank you for your question. Your thread has been assigned to a C2000 expert and should be replied soon.

    Best regards,
    Chen
  • Hi, Chen
    Thank you.
    Is there any update regarding this issue?

    Best regards,
    Shashank
  • Actually CFFT_f32()  function is not called based on interrupt, rather its calling is done in background at every 20mSec.

    CFFT_f32()  function execution time :

    180 uSec with all interrupt disabled.

    324 uSec with only timer0 disabled(interrupt group1 enabled).

    We performed three different test logic as below:

    Test 1:

    We kept timer0 interrupt enabled with no code written in ISR as shown below:

    GpioDataRegs.GPESET.bit.GPIO133 = 1;
    
    CpuTimer0Regs.TCR.bit.TIF = 1;		
    PieCtrlRegs.PIEACK.bit.ACK1 = 1;
    
    //Timer0_ISR_rout();
    
    GpioDataRegs.GPECLEAR.bit.GPIO133 = 1;

    But problem still occurred.

    Test 2:

    We tested it with keeping interrupt group1 enabled but disabling timer0 interrupt before calling of CFFT_f32() function as shown below.

    CpuTimer0Regs.TCR.bit.TIE = 0;					  //Timer interrupt disable.
    GpioDataRegs.GPBSET.bit.GPIO45 = 1;
    
    hnd_cfft->InPtr = CFFTin1Buff;
    hnd_cfft->OutPtr = CFFToutBuff;
    CFFT_f32(hnd_cfft);
    
    GpioDataRegs.GPBCLEAR.bit.GPIO45 = 1;
    CpuTimer0Regs.TCR.bit.TIE = 1;

    After this we did not observe problem occurrence.

    Test 3:

    Then we disabled timer0 interrupt and it's clock, and use EPWM10_INT_ISR(group 3) for our purpose of 200 uSec interrupt as below:

    Uint16 Prev_IER = IER;
    
    GpioDataRegs.GPETOGGLE.bit.GPIO133 = 1;
    
    //Timer0_ISR_rout();
    
    EPwm10Regs.ETCLR.bit.INT = 1;
    PieCtrlRegs.PIEACK.bit.ACK3 = 1;
    
    Prev_IER |= IER_GROUP3;
    IER = Prev_IER;

    But problem still occurred.

    This problem has consumed lots of time and its urgent, so kindly provide guidance as soon as possible.