cancel
Showing results for 
Search instead for 
Did you mean: 

IWDG on STM32f3

abelletoile9
Associate II
Posted on July 10, 2013 at 10:34

Dear all,

I'm currently developping under stm32f3 discovery and I'm experiencing difficulties with the IWDG.

In a first version of my software, I've been using the std peripheral library to set up the IWDG with the following code :

    uint16_t reload = 0x0FFF;

    

    IWDG_WriteAccessCmd (IWDG_WriteAccess_Enable);

    IWDG_SetPrescaler        (IWDG_Prescaler_256);

    IWDG_SetReload             (reload);

    while(IWDG_GetFlagStatus (IWDG_FLAG_PVU || IWDG_FLAG_RVU || IWDG_FLAG_WVU) == RESET);        

    IWDG_ReloadCounter();

    IWDG_Enable();

And I simply use the following command to reload it : IWDG_ReloadCounter();

This works fine but, now if I comment the part of my code related to the IWDG and reflash the memory and hard reset the thing, The watchdog remain activated and keep on reseting...

My questions are:

Why does the IWDG keeps on running whereas I just don't use it anymore in my code ?

Is there a way to shut it down ?

Thanks for your help.

#iwdg-stm32-deactivate
1 REPLY 1
Posted on July 10, 2013 at 13:20

I'd suspect something else is going on, either you haven't removed/erased the code you think you have, or it's resetting for some other reason.

Output some other marker to indicate that the correct firmware is loaded, do a full erase of the part.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..