ARM7新手求帮助啊
05-08
用ADS给ARM7写程序,很简单的程序怎么就跑步起来呢,ARM像死机了一样,麻烦高手给我看下,估计应该是缺少什么头文件或者格式什么的不对!
#include "44b.h"
#include "option.h"
#include "44blib.h"
int i=0;
void __irq Timer0_Isr(void)
{ rI_ISPC=BIT_TIMER3;
if(i==0)
rPDATC=0x2;
else
rPDATC=0x4;
i=i;
return ;
}
void Main(void)
{
rPCONC=0x55555555;
pISR_TIMER3=(unsigned)Timer0_Isr;
// rPCONE=0xaaa8;
//rPUPE=0x8;
rTCFG0=0x1010101;
rTCFG1=0x0;
rTCNTB3=0x500;
rTCMPB3=0x0;
rTCON=0x0020000;
rTCON=0x0090000;
rINTCON=0x5;//中断方式
rINTMOD=0x0;
rINTMSK=BIT_GLOBAL;
rINTMSK=(BIT_TIMER3|BIT_GLOBAL);//开中断
while(1);
}
#include "44b.h"
#include "option.h"
#include "44blib.h"
int i=0;
void __irq Timer0_Isr(void)
{ rI_ISPC=BIT_TIMER3;
if(i==0)
rPDATC=0x2;
else
rPDATC=0x4;
i=i;
return ;
}
void Main(void)
{
rPCONC=0x55555555;
pISR_TIMER3=(unsigned)Timer0_Isr;
// rPCONE=0xaaa8;
//rPUPE=0x8;
rTCFG0=0x1010101;
rTCFG1=0x0;
rTCNTB3=0x500;
rTCMPB3=0x0;
rTCON=0x0020000;
rTCON=0x0090000;
rINTCON=0x5;//中断方式
rINTMOD=0x0;
rINTMSK=BIT_GLOBAL;
rINTMSK=(BIT_TIMER3|BIT_GLOBAL);//开中断
while(1);
}
射频专业培训教程推荐