EmbeddedRelated.com
Forums

Use of internal WATCHDOG for MSP430F2418

Started by ti2tt April 10, 2009
Hello Forum members,

I am using MSP430F2418 with CrossStudio. I want to use internal watchdog of this controller. I have configured the watchdog as

WDTCTL = WDTPW + WDTHOLD;
WDTCTL = WDT_ARST_1000;

The refresh routine for watchdog counter consists as:

WDTCTL = WDTPW + WDTCNTCL;

With this configuration, I am getting a watchdog reset after certain intervals. Here I am using a XTAL of 1MHz connected to XT1 pin. I have configured MCLK%0KHz and ACLK=1MHz. I am using ACLK as source for watchdog counter.
What is the reason for watchdog getting resetted? Is any other initialisation/handling is required for the watchdog?
The datasheet for MSP430F2418 says that "The WDT+ counter clock should be slower or equal than the system (MCLK) frequency". Does this mean that my clock source selection will not work for watchdog? What combination I can use for watchdog clock source? Has anyone faced any issue other than this with the internal watchdog of MSP430?

Your earliest help in this regard will be highly appreciated. Thanks in advance.

Beginning Microcontrollers with the MSP430

you have a very short wdt period..only about 8000 mclk periods.. usualy aclk is 32khz and the value you use in your file would be a 1 second time out..

The default wd at powerup is around 32ms and if its not immediately refreshed the processor would reset fairly quicly in main (except for crossworks which disables the wd in cstartu by default)

Choose a more realistic WD period and clock rate..
--- On Fri, 4/10/09, ti2tt wrote:

From: ti2tt
Subject: [msp430] Use of internal WATCHDOG for MSP430F2418
To: m...
Date: Friday, April 10, 2009, 5:02 AM

Hello Forum members,

I am using MSP430F2418 with CrossStudio. I want to use internal watchdog of this controller. I have configured the watchdog as

WDTCTL = WDTPW + WDTHOLD;
WDTCTL = WDT_ARST_1000;

The refresh routine for watchdog counter consists as:

WDTCTL = WDTPW + WDTCNTCL;

With this configuration, I am getting a watchdog reset after certain intervals. Here I am using a XTAL of 1MHz connected to XT1 pin. I have configured MCLK=250KHz and ACLK=1MHz. I am using ACLK as source for watchdog counter.
What is the reason for watchdog getting resetted? Is any other initialisation/ handling is required for the watchdog?

The datasheet for MSP430F2418 says that "The WDT+ counter clock should be slower or equal than the system (MCLK) frequency". Does this mean that my clock source selection will not work for watchdog? What combination I can use for watchdog clock source? Has anyone faced any issue other than this with the internal watchdog of MSP430?

Your earliest help in this regard will be highly appreciated. Thanks in advance.



But as I am using ACLK as clock source which is 1MHz and from the datasheet, WDTISx bit define the clock divider which I have set to 00 means watchdog clock source/32768=1MHz/32768. Whether actual ACLK will be used as watchdog clock source or internal 32khz as you are saying will be used as clock source?

--- In m..., Joe Radomski wrote:
>
> you have a very short wdt period..only about 8000 mclk periods.. usualy aclk is 32khz and the value you use in your file would be a 1 second time out..
>
> The default wd at powerup is around 32ms and if its not immediately refreshed the processor would reset fairly quicly in main (except for crossworks which disables the wd in cstartu by default)
>
> Choose a more realistic WD period and clock rate..
>
>
> --- On Fri, 4/10/09, ti2tt wrote:
>
> From: ti2tt
> Subject: [msp430] Use of internal WATCHDOG for MSP430F2418
> To: m...
> Date: Friday, April 10, 2009, 5:02 AM
>
>
>
>
>
>
>
>
> Hello Forum members,
>
> I am using MSP430F2418 with CrossStudio. I want to use internal watchdog of this controller. I have configured the watchdog as
>
> WDTCTL = WDTPW + WDTHOLD;
> WDTCTL = WDT_ARST_1000;
>
> The refresh routine for watchdog counter consists as:
>
> WDTCTL = WDTPW + WDTCNTCL;
>
> With this configuration, I am getting a watchdog reset after certain intervals. Here I am using a XTAL of 1MHz connected to XT1 pin. I have configured MCLK=250KHz and ACLK=1MHz. I am using ACLK as source for watchdog counter.
> What is the reason for watchdog getting resetted? Is any other initialisation/ handling is required for the watchdog?
>
> The datasheet for MSP430F2418 says that "The WDT+ counter clock should be slower or equal than the system (MCLK) frequency". Does this mean that my clock source selection will not work for watchdog? What combination I can use for watchdog clock source? Has anyone faced any issue other than this with the internal watchdog of MSP430?
>
> Your earliest help in this regard will be highly appreciated. Thanks in advance.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

