cancel
Showing results for 
Search instead for 
Did you mean: 

Independent watchdog timer makes my MCU unstable

JJohn.3
Associate II

Hello,

Here is my source code:

 
void WatchDog(void){
 
NVIC_InitTypeDef nvicStructure;
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
 
    nvicStructure.NVIC_IRQChannel = WWDG_IRQn;
    nvicStructure.NVIC_IRQChannelPreemptionPriority = 1;
    nvicStructure.NVIC_IRQChannelSubPriority = 2;
    nvicStructure.NVIC_IRQChannelCmd = ENABLE;
    NVIC_Init(&nvicStructure);	
	
		RCC_APB1PeriphClockCmd(RCC_APB1Periph_WWDG,ENABLE);
		IWDG_SetPrescaler(IWDG_Prescaler_32);
		IWDG_SetReload(500);
		IWDG_Enable();
}
 

I have set my watchdog counter to 500( .4 second) and I reset the timer each approximately 200 micro seconds. But my Ethernet connection stop working after some seconds( it doesn't reset my MCU). When I comment the WatchDog(); line it works perfectly for about 12hours as I tested. I need to know what my problem is.

0 REPLIES 0