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.

TMS320F28379D: RFFT TMU0 phase bad calculation

Part Number: TMS320F28379D

Hello guys, i have FFT in CLA. After task completed i arrange buffer to:
Buf[0] = Real[0]
Buf[1] = Real[1]
...
Buff[N-2] = Imag[2]
Buff[N-1] = Imag[1]

FFT_SIZE = 1 << FFT_STAGE
FFT_STAGE = 10U
Buf[FFT_SIZE];

After that i run RFFT_f32_mag_TMU0 (all good), and then RFFT_f32_phase_TMU0. I noticed sometimes the angles at 3 and 4 are wrong, so I was looking for the cause... When I change the real / imag part for 3 or 4, the calculation also changes the 4 or 3 angle.. Only does it at these two angles.

Video:
https://drive.google.com/file/d/1tWwsjkUmBI2pBkJUr686T2I4DwxaFsnR/view?usp=sharing

Maybe it's just some "nonsense". Can you help me?

- Marek

  • Hi,

    Can you provide the input vector and expected output? Can you verify that all the fft tables are properly included?

    -Shantanu

  • Hi, there is my linker: 0451.2837xD_FLASH_lnk_cpu1.rar 

    Im using RFFTF32Coef for twiddles - RAMGS1 (I tried twiddles RFFT_f32_twiddleFactors located in RAMGS_14_15 (FPUfftTables), but same behavior. I have also CLA1fftTables for CLA in LS_4_5 maybe it is affected in some way 

        RFFT_f32_setInputPtr(rfftHandleCla, IOBuffer);
        RFFT_f32_setOutputPtr(rfftHandleCla, IOBuffer2);
        RFFT_f32_setMagnitudePtr(rfftHandleCla, RFFTmagBuff);
        RFFT_f32_setPhasePtr(rfftHandleCla, RFFTphaseBuff);
        RFFT_f32_setStages(rfftHandleCla, FFT_STAGES);
        RFFT_f32_setFFTSize(rfftHandleCla, FFT_SIZE);
        
        RFFT_f32_setTwiddlesPtr(rfftHandleCla, RFFTF32Coef);
        RFFT_f32_sincostable(rfftHandleCla);


    My program example:
        RFFT_f32_setOutputPtr(rfftHandleCla, arrangeFFTBuf); //use reworked buffer from CLA
        RFFT_f32_setMagnitudePtr(rfftHandleCla, fftInBuf); //Work OK
        RFFT_f32_mag_TMU0(rfftHandleCla); //Work OK
        
        RFFT_f32_phase_TMU0(rfftHandleCla); //bad 3/4 angle (as in video)
        
        //In video there is TEST SECTION


    calc Factors:
    0.707106769 - [0]
    0.707106829 -  [1]
    0.0
    1.0
    0.923879564
    0.382683456
    0.707106769
    0.707106829
    0.382683456
    0.923879564
    0.0
    1.0
    0.980785251
    0.195090324
    0.923879564

  • Little update:

    It looks like it works (maybe the problem has moved to higher numbers).. Previously, I had a PhaseBuffer of 512. (RFFT/2). I raised it to 1024 and i put it to RAMGS_14_15 .. all good

  • Marek,

    Is the issue resolved? Are you still facing issues?

    -Shantanu

  • Issue is resolved, I change buffer size to 1024 and the problem disappeared.