2013-07-10 01:34 AM
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-deactivate2013-07-10 04:20 AM
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.