cancel
Showing results for 
Search instead for 
Did you mean: 

IWDG & WWDG for stm8l151c6 halt active mode

wenbingma2012
Associate II
Posted on June 13, 2013 at 13:27

I want to use stm8L watch dog in halt/halt-active mode. my system wakes up by RTC.

1. when I choice Independent watchdog, a watchdog reset happens when system is in halt/halt-active mode. As you know, the option byte(0x4808) default setting is IWDG still runing in halt/halt active, if you do not feed watchdog, a watchdog reset happens. I do not want to feed watch dog in interrupt routine, So I choice Window watchdog.

2. WWDG stop runing in halt/halt-active mode according to option byte configuration. it is difficult to feed watch dog in allowed watchdog window. stm8l runs at 16MHz, It means WWDG must be refreshed in about 50ms. but in my task scheduler, it maybe take more than 50ms when task processing so that the refresh allowed missed. I do not want to use timer interrupt to feed watchdog. I don't have good idea to handle WWDG.

3. I choice IWDG again. after powers up, check the option byte and configure the IWDG stop runing in halt/halt-active mode. It seems works well. Is there some potential issue to modify option bytes?
5 REPLIES 5
np1
Associate II
Posted on June 14, 2013 at 09:34

Hi,

IWDG using to prevent hardware bug, I think can not using to prevent FW, because when FW halt, IWDG also run and MCU not reset.

I think using WWDG and clear it by timer.

Thinh

wenbingma2012
Associate II
Posted on June 19, 2013 at 04:28

1. ''IWDG using to prevent hardware bug, I think can not using to prevent FW, because when FW halt, IWDG also run and MCU not reset.'' 

===  I don't agree this. if FW is infinition loop because of some errors, IWDG is not feed and a watchdog reset generates to solve the FW issue

.

2. WWDG is cleared by timer. It is a good idea. but if non-interrupt thread is dead, timer is still runing. the reset does not happen so that WWDG can not solve this issue.

np1
Associate II
Posted on June 19, 2013 at 06:21

Hi,

1)how to reset value for IWDG ? if it is cleared by RTC or Timer - MCU can not reset when enter

infinition loop

.

2)when you anter a task which you worry it hang, you stop the timer, after that start it again...

Thinh

wenbingma2012
Associate II
Posted on June 25, 2013 at 04:36

1. Desinger should be familiar with task sheduler. and know how many time is spent for each task. Task spent time is approximate. reset IWDG value is cleared in task with probably exeed IWDG time. if IWDG value is not cleared, It must be some errors in task handling and a IWDG reset happens.

2. That is good way to use WWDG. I will try it.

bhoeneveld
Associate
Posted on October 27, 2013 at 10:31

You said that you configured the IWDG to stop runing in halt/halt-active mode.

How do you do that? Much appreciated if you can tell me.

0690X0000060MlgQAE.gif