cancel
Showing results for 
Search instead for 
Did you mean: 

how can i make the TIMx run as only timers

tsyejay
Associate II
Posted on January 24, 2008 at 04:15

how can i make the TIMx run as only timers

1 REPLY 1
tsyejay
Associate II
Posted on May 17, 2011 at 11:32

Hi, everybody!

I have written a TimerTest program of the STR912F44W, in which I use all of the four TIMx as seperate four timers, the first should interrupt in every 1mS, the second 10mS, the third 100ms and the last should interrupt in every 500mS. The osc frequency of CPU is 25MHz, and the system frequency(fMSTR) is 96MHz, Each timer uses the fMSTR divided by the prescaler as its CLK. the prescaler of TIM01 is 12000, and which of TIM23 is 48000, the private prescaler(the low byte of TIM_CR2)of TIM0 is 0, TIM1's is 9, TIM2's is 4 and the last one is 39. I have made the EN bit to '1' and select the extenal clock, that is, the TIM_CR1 of TIM0 is 0x8001( in SCU registers the fMSTR as Timer clock source is selected), and written the correct ISR for TIM0-TIM3. After I compiled all my source code,I start to debug it in KEIL simulater. I set four breakpoint at entry point of every ISR and press 'GO',after running several hundrand minisecond of CPU time,NO interrupt occur! and ALL the TIMx_CNTR still remain their reset values of 0xFFFC. what's wrong? how can i do for my purpose of only use these TIMs as timer?

Thank you!

[ This message was edited by: tsyejay on 24-01-2008 14:23 ]