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 Examples for Floating point ADC 16-bit

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hello. 

I'm investigating RFFT library and example using TMS320F28379D from C2000WARE folder.

I could find some example related of it such as fpu_rfft.h, header file for rfft example. 

In this header file, following the track of origin file, it shows function named by

"extern void RFFT_adc_f32(RFFT_ADC_F32_STRUCT_Handle hndRFFT_ADC_F32);".

and I can find that function into this assembly "RFFT_adc_f32.asm"file.

In the file, it said  "This function computes a real FFT with 12-bit fixed-point ADC input." 

I couldn't find any function example for 16bit adc and floating point. 

I was wondering if you let me guide the example related 16bit adc and floating point for RFFT calculation.   

Thank you. 

Regads,

  • Hello Miles,

    Looking at the user guide for the FPU DSP library, it seems like the RFFT_adc_f32 function was not made with the intention of reading a 16-bit ADC input, but a 12-bit input. This would explain why there are no examples for it. You can certainly try to use it with a 16-bit input since the parameter for the function, RFFT_ADC_F32_STRUCT_Handle, has the input pointer declared as a unsigned 16-bit pointer. I cannot say for certain if it will work or not because of what's stated in the documentation. You can modify one of the existing examples to use the 16-bit ADC for your device to test it out, as the example will have most of the other settings already initialized properly.

    Best regards,

    Omer Amir

  • Thank you for the guide. 

    One more I need to confirm is "is this example stored in FPU folder really for FPU not the Fixed point?"

    Is it only minor remark error? 

    ;;#############################################################################
    ;;! \file source/fft/RFFT_adc_f32.asm
    ;;!
    ;;! \brief Real FFT with 12-bit ADC input
    ;;! \author C2000
    ;;
    ;; DESCRIPTION:
    ;;
    ;; This function computes a real FFT with 12-bit fixed-point ADC input.
    ;; The input buffer must be aligned to a multiple of the FFT size. If
    ;; it is not aligned then the output buffer will yield invalid results.
    ;; If you do not wish to align the input buffer then use the RFFT_adc_f32u
    ;; function. Using this function will reduce cycle performance of the
    ;; algorithm.

    This remark can be seen RFFT_adc_f32.asm file which is source file for fpu_rfft.h . 

    Thank you. 

  • Hello Miles,

    Looking at the rfft_adc_f32 example, it seems that the it is intended for FPU, not for fixed-point. The example uses a fixed-point input, but computes a floating-point output (seen by the test_golden array of the rfft_adc_f32 example, which is used to validate the results), but it takes in a fixed-point input because the ADC only computes fixed-point values for the results. Hence why the description does not say "computes a real fixed-point FFT", and instead just specifies that the ADC input is fixed-point.

    Best regards,

    Omer Amir

  • Thank you for the reply. 

    Now it is clear that I understand the intention of the author. 

    Best regards,