On Thu, Aug 25, 2011 at 2:26 PM, M. Andree <mand...@mail.uni-paderborn.de> wrote: > Am 21.08.2011 13:18, schrieb Peter Bigot: >> As an example, without -mdisable-watchdog you'll still get versions of two >> of those other routines that will store the contents of r5 into WDTCTL >> periodically as they go about their work. If you didn't load r5 with WDTPW >> + WDTHOLD in __low_level_init, lord only knows what's going to happen, but >> among other things, the watchdog will probably be re-enabled with some >> random timeout. > > No. If you poke something into WDTCTL that does NOT contain WDTPW in the > proper position, the nodes are going to do a POR (power-on reset). It's > a bit less than a PUC you get after powering up, and can cause other > nasty effects (been there had those)... and documented behaviour.
Thanks for re-raising this issue: I'd forgotten that WDT password violations were trapped. What you said isn't quite right: a WDT violation does do a PUC, but not a POR. A PUC doesn't really clear everything that a POR does. Peripheral register configurations are left in place, and I believe some interrupts may remain pending. Not a good state to be in. > In fact if you want a soft boot, be sure that your bootstrap (reads if > needed and) clears things a PUC would initialize and poke something you > can pull from the constant generator into WDTCTL. Of course you don't > want that in the bootstrap for normal operation... If your MCU supports it (the feature is in the 5xx family at least), this suggestion from http://tech.groups.yahoo.com/group/msp430/message/48258 is way better than trying to manually put everything back to POR state. PMMCTL0 |= PMMSWPOR; Maybe put that into the bootstrap code and execute it if you got there for any reason other than a real POR. Peter ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users