cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f103, IWDG

massimo239955_st
Associate II
Posted on March 25, 2009 at 06:35

stm32f103, IWDG

1 REPLY 1
massimo239955_st
Associate II
Posted on May 17, 2011 at 13:07

Is there a full working IWDG example ?

I tried this, but it seems not working (the watchdog doesn't reset the cpu).

// cpu clock from external xtal (HSE) + RCC_PLLMul_8

RCC_LSICmd(ENABLE);

while(RCC_GetFlagStatus(RCC_FLAG_LSIRDY) == RESET);

RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);

RCC_ClearITPendingBit(RCC_IT_LSIRDY);

RCC_ITConfig(RCC_IT_LSIRDY, ENABLE);

IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);

IWDG_SetPrescaler(IWDG_Prescaler_32);

IWDG_SetReload(200);

IWDG_ReloadCounter();

IWDG_Enable();

I am testing thru JTAG.

Does it disable the IWDG ?

best regards, Sala