if for need to source something else at 1mhz by aclk then you are going to have to bump up mclk significantly..

You are misunderstanding the divider, its 1 mhz / 32 not 32khz!

thats why the definition you are using produces a 1 second dt timeout when sourced by 32khz.. 32khz /32 is approximately 1000ms or 1 second!

--- On Fri, 4/10/09, ti2tt wrote:

From: ti2tt
Subject: [msp430] Re: Use of internal WATCHDOG for MSP430F2418
To: m...
Date: Friday, April 10, 2009, 9:40 AM

But as I am using ACLK as clock source which is 1MHz and from the datasheet, WDTISx bit define the clock divider which I have set to 00 means watchdog clock source/32768= 1MHz/32768. Whether actual ACLK will be used as watchdog clock source or internal 32khz as you are saying will be used as clock source?

--- In msp430@yahoogroups. com, Joe Radomski wrote:
>
> you have a very short wdt period..only about 8000 mclk periods.. usualy aclk is 32khz and the value you use in your file would be a 1 second time out..
>
> The default wd at powerup is around 32ms and if its not immediately refreshed the processor would reset fairly quicly in main (except for crossworks which disables the wd in cstartu by default)
>
> Choose a more realistic WD period and clock rate..
>
>
> --- On Fri, 4/10/09, ti2tt wrote:
>
> From: ti2tt
> Subject: [msp430] Use of internal WATCHDOG for MSP430F2418
> To: msp430@yahoogroups. com
> Date: Friday, April 10, 2009, 5:02 AM
>
>
>
>
>
>
>
>
> Hello Forum members,
>
> I am using MSP430F2418 with CrossStudio. I want to use internal watchdog of this controller. I have configured the watchdog as
>
> WDTCTL = WDTPW + WDTHOLD;
> WDTCTL = WDT_ARST_1000;
>
> The refresh routine for watchdog counter consists as:
>
> WDTCTL = WDTPW + WDTCNTCL;
>
> With this configuration, I am getting a watchdog reset after certain intervals. Here I am using a XTAL of 1MHz connected to XT1 pin. I have configured MCLK=250KHz and ACLK=1MHz. I am using ACLK as source for watchdog counter.
> What is the reason for watchdog getting resetted? Is any other initialisation/ handling is required for the watchdog?
>
> The datasheet for MSP430F2418 says that "The WDT+ counter clock should be slower or equal than the system (MCLK) frequency". Does this mean that my clock source selection will not work for watchdog? What combination I can use for watchdog clock source? Has anyone faced any issue other than this with the internal watchdog of MSP430?
>
> Your earliest help in this regard will be highly appreciated. Thanks in advance.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



I have a question for you.
If I use CrossStudio and configure a variable as:

val = FIVE;
val = THREE;

What will be the content of "val"?
(a) 5
(b) 3
(c) depends on what THREE is

-- OCY
--- In m..., "ti2tt" wrote:
>
> Hello Forum members,
>
> I am using MSP430F2418 with CrossStudio. I want to use internal watchdog of this controller. I have configured the watchdog as
>
> WDTCTL = WDTPW + WDTHOLD;
> WDTCTL = WDT_ARST_1000;
>
> The refresh routine for watchdog counter consists as:
>
> WDTCTL = WDTPW + WDTCNTCL;
>
> With this configuration, I am getting a watchdog reset after certain intervals. Here I am using a XTAL of 1MHz connected to XT1 pin. I have configured MCLK%0KHz and ACLK=1MHz. I am using ACLK as source for watchdog counter.
> What is the reason for watchdog getting resetted? Is any other initialisation/handling is required for the watchdog?
> The datasheet for MSP430F2418 says that "The WDT+ counter clock should be slower or equal than the system (MCLK) frequency". Does this mean that my clock source selection will not work for watchdog? What combination I can use for watchdog clock source? Has anyone faced any issue other than this with the internal watchdog of MSP430?
>
> Your earliest help in this regard will be highly appreciated. Thanks in advance.
>

Too funny, O_C_Y!

