EmbeddedRelated.com
Forums

Diagnose watchdog through WDINT interrupt

Started by bob...@gudgel.org January 27, 2014
I am trying to diagnose watchdog timer resets on our LPC2366 parts. I think I can create a WDINT interrupt rather than to have it just reset the processor but does anyone here know if I can analyze where the code was when the timeout occurred ?
Is this similar to diagnosing a data abort (which we do)... Is the last instruction located at address R14 -8 like it is with dabt's ?

Or can someone point me in the correct direction to find out ? I can't seem to find any app notes anywhere for this.

thanks,
boB

An Engineer's Guide to the LPC2100 Series

Hmmm... Now I am having trouble resetting the processor by branching to address 0 in the WDINT routine. This is probably because the WDT flag is still set or something.

Maybe someone knows another way to properly do a reset without the watchdog that can reset all of the interrupt flags first ?

You also evidently can NOT re-initialize the WDMOD WDT mode after it has been initialized once BUT I also do not see anywhere in the LPC2368 documentation that talks about this.

Everybody just lest the WDT reset the chip, huh ? (WDMOD = 3)... Nobody has actually done a WDINT ? (WDMOD = 1)

Thanks,
boB
OK, I figured it out. I did however find the "clue" to the answer by looking in another NXP processor manual other than the LPC2368 manual (http://www.nxp.com/documents/user_manual/UM10524.pdf)... The clue was this...

"Once the WDEN, WDPROTECT, or WDRESET bits are set they can not be cleared by software. Both flags are cleared by an external reset or a Watchdog timer reset."

So, it did not explicitly tell me, but I found out by trying that you CAN actually SET the WDRESET bit, just not clear it, so that was the answer.

No app notes on this stuff so gotta invent things I guess.

boB
Hi folks, has anyone done much work with the low power modes on LPC17xx devices?

I have a test board here with a bare processor on it, and I am getting inconsistent results, and I do not know why.
Using the code in app note AN10915 I set the device into sleep, deep sleep, power down and deep power down modes and got readings of 5mA, 220uA, 47uA and 0.5uA respectively, close to the datasheet values. I then did some mucking around with various ways of waking it up again.

However when I removed the wakeup and went back to apparently the same code I can not now repeat those values, in power down mode the best I can get is about 500uA. Deep power down mode does still give 0.5uA. I must be missing something obvious but I can't work out what it is. Any ideas?
--
Tim Mitchell


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/lpc2000/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/lpc2000/join
(Yahoo! ID required)

<*> To change settings via email:
l...
l...

<*> To unsubscribe from this group, send an email to:
l...

<*> Your use of Yahoo Groups is subject to:
http://info.yahoo.com/legal/us/yahoo/utos/terms/
fixed it now...

We had the TDO pin (JTAG) pulled high with a 10K resistor as recommended on the ARM datasheet. Removing this pullup got the power down current down to 100uA.
--
Tim Mitchell


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/lpc2000/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/lpc2000/join
(Yahoo! ID required)

<*> To change settings via email:
l...
l...

<*> To unsubscribe from this group, send an email to:
l...

<*> Your use of Yahoo Groups is subject to:
http://info.yahoo.com/legal/us/yahoo/utos/terms/