On 2011-03-16, JMGross <msp...@grossibaer.de> wrote:
>
> ----- Urspr?ngliche Nachricht -----
> Von: Chris Liechti
> Gesendet am: 15 Mrz 2011 20:26:40
>
>>> It's not only that the datasheets talk about disabling the watchdog.
>>> Disabling an already disabled watchdog does no harm.
>
>> neither is enabling it again a problem, if you actively want to use it.
>
> But not enabling it when the docs say it is enabled

What docs say it's enabled when main() is entered in an app built with
mspgcc?

> while it has been disabled by the compiler _does_ do harm.

IMHO, leaving it enabled during startup would have been more
desirable.  I think a way to prevent the startup code from disabling
the WDT is an absolute requirement.

But, as long as there's a way to get either behavior, I don't think
changing the default behavior should be undertaken lightly.

> There are many devices where the MCU is only powered when an event
> occurs. The MSP is no chip for a router that runs for mothn without
> reboot. It is for devices which require low power consumption. And
> the lowest is shutting down when not required. :) That's what the new
> .5 LPMs were designed for.
>
> However, being unprotected for some milliseconds (which is an
> eternity) while you think you are, isn't good. In fact, it is way
> worse than being protected when you don't think you are :)

Is an option to prevent the WDT from being disabled by startup code
insufficient for that scenario?

>> a hardware watchdog is also often used to protect against programming
>> errors (e.g. not enough stack space for all combinations of interrupts
>> and foreground code). this kind of protection is not needed during
>> startup as the code there is proven (and interrupts locked).
>
> Using a WDT for dixing software bugs is very bad style. What happens?
> The device resets and runs into the same condition again. It's a
> dirty way to 'fix' defective code or faulty program design.

One might claim that having a backup generator available to power the
cooling pumps in a nuclear reactor is "bad style" too, but I'm not
going to argue against that!

-- 
Grant Edwards               grant.b.edwards        Yow! I'm having an
                                  at               EMOTIONAL OUTBURST!!  But,
                              gmail.com            uh, WHY is there a WAFFLE
                                                   in my PAJAMA POCKET??


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to