I would like to concur with the suggestion that we leave the wdt alone
(except for pinging) by default. All the ti datasheets talk about the need
to disable the watchdog. It would seem to be more confusing to operate
differently wrt the to docs (harder for those of us who have read and are
familiar with the to docs).

On Mar 14, 2011 5:12 AM, "JMGross" <msp...@grossibaer.de> wrote:





----- Ursprüngliche Nachricht -----
Von: Peter Bigot
Gesendet am: 13 Mrz 2011 12:49:47



> As a minor irritant, mspgcc is the only msp430 toolchain I know that
> immediately disables the ...
Yes, this was the reason why I reqrote the startup code in my projects (to
ensure
proper operation in an ESD-prone environment, the WDT needs to be
active ALL the time, even during startup)
It took me some time to figure out why the WDT was not triggering even if I
didn't
disable it and it should be on after a reset.
It is as annoying as the 'feature' in CCS (TIs own compiler suite) which
does not
initialize uninitialized variable space to 0 (which will speedup the startup
and
therefore usually prevent the WDT from triggering)



> main() will no longer jump to some arbitrary location instead of
returning.
> It will return, an...
Well, especially on the new G devices with only 128 bytes Ram, this
"new way" will waste ~2% of the ram since there needs to be one additional
return address on the stack. On these devices, every byte counts.
On 430X-devices, this will be 4 bytes (but then there is much more ram).


> A new option -menable-watchdog will be added which change which libcrt0.a
> file gets linked in. ...
Great.

Well, since the loop counters in the init code are word registers, there
is only one 3-instruction-loop for each init stage (copy/clear).
And running a complete loop may easily exceed default WDT timeout
on 1x/2x/4x devices (only on 5x/6x the default WDT interval is long enough)
So in my startup code, I ended up with simply triggering the WDT on each
iteration.
With the value preloaded in a register, it only takes 3 cycles/4 bytes
and is not slower than any fancy code with additional
checks/counts/whatever.

> Comments?

given :)

JMGross


------------------------------------------------------------------------------
Colocation vs. Manag...
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
------------------------------------------------------------------------------
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