cancel
Showing results for 
Search instead for 
Did you mean: 

help! - STM32F103RC freezes if TıM8_UP interupt enabled

mehmet.karakaya
Associate III
Posted on April 11, 2014 at 16:37

hello dear forum,

I am trying to write a program for STM32F103RC but when I enable TIM8_UP interrupt the program freezes I am using RIDE7 for compiling and the program compiles without error please have a look at my code , thank you

RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM8, ENABLE); 
----------------------------- 
void
TIM8_UP_IRQHandler(
void
){ 
tim8tog++; } 
----------------------------- 
TIM_ITConfig(TIM8, TIM_IT_Update , ENABLE); 
----------------------------- 
NVIC_InitStructure.NVIC_IRQChannel = TIM8_UP_IRQn; 
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; 
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2; 
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; 
NVIC_Init(&NVIC_InitStructure);

#tim8_up
1 REPLY 1
Posted on April 11, 2014 at 16:54

Qualify and Clear the interrupt source before incrementing your counter variable.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..