cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 IWDG Hardware Mode Problem

ersoz
Associate II
Posted on July 15, 2010 at 15:51

STM32 IWDG Hardware Mode Problem

#freeze #option-file #iwdg #iwdg #problem #stm32 #stm32
4 REPLIES 4
ersoz
Associate II
Posted on May 17, 2011 at 13:58

I couldn't try this code part because i can't make debug when i enable STM32F10xOPT.s file.

jgoldberg
Associate II
Posted on May 17, 2011 at 13:58

Hi,

I use the following code, executed every power-up, to verify that the IWDG is programmed and enabled:

    /* make sure hardware watchdog is enabled */

    option = FLASH_GetUserOptionByte ();

    if (option & FLASH_OBR_WDG_SW) {

        FLASH_Unlock ();

        FLASH_UserOptionByteConfig (OB_IWDG_HW, OB_STOP_RST,

            OB_STDBY_RST);

        FLASH_Lock ();

    }

I also use something similar to make sure read-out protection is enabled.  Hope that helps.

jgoldberg
Associate II
Posted on May 17, 2011 at 13:58

I don't know what ''STM32F10xOPT.s'' is.  What code does it contain?  Why do you need it?

ersoz
Associate II
Posted on May 17, 2011 at 13:58

This assembly file is the option file of STM32F10x serie. You can select iwdg mode (hw or sw) by this file but it seems i can't enable iwdg module. When i downloading *.hex code, ulink2 programs the option byte area of flash memory and nothing changes in my application.

You can reach detailed information about option file by using the link below.

http://www.keil.com/support/docs/3406.htm