2008-06-16 01:25 AM
Help for Watchdog in STlite 19 or 29
2008-05-27 05:35 AM
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? Thanks2008-06-16 01:25 AM
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 ]