update events from Tim7 using IRQ
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2014-08-27 4:50 AM
Posted on August 27, 2014 at 13:50
Hi All,
i'm having issue on STM32F407 with update events,sometimes i'm getting IRQ immediatelly after init and sometimes first event is regular update event, did i missed some initialization step ? please help me ...here is my code: TIM_TimeBaseStructure.TIM_Period = 2000; // ARR TIM_TimeBaseStructure.TIM_Prescaler = 20999; // PSC ... TIM_TimeBaseStructure.TIM_ClockDivision = 0; // CR1:CKD TIM67 doesn't have TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; TIM_TimeBaseInit( TIM7, &TIM_TimeBaseStructure); TIM_ClearFlag( TIM7, TIM_FLAG_Update ); TIM_ITConfig( TIM7, TIM_IT_Update, ENABLE); TIM_ClearITPendingBit( TIM7, TIM_IT_Update ); TIM_ClearFlag( TIM7, TIM_FLAG_Update ); TIM_SetCounter( TIM7, 0); TIM_Cmd( TIM7, ENABLE );Thanks for all replies, Kind regards
This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0
