STM32F103RC WWDG不复位 :
用的IAR的例程,
/* WWDG clock counter = (PCLK1/4096)/8 = 244 Hz (~4 ms) */
WWDG_SetPrescaler(WWDG_Prescaler_8);
/* Set Window value to 65 */
WWDG_SetWindowValue(65);
/* Enable WWDG and set counter value to 127, WWDG timeout = ~4 ms * 64 = 262 ms */
WWDG_Enable(127);
/* Clear EWI flag */
WWDG_ClearFlag();
/* Enable EW interrupt */
WWDG_EnableIT();
能进中断,
/* Update WWDG counter */
// WWDG_SetCounter(0x7F);
/* Clear EWI flag */
WWDG_ClearFlag();
屏蔽// WWDG_SetCounter(0x7F); 不复位怎么回事? |