cancel
Showing results for 
Search instead for 
Did you mean: 

Problem of the Timer interrupt

saicflying
Associate II
Posted on January 21, 2006 at 02:21

Problem of the Timer interrupt

1 REPLY 1
saicflying
Associate II
Posted on January 21, 2006 at 02:21

i want to use both TOF interrupt and ICA interrupt of TIM1,but I found that I can't start the timer,why?

TIM_Init ( TIM1 );

TIM_ITConfig(TIM1,TIM_TO_IT | TIM_ICA_IT ,ENABLE);

TIM_ClockSourceConfig(TIM1,TIM_INTERNAL);

TIM_PrescalerConfig ( TIM1, 0x00 );

TIM_PWMIModeConfig ( TIM1, TIM_RISING );

~~~~~~~~~the program stop here~~~~~~

TIM_CounterConfig ( TIM1, TIM_START );