Are you "tickling" the watchdog? Once enabled, you must reset the timer regularly - to tell the WDT that life is good. Otherwise it will bite you by resetting (in a loop) _____ From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com] On Behalf Of Jim Parziale Sent: Tuesday, December 06, 2005 7:37 AM To: lpc2000@yahoogroups.com Subject: Re: [lpc2000] Problem with watchdog Assuming you have the correct definitions for your symbols, the only thing I can think of is setting the timeout to the largest integer like that. Maybe you could try a different large integer? These are what you should be using: WDEN = BIT(0) = 0x00000001 WDRESET = BIT(1) = 0x00000002 WDMOD = (uint8_t *)(0xE0000000) WDTC = (uint32_t *)(0xE0000004) WDFEED = (uint8_t *)(0xE0000008) ---------------------------------------------------------- Jim Parziale Email: nuncio.bitis@gmail.com Malden, MA ---------------------------------------------------------- On 12/6/05, Ake Hedman, eurosource <akhe@...> wrote: > > Hi all. > > I am trying to enable the watchdog but the result is a total hang of the > board. Not even the bootloader is possible to reach after the crash and > I have to reapply power with P0.14 low to get access to the botloader > again. Reset is not enough. > > The code to initialize the watchdog is > > // initialize the watchdog timer > WDTC = 0xffffffff; // 15000000; // One second > = 15000000 > WDMOD = WDEN | WDRESET; // Activate watchdog > WDFEED = 0xAA; WDFEED = 0x55; > > I must have misunderstood the WD functionality. What am I doing wrong? > In the above code the watchdog should not trigger until 5 minutes > elapsed so even if a vector should be wrong the code that follow should > run for a while but as soon as I write to the WDMOD register I get a hang. > > /Ake > > -- > --- > Ake Hedman (YAP - Yet Another Programmer) > eurosource, Brattbergavägen 17, 820 50 LOS, Sweden > Phone: (46) 657 413430 Cellular: (46) 73 84 84 102 > Company home: http://www.eurosource.se > Kryddor/Te/Kaffe: http://www.brattberg.com > Personal homepage: http://www.eurosource.se/akhe > Automated home: http://www.vscp.org > > [Non-text portions of this message have been removed] _____ YAHOO! GROUPS LINKS * Visit your group "lpc2000 <http://groups.yahoo.com/group/lpc2000> " on the web. * To unsubscribe from this group, send an email to: lpc2000-unsubscribe@yahoogroups.com <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . _____ [Non-text portions of this message have been removed]
Message
RE: [lpc2000] Problem with watchdog
2005-12-07 by Dan Beadle
Attachments
- No local attachments were found for this message.