AnsweredAssumed Answered

Controller resets when enabling interrupt

Question asked by ibatullin.artem on Jun 26, 2012
Latest reply on Jun 26, 2012 by Clive One
controller resets when I enable timer interrupt with the period about half second.
watchdog is ok.
timer config:
TIM_TimeBaseInitTypeDef  TIM_TimeBaseStructure;
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6, ENABLE);
TIM_TimeBaseStructInit(&TIM_TimeBaseStructure);
TIM_TimeBaseStructure.TIM_Period = 10000;
TIM_TimeBaseStructure.TIM_Prescaler = 16800-1;
TIM_TimeBaseInit(TIM6, &TIM_TimeBaseStructure);
TIM_ITConfig(TIM6, TIM_IT_Update, ENABLE);
TIM_Cmd(TIM6, ENABLE);

enabling interrupt:
NVIC_EnableIRQ(TIM6_DAC_IRQn);
also I've tried to enable interrupt this way:
NVIC_InitTypeDef NVIC_InitStructure;
NVIC_InitStructure.NVIC_IRQChannel = TIM6_DAC_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);

interrupt handler:
void TIM6_DAC_IRQnHandler() {
   if (TIM_GetITStatus(TIM6, TIM_IT_Update) != RESET) {
      TIM_ClearITPendingBit(TIM6, TIM_IT_Update);
      IWDG_ReloadCounter();
   }
}
what can I do?
thanks in advance.

Outcomes