>
> I have a question for you.
> If I use CrossStudio and configure a variable as:
>
> val = FIVE;
> val = THREE;
>
> What will be the content of "val"?
> (a) 5
> (b) 3
> (c) depends on what THREE is
>
> -- OCY
> --- In m..., "ti2tt" wrote:
> >
> > Hello Forum members,
> >
> > I am using MSP430F2418 with CrossStudio. I want to use internal watchdog of this controller. I have configured the watchdog as
> >
> > WDTCTL = WDTPW + WDTHOLD;
> > WDTCTL = WDT_ARST_1000;
> >
> > The refresh routine for watchdog counter consists as:
> >
> > WDTCTL = WDTPW + WDTCNTCL;
> >
> > With this configuration, I am getting a watchdog reset after certain intervals. Here I am using a XTAL of 1MHz connected to XT1 pin. I have configured MCLK%0KHz and ACLK=1MHz. I am using ACLK as source for watchdog counter.
> > What is the reason for watchdog getting resetted? Is any other initialisation/handling is required for the watchdog?
> >
> >
> > The datasheet for MSP430F2418 says that "The WDT+ counter clock should be slower or equal than the system (MCLK) frequency". Does this mean that my clock source selection will not work for watchdog? What combination I can use for watchdog clock source? Has anyone faced any issue other than this with the internal watchdog of MSP430?
> >
> > Your earliest help in this regard will be highly appreciated. Thanks in advance.
>

It's not funny. He's trying to get him to look at his code.
Ray
I know what he's trying to do. It's still funny.

>
> It's not funny. He's trying to get him to look at his code.
> Ray
>

I think you need to use:
WDTCTL = WDTPW + WDT_ARST_1000;
Changing the WD without the password will cause a watchdog reset.

--- In m..., "ti2tt" wrote:
>
> Hello Forum members,
>
> I am using MSP430F2418 with CrossStudio. I want to use internal watchdog of this controller. I have configured the watchdog as
>
> WDTCTL = WDTPW + WDTHOLD;
> WDTCTL = WDT_ARST_1000;
>
> The refresh routine for watchdog counter consists as:
>
> WDTCTL = WDTPW + WDTCNTCL;
>
> With this configuration, I am getting a watchdog reset after certain intervals. Here I am using a XTAL of 1MHz connected to XT1 pin. I have configured MCLK%0KHz and ACLK=1MHz. I am using ACLK as source for watchdog counter.
> What is the reason for watchdog getting resetted? Is any other initialisation/handling is required for the watchdog?
> The datasheet for MSP430F2418 says that "The WDT+ counter clock should be slower or equal than the system (MCLK) frequency". Does this mean that my clock source selection will not work for watchdog? What combination I can use for watchdog clock source? Has anyone faced any issue other than this with the internal watchdog of MSP430?
>
> Your earliest help in this regard will be highly appreciated. Thanks in advance.
>

you are correct.. the way hisexample is currently setting the register will issue an immediate reset.. since no password is provided, but if he does get it set correcty the timeout period is very small and will probably reset anyway..





--- On Fri, 4/10/09, citymouse2u wrote:

From: citymouse2u
Subject: [msp430] Re: Use of internal WATCHDOG for MSP430F2418
To: m...
Date: Friday, April 10, 2009, 1:24 PM

I think you need to use:
WDTCTL = WDTPW + WDT_ARST_1000;
Changing the WD without the password will cause a watchdog reset.

--- In msp430@yahoogroups. com, "ti2tt" wrote:
>
> Hello Forum members,
>
> I am using MSP430F2418 with CrossStudio. I want to use internal watchdog of this controller. I have configured the watchdog as
>
> WDTCTL = WDTPW + WDTHOLD;
> WDTCTL = WDT_ARST_1000;
>
> The refresh routine for watchdog counter consists as:
>
> WDTCTL = WDTPW + WDTCNTCL;
>
> With this configuration, I am getting a watchdog reset after certain intervals. Here I am using a XTAL of 1MHz connected to XT1 pin. I have configured MCLK=250KHz and ACLK=1MHz. I am using ACLK as source for watchdog counter.
> What is the reason for watchdog getting resetted? Is any other initialisation/ handling is required for the watchdog?
>
>
> The datasheet for MSP430F2418 says that "The WDT+ counter clock should be slower or equal than the system (MCLK) frequency". Does this mean that my clock source selection will not work for watchdog? What combination I can use for watchdog clock source? Has anyone faced any issue other than this with the internal watchdog of MSP430?
>
> Your earliest help in this regard will be highly appreciated. Thanks in advance.
>