2009-01-26 04:12 AM
IWDG with high refresh rate
2011-05-17 04:00 AM
Hello,
I've seen this behaviour when using the IWDG: if you refresh it continously, it doesn't work properly, even if you're checking first the IWDG_SR_RVU flag. My testing program is just:Code:
IWDG_Init() while(1) { if( IWDG_GetFlagStatus(IWDG_FLAG_PVU) == RESET ) { IWDG_ReloadCounter(); } } then I shortcircuit my external oscillator for a WD_RELOAD_TIME and expect that the micro will be reset. But it never happens. In contrast, if I use a timer to ensure a minimum time between refreshes, it works as expected and the micro is reset when you stop the external oscillator.Code:
// WDtimer is a msec counter updated in systick interrupt while(1) { if( WDtimer > (WD_RELOAD_TIME / 5) ) { IWDG_ReloadCounter(); WDtimer=0; } } Maybe I have to look it thoroughly, but I haven't seen any explication to this behaviour in the Ref. Manual.