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.

Q15 16-bit FFTs with CMSIS DSP Library - probable instruction-map bug found

Other Parts Discussed in Thread: TM4C123AH6PM

Hi there,

I'm using a Tiva C Series Microcontroller & built the latest & greatest ARM CMSIS DSP Library for CCS, with references below:

Code Composer Studio - Version 6.0.1.00040
ARM Compiler Tools - Version 5.1.9
CMSIS - Version 4.2 ( silver.arm.com/.../cmsis )
TI Application Report SPMA041e ( www.ti.com/.../spma041e.pdf )
TI "source patch" SPMC017a ( www.ti.com/.../spmc017 )
Part TM4C123AH6PM

The complex & often real Q15 FFT results would be 'corrupted', given a known good input. The screenshots below demonstrate the Q31, F32 working as expected & Q15 giving 'bit corruption' in the 'complex' results.

I found the TI supplied header file "cmsis_ccs.h" to suspiciously map the ARM Cortex M4 instruction "Signed Dual Multiply Subtract Reversed" to "Signed Dual Multiply Subtract". That instruction is used throughout relevant Q15 CFFT functions in source files arm_cfft_q15.c / arm_cfft_radix4_q15.c / arm_cfft_radix2_q15.c

Changing this line:

#define __SMUSDX    _smusd

To this line:

#define __SMUSDX    _smusdx

appears to fix everything for my use.

Thanks, JD

 

F32 CFFT

Q31 CFFT

Q15 CFFT