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.

FFT Lib for TM4C123

Hello, I am Sky.

I am looking for a FFT library which is available for 4096 pt.

There are an official FFT library for TI DSP, I couldn't find an official one for TM4C family.

I found nice samples as [users.ece.utexas.edu/.../], but it only supports 64,256,1024 pt.

Could you share FFT source code (4096pt) for TM4C123?

Thanks in advance.

-Sky

  • There is a DSP_Lib as part of CMSIS from ARM, running on all Cortex M devices, available in full source. The latest version(s) support up to 4096 points as well.

    This might require some tweaking, TI's support for CMSIS is rather limited.

  • Hello Sky,

    To add to f.m.'s post, the link for the application note is as follows

    www.ti.com/.../spma041g.pdf
  • Thanks guys!

    When I tried the document (spma041g.pdf), it works really well.
    However, it is based on FPU operation, then it requires a lot of memory space.

    For example,
    2048pt => input: 2048, output:1024 (float32_t) => 12Kbyte
    4096pt => input: 4096, output:2048 (float32_t) => 24Kbyte

    Thus, I should use 2048pt FFT because of its tight memory capacity.

    Thanks.

    -Sky

  • Hello Sky,

    You can switch the floating point unit processing by changing the define of

    __FPU_PRESENT=1 to __FPU_PRESENT=0
  • Perfect!
    Thank so much Amit Ashara!

    I applied the command you mentioned.

    Moreover, I changed my FFT code from f32 (float32_t) to q15 (int16_t).

    Here is my code.



    uint32_t fftSize = 2048;
    int16_t fftInput[4096];
    int16_t fftOutput[2048]

    arm_cfft_radix2_instance_q15 S1;

    /* Initialize the CFFT/CIFFT module */
    arm_status tt = arm_cfft_radix2_init_q15(&S1, fftSize, 0, 1);

    if ( arm_cfft_radix2_init_q15(&S1, fftSize, 0, 1) != ARM_MATH_SUCCESS )
    return 0;
    /* Process the data through the CFFT/CIFFT module */
    arm_cfft_radix2_q15(&S1, fftInput);
    /* Process the data through the Complex Magnitude Module for calculating the magnitude at each bin */
    arm_cmplx_mag_q15(fftInput, fftOutput, fftSize);


    It consumes less memory space than before.

    -Sky