Help for Watchdog in STlite 19 or 29
Company  
ST Home | Microcontrollers

Index  »  ST7  »  Help for Watchdog in STlite 19 or 29
     
   Help for Watchdog in STlite 19 or 29
 Moderated by :   »  Jatin  -  laubey  -  Setler

Author
beginning argument    ( Replies received: 1 )
cicciounico   Posted 27-05-2008 at 18:05   



Registered on :
02-07-2004

From Aruba

Messages : 7

 OFF-Line

Hi,
I use ST7lite19 and 29.
I must reset the micro inside my program,when my program is in running.
I have thinks at watchdog.
In my program use:
#define RefreshWatchdog() { WDGCR = 0xFF; }
in main loop.
When I want reset the micro I do:
while(1)
{}
and wait the watchdog!
But the watchdog doesn't arrive.

With Indart STX I have setting Watchdog software and it doesn't arrive.
If I setting Watchdog hardware it's all locked: don't run the program!
What's my error?

Thanks



 Profile   Quote  
seb13_colin   Posted 16-06-2008 at 13:55   



Registered on :
12-05-2008

Messages : 6

 OFF-Line

Hello cicciounico,

In ST7 lite there are two ways of using the watchdog.

- Watchdog hardware: In this configuration the watchdog will start to count immediately after the micro startup. Before entering in your endless loop "while(1);" you probably done some basic configuration of the MCU and so on. During this step, if you don't refresh the WD it will triggered a reset and so, you will never see the "real" execution of your code.

- Watchdog software: In this configuration the WD will start to count only after the Activation bit has been written. So to make the watchdog running you have to write this bit. In your code, if you don't enable this bit the watchdog will never start and will never trigger the expected reset.

For more details please refer to the datasheet in the watchdog chapter.

Best regards,

Seb



[ This message was edited by: seb13_colin on 16-06-2008 15:11 ]



 Profile   Quote  
On Top

Search in the forums
 
Jump To