cancel
Showing results for 
Search instead for 
Did you mean: 

Help for Watchdog in STlite 19 or 29

ciccio
Associate II
Posted on June 16, 2008 at 10:25

Help for Watchdog in STlite 19 or 29

2 REPLIES 2
ciccio
Associate II
Posted on May 27, 2008 at 14:35

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.

:o

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

seb13_colin
Associate II
Posted on June 16, 2008 at 10:25

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 ]