;********************************************************
;Timer setting
;********************************************************
LDR R1,=0x3FF6000
LDR R0,=&01
STR R0,[R1]
LDR R1,=0x3FF6004
LDR R0,=&400000
STR R0,[R1]
TDATA0写入0x400000,定时时间为(TDATA0+1)个时钟周期,这个时钟周期是如何计算了?
是不是1/fmclk,(fmclk=50MHZ,5*10的7次方)?
#define OS_TICKS_PER_SEC 200 /* Set the number of ticks in one second */
这应该是5MS一个tick
怎么算出来不对?我算出来好象是83.8861ms
2.异常向量的向量ISR的写入
unsigned *irqvec=(unsigned*)0x18;
Install_Handle((unsigned)TimeISR,irqvec);
unsigned Install_Handle(unsigned routine,unsigned *vector)
{
unsigned vec,oldvect;
vec=((routine-(unsigned)vector-0x8)>>2);
if(vec&0xff000000)
{
}
vec=0xea000000|vec;
oldvect=*vector;
*vector=vec;
return(oldvect);
}
而在init.s中
AREA Init,CODE,READONLY
ENTRY
B Reset_Handler
NOP IRQ_Handler
NOP IRQ_Handler
NOP IRQ_Handler
NOP IRQ_Handler
NOP
NOP IRQ_Handler
NOP IRQ_Handler
经过Install_Handle变,对0x18写后,地址0开始为
0xea000006
0xe1a00000
0xe1a00000
0xe1a00000
0xe1a00000
0xe1a00000
0xea100900(在写入之前0xe1a00000)
0xe1a00000
请问异常向量4个BYTE是如何计算的?
3。笨问题:如果生成一个bin文件?我用的是SDTv2.51
请高手帮个忙,能帮一个问题是一个,谢谢
关键词:
请教
s3c4510
sdt2.51
三个
问题