cancel
Showing results for 
Search instead for 
Did you mean: 

IWDG with high refresh rate

jordi
Associate II
Posted on January 26, 2009 at 13:12

IWDG with high refresh rate

1 REPLY 1
jordi
Associate II
Posted on May 17, 2011 at 13:00

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.