2008-02-11 06:35 PM
2008-02-03 11:13 AM
Hi guys!
I have try many times for these 3 weeks just to let my timer run. But I can't. And I have try many times just wanna to get a 10ms output. Here is my code. Please some one help me, thanks. int main(void) { #ifdef DEBUG debug (); #endif EIC_IRQChannelPriorityConfig( T1TIMI_IRQChannel , 1); EIC_IRQChannelConfig( T1TIMI_IRQChannel, ENABLE ); GPIO_Config(GPIO1, (0x0001 << 7), GPIO_OUT_PP); GPIO_ByteWrite(GPIO1,0x0001 << 7,1); TIM_Init(TIM1); TIM_PrescalerConfig(TIM1,0x02); TIM_ITConfig(TIM1,TIM_TO_IT,ENABLE); EIC_IRQConfig(ENABLE); TIM_CounterConfig(TIM1,TIM_START); while (1) ; /* Infinite loop*/ } void T1TIMI_IRQHandler(void) { GPIO_ByteWrite(GPIO1,0x0001 << 7,1); TIM_FlagClear(TIM1,TIM_TOF); } Please any help me, I have got crazy on this subject.2008-02-11 06:35 PM
I don't know why the TIMER can't run.
It seems like I have set everything about TIMER. But it still can't work. Is there anyone can solve my problem?? PLZ