AnsweredAssumed Answered

STM32F103CB + IWDG

Question asked by Jayce on Feb 4, 2014
Hello Community,

i want to use the IWDG of my STM32F103CB but i dont get it work.
The controller isnt resetting. This is the relevant code-snippet:

if (RCC_GetFlagStatus(RCC_FLAG_IWDGRST) != RESET)
{
    /* Clear reset flags */
    RCC_ClearFlag();
}
RCC_LSICmd(ENABLE);
while (RCC_GetFlagStatus(RCC_FLAG_LSIRDY) == RESET)
{}
IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);
IWDG_SetPrescaler(IWDG_Prescaler_16);
IWDG_SetReload(2500);
while(IWDG_GetFlagStatus (IWDG_FLAG_PVU || IWDG_FLAG_RVU) == RESET);
IWDG_ReloadCounter();
IWDG_Enable();
 
while(1);

Is there something i forgot?
Regards

Outcomes