TI中文支持网
TI专业的中文技术问题搜集分享网站

我用TI官方给的定点FFT库和例程做128FFT出错

我用的是F28335采用TI官方给的定点FFT库sprc081来计算128点FFT,h,C, ASM ,CMD文件都用的FFT库sprc081里面的文件,编译没问题,但是下载程序时出现load program时出错 显示data  verification failed at address 0x3fffc0,please verify target memory and memary map.
请问是什么意思  怎么解决啊?

我怀疑是CMD文件配置的问题

我的源文件
#include "DSP2833x_Device.h"
#include "DSP2833x_examples.h" 
#include "IQmathLib.h" 
#include "math.h"
//#include <stb.h>
#include <fft.h>


/* Create an Instance of FFT module*/
#defineN128 
#definepi  3.1415916
#defineTs  1.0/6400.0//采样周倜
#definef50//三相电压的频率 
inti=0;
#pragma DATA_SECTION(ipcb, "FFTipcb");
#pragma DATA_SECTION(mag, "FFTmag");

RFFT32  fft=RFFT32_128P_DEFAULTS;
long Input[N];  
long ipcb[N+2];
long mag[N/2+1];  

/* Define window Co-efficient Array  and place the
.constant section in ROM memory				*/
const long win[N/2]=HAMMING128;

void main()
{InitSysCtrl();  //初始化系统函数DINT;IER = 0x0000;//禁止CPU中断IFR = 0x0000;//清除CPU中断标志InitPieCtrl();  //初始化PIE控制寄存器InitPieVectTable();  //初始化PIE中断向量表

for (i=1;i<N;i++)  
{Input[i] =  _IQ30(1+2*sin(2*pi*f*i*Ts+pi/3)+0.1*sin(2*pi*3*f*i*Ts+pi/6));
}

/* Initialize FFT module*/fft.ipcbptr=ipcb;fft.magptr=mag;fft.winptr=(long *)win;fft.init(&fft);  

/*---------------------------------------------------------------------------Nothing running in the background at present
----------------------------------------------------------------------------*/
//RFFT32_brev(ipcb,ipcb,N);RFFT32_brev(Input,ipcb,N);  // Input samples in Real Part//fft.win(&fft); 
//RFFT32_brev(Input,ipcb,N);
 //RFFT32_brev(ipcb,ipcb,N);  // Input after windowingfft.calc(&fft);fft.split(&fft);fft.mag(&fft);
} /* End: main() */
CMD文件
MEMORY
{
PAGE 0 : PROG(R): origin = 0x3D8000, length = 0x20000
PAGE 0 : BOOT(R): origin = 0x3FF000, length = 0xFC0
PAGE 0 : RESET(R): origin = 0x3FFFC0, length = 0x2
PAGE 0 : VECS(R): origin = 0x3FFFC2, length = 0x3E
PAGE 0 : PIEVECS(R)  : origin = 0x000D00, length = 0xFF
PAGE 0 : H0RAM(RW): origin = 0x3F8000, length = 0x2000

PAGE 1 : M0RAM(RW): origin = 0x000000, length = 0x400
PAGE 1 : M1RAM(RW): origin = 0x000400, length = 0x400
PAGE 1 : L0L1RAM(RW) : origin = 0x008000, length = 0x2000

}
 
SECTIONS
{/* 22-bit program sections */.reset: > RESET,PAGE = 0vectors : > VECS,PAGE = 0.pinit: > H0RAM,PAGE = 0.cinit: > H0RAM,PAGE = 0.text: > H0RAM,PAGE = 0SINTBL	: > H0RAM,PAGE =	0FFTtf	>	H0RAM,PAGE = 0FFTmag>L0L1RAM		PAGE 1/* 16-Bit data sections */.const: > L0L1RAM, PAGE = 1.bss: > L0L1RAM, PAGE = 1.stack: > M1RAM,PAGE = 1.sysmem  : > M0RAM,PAGE = 1FFTipcb	ALIGN(512)  : { } >L0L1RAM PAGE 1DLOG	 	: >	L0L1RAM	 PAGE =	1/* 32-bit data sections */.ebss: > L0L1RAM, PAGE = 1.econst  : > L0L1RAM, PAGE = 1.esysmem : > L0L1RAM, PAGE = 1
}

mangui zhang:

看看有没有在工程下多添加.asm相关文件    remove一下看看

如果没有  建议你将CMD中PAGE 0 : RESET(R)    : origin = 0x3FFFC0, length = 0x2的起始地址

