LPC43xx windowed watchdog timer reset flag

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC43xx windowed watchdog timer reset flag

1,751 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wlamers on Fri Jul 18 05:49:50 MST 2014
I have a system that needs reset when an initialisation error occurs. Unfortunately setting bit 0 of RESET_CTRL0 of the reset generation unit (RGU) does not work as I would expect. The core seems to reset (indicated by the LED's all burning) but then it is stuck somewhere as if the wrong address is loaded or something.

Therefore I use the WWDT to force a reset. This actually works as expected. The only thing I need is to check what caused the reset (after a boot/reset). There is a flag in the MOD register of the WWDT called WDTOF (bit2). In contrast to what the manual states, this bit stays 0 after a WWDT reset. I tried setting it by hand (to 1) before starting the WWDT causing the reset. But even than is the flag 0 after the reset. Hence I can not check if the WWDT caused the reset. I tried this on two boards but both behave the same.

What am I doing wrong here?
标签 (1)
0 项奖励
回复
3 回复数

1,507 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wlamers on Mon Jul 28 06:01:25 MST 2014

Quote: DF9DQ
The problem is that a watchdog reset triggers a core reset, which then resets the watchdog peripheral itself, deleting any sign of a watchdog reset.



That explains a lot. Not a very useful flag in that case, so to say.

Thank you for your example. I had solved the issue using a suggestion from the manual is section 14.5.1 by setting a, non-initialised, variable that is given a magic number after successful boot and (a different flag) before a WWD reset. This makes it also possible to distinguish between POR, reset and WWD reset. But I like the event recorder way more and will implement that most likely.
0 项奖励
回复

1,507 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DF9DQ on Fri Jul 25 12:52:09 MST 2014
The problem is that a watchdog reset triggers a core reset, which then resets the watchdog peripheral itself, deleting any sign of a watchdog reset.

You can use indicators in the event router instead, not without another trick...  But the attached example shows what you need to do. See the comments in main.c
0 项奖励
回复

1,507 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wlamers on Mon Jul 21 11:32:24 MST 2014
Nobody has run into this before?
0 项奖励
回复