cancel
Showing results for 
Search instead for 
Did you mean: 

STR71X How to generate 40ms interupt

drakulaj
Associate
Posted on May 24, 2006 at 11:03

STR71X How to generate 40ms interupt

2 REPLIES 2
drakulaj
Associate
Posted on May 23, 2006 at 05:49

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 ]

luca239955_stm1
Associate II
Posted on May 23, 2006 at 14:58

I would use the RTC. Look at the example provided in the STR7 library