Other Parts Discussed in Thread: MSP430FR6047
Hello,
I followed the DSP Library example 'transform_ex1_fft_fixed_q15' to implement the use of the fast fourier transformation in my code which is supposed to take measurements and calculate the FFT (with the goal of getting the envelope by Hilbert transformation).
So far everything works fine, but only with a sample size of 128. After flashing it says: 'MSP430: Flash/FRAM usage is 40180 bytes. RAM usage is 4958 bytes.'
But with a sample size of 256 the following error occurs: "../lnk_msp430fr6047.cmd", line 257: error #10099-D: program will not fit into available memory. run placement with alignment fails for section ".leaRAM" size 0xea0 . Available memory ranges: LEARAM size: 0xec8 unused: 0xec8 max hole: 0xec8
But shouldn't there be plenty of memory left? The MSP430-FR6047 has 8 kB of RAM with 4 kB being shared between LEA and CPU. Am I overlooking something obvious?
The relevant code snippets would be:
Global:
#define FFTsamples 256
DSPLIB_DATA(input, MSP_ALIGN_FFT_Q15(FFTsamples)) _q15 input[FFTsamples];
In main flow:
// Fill input array with ADC Waveform
uint16_t* pUPSCap16 = (uint16_t*) (USS_getUPSPtr(&gUssSWConfig));
uint16_t c = 0;
while(c < FFTsamples) {
input[c] = *pUPSCap16;
pUPSCap16++;
c++;
}
// FFT
msp_fft_q15_params fftParams;
fftParams.length = FFTsamples;
fftParams.bitReverse = true;
msp_fft_fixed_q15(&fftParams, input);
Another question: I was wondering how, with a FFT sample size of 128 and for example only 160 available ADC samples, this code was capable of generating 128 valid FFT values. Doesn't the FFT of a real vector result in a vector of the same size, but mirrored, so only half of it is supposed to be usable? Is there some kind of interpolation involved or anything?
Best regards
Daniel