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.

CFFT with ADC input



When will an updated version of the "C28x Floating Point Unit DSP Library" be available? I'm looking for the CFFT_adc_f32.asm function.

 

Regards,

Chris

  • A revision of the library will be released before the end of the year, however it is unlikely there will be a CFFT_adc_f32 function. Since the adc inputs are real it would be efficient to do a real FFT. Is there a specifc reason you want to run a complex FFT on real data?

    A possible workaround is to take the real adc input, convert to float and save it to a buffer and then immediately append a zero right after as the imaginary part. IN_BUFFER = {ADC(0), 0, ADC(1), 0, ADC(2),0 ..............ADC(N-1),0} and then feed this complex input to the CFFT function

  • I will sample I&Q data from a sensor simultaneously with 2 adc channels. I want to run a complex FFT on complex data.

    Just like the library has a real fft function rfft_adc_f32 for uint adc input, I expect the library to have a complex fft function cfft_adc_f32 function for I&Q uint adc input data from two adc channels.

    I can do something similar to your solution to convert both adc channels in C: IN_BUFFER = {ADC1(0), ADC2(0), ADC1(1), ADC2(1), ADC1(2),ADC2(2) ..............ADC1(N-1),ADC2(N-1)} and feed this to the CFFT function. But I presume the assambly code of the library can convert from uint to float more efficiently.


    Regards,
    Chris

  • The asm routine uses the UI16TOF32 instruction(single cycle) to convert from 16-bit int to float. The compiler should convert a float typecast to this instruction although i imagine there may be overhead moving data in and out of registers. Ill peg the cfft_adc_f32 function as a TODO for the upcoming release but for the moment you are restricted to using the CFFT as you have described.