根据datasheet中的存储器地址映射改改看

我用的是F28335采用TI官方给的定点FFT库sprc081来计算128点FFT,h,C, ASM ,CMD文件都用的FFT库sprc081里面的文件,编译没问题,但是下载程序时出现load program时出错 显示data  verification failed at address 0x3fffc0,please verify target memory and memary map.
请问是什么意思  怎么解决啊?

我怀疑是CMD文件配置的问题

我的源文件
#include "DSP2833x_Device.h"
#include "DSP2833x_examples.h" 
#include "IQmathLib.h" 
#include "math.h"
//#include <stb.h>
#include <fft.h>


/* Create an Instance of FFT module*/
#defineN128 
#definepi  3.1415916
#defineTs  1.0/6400.0//采样周倜
#definef50//三相电压的频率 
inti=0;
#pragma DATA_SECTION(ipcb, "FFTipcb");
#pragma DATA_SECTION(mag, "FFTmag");

RFFT32  fft=RFFT32_128P_DEFAULTS;
long Input[N];  
long ipcb[N+2];
long mag[N/2+1];  

/* Define window Co-efficient Array  and place the
.constant section in ROM memory				*/
const long win[N/2]=HAMMING128;

void main()
{InitSysCtrl();  //初始化系统函数DINT;IER = 0x0000;//禁止CPU中断IFR = 0x0000;//清除CPU中断标志InitPieCtrl();  //初始化PIE控制寄存器InitPieVectTable();  //初始化PIE中断向量表

for (i=1;i<N;i++)  
{Input[i] =  _IQ30(1+2*sin(2*pi*f*i*Ts+pi/3)+0.1*sin(2*pi*3*f*i*Ts+pi/6));
}

/* Initialize FFT module*/fft.ipcbptr=ipcb;fft.magptr=mag;fft.winptr=(long *)win;fft.init(&fft);  

/*---------------------------------------------------------------------------Nothing running in the background at present
----------------------------------------------------------------------------*/
//RFFT32_brev(ipcb,ipcb,N);RFFT32_brev(Input,ipcb,N);  // Input samples in Real Part//fft.win(&fft); 
//RFFT32_brev(Input,ipcb,N);
 //RFFT32_brev(ipcb,ipcb,N);  // Input after windowingfft.calc(&fft);fft.split(&fft);fft.mag(&fft);
} /* End: main() */
CMD文件
MEMORY
{
PAGE 0 : PROG(R): origin = 0x3D8000, length = 0x20000
PAGE 0 : BOOT(R): origin = 0x3FF000, length = 0xFC0
PAGE 0 : RESET(R): origin = 0x3FFFC0, length = 0x2
PAGE 0 : VECS(R): origin = 0x3FFFC2, length = 0x3E
PAGE 0 : PIEVECS(R)  : origin = 0x000D00, length = 0xFF
PAGE 0 : H0RAM(RW): origin = 0x3F8000, length = 0x2000

PAGE 1 : M0RAM(RW): origin = 0x000000, length = 0x400
PAGE 1 : M1RAM(RW): origin = 0x000400, length = 0x400
PAGE 1 : L0L1RAM(RW) : origin = 0x008000, length = 0x2000

}
 
SECTIONS
{/* 22-bit program sections */.reset: > RESET,PAGE = 0vectors : > VECS,PAGE = 0.pinit: > H0RAM,PAGE = 0.cinit: > H0RAM,PAGE = 0.text: > H0RAM,PAGE = 0SINTBL	: > H0RAM,PAGE =	0FFTtf	>	H0RAM,PAGE = 0FFTmag>L0L1RAM		PAGE 1/* 16-Bit data sections */.const: > L0L1RAM, PAGE = 1.bss: > L0L1RAM, PAGE = 1.stack: > M1RAM,PAGE = 1.sysmem  : > M0RAM,PAGE = 1FFTipcb	ALIGN(512)  : { } >L0L1RAM PAGE 1DLOG	 	: >	L0L1RAM	 PAGE =	1/* 32-bit data sections */.ebss: > L0L1RAM, PAGE = 1.econst  : > L0L1RAM, PAGE = 1.esysmem : > L0L1RAM, PAGE = 1
}

gang wang14:

回复 mangui zhang:

你好  我对地址不太清楚    你做过这方面的么?能不能发我一个可用的

赞(0)
未经允许不得转载:TI中文支持网 » 我用TI官方给的定点FFT库和例程做128FFT出错
分享到: 更多 (0)