Other Parts Discussed in Thread: C2000WARE
Hi,
I'm trying to implement an FFT using code based on the example in 2837x_vcu2_cfft_1024.
As a starting point I have copied the main.c flow of execution but the results are suspicious, so I have a few questions:
1. During set-up of the CFFT descriptor, in your example pTwiddleFactors isn't set. If this should be set then how? (there is an extern reference to vcu2_twidddleFactors in vcu2_fft.h)
2. In documentation I can't find any reference to how to use the CFFT descriptor element twiddleSkipStep. It is declared as int16_t, but how do I choose a value for this?
3. I am using the same data_input.h and data_output.h files as per the example, and in Debug I can see this data appear in buffer1Q15, so it looks like it is available for the FFT to process.
4. initiSystemClocks() and initPie() are already called in the set-up before I call the FFT, and so is omitted here.
5. I am following the sequence:
a) initialise buffers
b) set up CFFT descriptor
c) execute the CFFT_init1024Pt(), CFFT_run1024Pt() and CFFT_unpack() functions in that order.
6. The output buffer (buffer2Q15) contains a repeated sequence of values such as 5,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0, ... (I suspect this may be a clue to what I'm doing wrong and/or not doing!)
Does any of this make sense to you? Does it suggest to you a particular problem and solution?
As a side-issue, Code Composer Studio complains about the code not being MISRA-compliant, so once this runs successfully I shall need to improve the code quality somewhat.
TIA for your help.