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.

C542 DSP Library FFT Wonky

Hi All,

I'm attempting to use a TMS320C542 chip to do FFTs using the 54x DSP library (SPRC099). I'm calling the function _cfft1024 directly from assembly code. The code fails at a specific point, in very peculiar ways (see below). This has been tested on two boards.

The failure point is in the file MACROS.ASM, in the repeated math block after the COMBO2 marker, on the first line where the *ARx+0 incrementing syntax is used:

        sth     A,ASM,*ar5+0

I have inserted debugging code (toggling XF) at the beginning and end of the loop.  If I change the loop so that it stops before this line, the code will run the correct number of times (256).  Including this line and any after it causes the loop to apparently run correctly approximately 50-75 times, and then to run anomalously from 0 to 150 times (only showing begging _or_ end debug XF toggles), and then the processor goes unresponsive.  I've tried modifying the code to use a different incrementation method (mar), and a different loop method (banz), but the only effect is to change the number of proper and anomalous loops before dying.

Chip is running at 40 MHz CLKOUT, and the address being passed to the FFT function in the A accumulator is 1800h.  INTM=1, and only the BSP Transmit Interrupt is enabled in IMR.  The BSP is running in autobuffer transmit mode, with external clock (9600 baud) & frame sync (500 Hz)

Has anyone seen anything like this before?  Has anyone used any of the 54x library functions on the 542 specifically?  Is there a known better 1024-sample, complex, assembly FFT implementation for the 542?

Thanks,
MPD