2021-02-28 08:31 PM
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.