On 2011-03-17, JMGross <msp...@grossibaer.de> wrote:
> ----- Urspr?ngliche Nachricht -----
> Von: Grant Edwards
> Gesendet am: 16 Mrz 2011 17:51:51
>
>>>>> 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?
>
> The processor datasheet says that after a BOR/POR/PUC the WDT is
> enabled.

And that's still true.  The processor datasheet is mute about the
behavior of startup code that's shipped with compilers.

> Disabling it by inherently placed default compiler code, especially
> if this is neither well documented nor easily to prevent, is worse
> than bad.

I agree that the behavior needs to be documented and there should be
an option to specify that the WDT not be disabled during startup.

>> IMHO, leaving it enabled during startup would have been more
>> desirable.
>
> Not only more desireable, but a MUST.

But, it wasn't done that way, and we can't decide now that it MUST
have been.

>> I think a way to prevent the startup code from disabling the WDT is
>> an absolute requirement.
>
> indeed. Here we totally agree.
>
>> But, as long as there's a way to get either behavior, I don't think
>> changing the default behavior should be undertaken lightly.
>
> Not if 'the way' means writing your own startup code (in assembly
> language) or using compiler-specific switches, attrivutes and other
> things, just to get the expeccted default behavior.

Agreed. Replacing the startup code with user-written code isn't a
good-enough "option".

> besides being less than not obvious, it also digs the gap between
> mspgcc and the 'official' MSP compilers even deeper.
>
>>> 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?
>
> Yes, if it is not the default behavior.

> Imagine a PC where the BIOS will silently switch off the UDMA without
> an option to enable it,

My hypothetical stated that there _was_ an option to leave it enabled.

You seem to be knocking down a straw man.

-- 
Grant Edwards               grant.b.edwards        Yow! I feel like a wet
                                  at               parking meter on Darvon!
                              gmail.com            


------------------------------------------------------------------------------
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