cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103CB + IWDG

matthias2399
Associate
Posted on February 04, 2014 at 10:55

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 #iwdg #stm32
0 REPLIES 0