2006-05-24 02:03 AM
2006-05-22 08:49 PM
Hello,
im beginer in ARM. Please how can I do interupt every 40ms? I tried to configurate timer like this: TIM_Init ( TIM1 ); // Enable the IRQ0 for timer 1 EIC_IRQChannelConfig( T1TIMI_IRQChannel, ENABLE ); EIC_IRQChannelPriorityConfig( T1TIMI_IRQChannel, 1); EIC_IRQConfig( ENABLE ); TIM_PrescalerConfig ( TIM1, 0x00 ); // speed is 1MHz divison 1 TIM_ITConfig ( TIM1, TIM_OCA_IT, ENABLE ); TIM_OCMPModeConfig ( TIM1, TIM_CHANNEL_A, 0x9C40, TIM_TIMING, TIM_HIGH ); and how can i start the timer? I tried TIM_CounterConfig ( TIM1, TIM_START ); but its not working?! Please help :-[ Jirka [ This message was edited by: drakulaj on 23-05-2006 09:21 ]2006-05-23 05:58 AM
I would use the RTC. Look at the example provided in the STR7 library