Other Parts Discussed in Thread: MSP430WARE
Hi all,
Question about the results of msp_cmplx_fft_auto_q15. I use TI's DSPLibrary and can't seem to make sense of the results of the msp_cmplx_fft_auto_q15, which invokes LEA on MSPFR5994. Specifically, if I specify:
static DSPLIB_DATA(src1, MSP_ALIGN_CMPLX_FFT_Q15(SAMPLES)) unsigned int src1[SAMPLES * 2];
static msp_fft_q15_params params = {.length = SAMPLES};
static msp_status status;
...
uint16_t shift = 0;
for(unsigned int i = 0; i < SAMPLES * CMPLX_INCREMENT; i += CMPLX_INCREMENT) {
CMPLX_REAL(&src1[i]) = 1;
CMPLX_IMAG(&src1[i]) = 0;
}
status = msp_cmplx_fft_auto_q15(¶ms, src1, &shift);
I don't get the result I expect.
Instead of: Real: 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 Imag: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
I get: Real: 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 0 Imag: 0, -7, -3, -3, -1, -1, -1, -1, 0, 1, 1, 1, 1, 3, 3, 7
and shift = 0
I gather it could be a couple of things. 1) I need to input a twiddle table 2) LEA just doesn't get the integer datatype and needs something else 3) The results need to be scaled or interpreted in a different way
Any help would be greatly appreciated.
