Pumpkin, Inc.

Pumpkin User Forums

#define OSCLEAR_WATCHDOG_TIMER()

For issues specific to TI's MSP430 line of ultra-low-power microcontrollers, including compilers (e.g. Quadravox AQ430), IDEs (e.g. IAR Embedded Workbench) and development tools (e.g. TI MSP-FET430 Flash Emulation Tool).

#define OSCLEAR_WATCHDOG_TIMER()

Postby Phil W » Wed Mar 05, 2003 4:05 am

Hi,

It may be better to define OSCLEAR_WATCHDOG_TIMER() as
#define OSCLEAR_WATCHDOG_TIMER() WDTCTL = (WDTCTL & 0x00FF) | WDTPW | WDTCNTCL

instead of
#define OSCLEAR_WATCHDOG_TIMER() WDTCTL = (WDTCTL & 0x00FF) + WDTPW + WDTCNTCL

As it stands now, in most cases the current format will be ok as the WDTCNTCL bit always reads as zero. However if this was not the case the result of the summation would corrupt the desired bit structure, as the IAR compiler generates summation code instead of bit manipulation code.

regards
Phil

Phil W
 
Posts: 36
Joined: Tue Jan 14, 2003 12:00 am
Location: penrith nsw australia

Re: #define OSCLEAR_WATCHDOG_TIMER()

Postby aek » Wed Mar 05, 2003 9:43 am

Hi Phil.

I went ahead and made the changes to the entries in salvolib.h (these control what goes into the libraries).

I'll update the tutorial etc. salvocfg.h files also so that they use the OR instead of ADD for the next release.

Regards,

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm


Return to TI's MSP430

Who is online

Users browsing this forum: No registered users and 1 guest

cron