DSPRelated.com
Forums

FFT Accelerator Repeat mode

Started by Galvez October 5, 2011
Hello,
I've trying to use the FFT Accelerator on a 21469 processor, everything is working fine in NOREPEAT mode but when I try to use the REPEAT mode I only get the two first interrupts (one for the input DMA and the other for the output DMA). My hardware is a ADSP-21469 EZ-Kit and the processor is a ENG version (thought that could be relevant).
My original project is a VDK project but I modified the example in EE322 to make things simpler but whith the same "no-morking" results. Please, any help will be appreciated. The code is as follows:

In file FIR_IIR_FFT_Init.c : (modified lines are in bold text)

/* This file includes the initialization codes for FIR, IIR and FFT Accelerators */

#include "def21469.h"

#include "Cdef21469.h"

void Init_FFT();

/* Declaring the external buffers needed for FFT Accelerator*/
extern int FFT_IP_buff[];
extern int FFT_OP_buff[];
extern int FFT_CF_buff[];

/*Adding the TCB for FFT Accelerator*/
int FFT_IP_TCB[6]={
(int)0x80000,
(int)FFT_IP_buff,
512,
512,
1,
(int)FFT_IP_buff
};

int FFT_OP_TCB[6]={
(int)0x80000,
((int)FFT_OP_buff),
512,
512,
1,
(int)FFT_OP_buff
};

int FFT_CF_TCB[6]={
(int)FFT_IP_TCB+5-0x80000,
(int)FFT_CF_buff,
512,
512,
1,
(int)FFT_CF_buff
};

/* Adding the FFT Initialization Code Now */
void Init_FFT()
{
int temp;

//Mapping the FFT DMA interrupt
temp=*pPICR0;
temp&=~(P0I0|P0I1|P0I2|P0I3|P0I4);
temp|=P0I0|P0I1|P0I3|P0I4;
*pPICR0=temp;

*pPMCTL1&=~(BIT_17|BIT_18);
*pPMCTL1|TACCSEL;

//PMCTL1 effect latency
asm("nop;nop;nop;nop;");

//Clearing the FFTCTL registers
*pFFTCTL2=0;

*pFFTCTL1T_RST;

asm("nop;nop;nop;nop;");

temp=(int)FFT_CF_TCB;

*pCPIFFT=0x100000|temp+5-0x80000;

*pCPOFFT=(int)FFT_OP_TCB+5-0x80000;

*pFFTCTL2=VDIMDIV16_16|FFT_LOG2VDIM_8 | FFT_RPT;

*pFFTCTL1T_EN|FFT_START|FFT_DMAEN;

};

And in file main.C : (modified lines are in bold)

/* This is to test working of the GUI Generated Code for FFT Accelerator N%6 Points */

#include
#include
#include
#include

extern void Init_FFT();

void FFT_DMA_ISR();

#define N 256

float FFT_IP_buff[2*N]={

#include "fft_input.dat"
};

float FFT_OP_buff[2*N];

float FFT_OP1_buff[N/2];

float FFT_CF_buff[2*N]={
#include "twiddle_256.dat"
};

int fft_done=0;
int isr = 0;
int main()
{
int i = 0;

interrupt(SIG_P0,FFT_DMA_ISR);

Init_FFT();
while(1)
{
}

for(i=0;i {

FFT_OP1_buff[i]=sqrt(FFT_OP_buff[2*i]*FFT_OP_buff[2*i]+FFT_OP_buff[2*i+1]*FFT_OP_buff[2*i+1]);
}
return 0;

}
void FFT_DMA_ISR()
{

isr++;

if((*pFFTDMASTAT&ODMACHIRPT)!=0)
fft_done=1;
}

I kept the program running for a little while and then stopped and saw the value on isr, I expected a value greater than 2 but the value was exactly 2.
Thanks a lot,

jcgalveza
If you don't get an answer here you might try the ADI Engineer Zone
(http://ez.analog.com/index.jspa)
On Tue, 4 Oct 2011, Galvez wrote:

> Hello,
> I've trying to use the FFT Accelerator on a 21469 processor, everything is working fine in NOREPEAT mode but when I try to use the REPEAT mode I only get the two first interrupts (one for the input DMA and the other for the output DMA). My hardware is a ADSP-21469 EZ-Kit and the processor is a ENG version (thought that could be relevant).
> My original project is a VDK project but I modified the example in EE322 to make things simpler but whith the same "no-morking" results. Please, any help will be appreciated. The code is as follows:
>
> In file FIR_IIR_FFT_Init.c : (modified lines are in bold text)
>