|
Message
From: beyoelf at 163.com<beyoelf@1...>
Date: Fri Sep 23 04:52:10 CEST 2005
Subject: [openrisc] how to use tick timer exception?
mtspr(SPR_TTMR,0xa0001000L);//set TTMR[M]=2,TTMR[IE]=1 mtspr(SPR_TTCR,0x00000000L); mtspr(SPR_SR, SPR_SR_TEE | mfspr(SPR_SR));//set SPR_SR_TEE =1
i run it on or1200 i found that the TTMR_IP is set "1" automatically sometimes. thanks
----- Original Message ----- From: =?unknown-8bit?Q?Gy=F6rgy?= 'nog' Jeney<nog@s...> To: Date: Thu Sep 22 12:00:14 CEST 2005 Subject: [openrisc] how to use tick timer exception?
> > i need to use the tick timer to caculate the task time. > > i had set the tick timer exception address 0x500 in > reset.S,and point to > > the timer response function. > > in the main(),i had set the SPR_SR_TEE and TTMR = > 0xafffffff,but it > > coundn't interrupt even if TTCR matched the 0xfffffff. > > it seemed the timer exception hadnt happened. could some one > tell me > > the reason?thx very much./bow > Could you post the code that doesn't seem to work? And with what > are you trying > to run it? (or1ksim, or1200...). > nog. > >
|
 |