The purpose of this group is to foster exchange of information on the Texas Instruments MSP430 family of microcontrollers and related tools. Everyone welcome, all levels of familiarity/expertise.
MSP430F427 - Oscillator Fault - Gerhard Wilsnach - Sep 22 11:09:36 2008
Hi,
I'm working on a protection relay application using the MSP430F427.
Some of the units will not start-up, until I re-flash them, or debug the
code and stop it either by setting a break-point or using the manual
break in the main loop. If I do it before the main loop, it still does
not start up, it keeps resetting.
* I have set up the WDT to reset the MSP every 1s if not
reset/toggled by software.
* The main clock is setup to run at 8MHz from the DCO (sourced
from 32768 Hz crystal) and FLL.
* The clock is set to 1MHz just before entering LPM3 and will
only run at 8MHz if the SVSOP is not set (meaning no low power condition
present)
* I also do a info flash BCC check in software before every
start-up to make sure the calibration factors are still correct.
I analysed the problem and found that, when the unit does not want to
start-up, it is continuously being reset. I then checked all the flags,
and saw that the oscillator fault flag is being set. Meaning there is a
fault on the oscillator. But when I disable the WDT or insert a break
point and then run the code again, the unit works fine. Meaning there is
no oscillator fault????
* I'm using a normal 32768 Hz crystal, I've set the MSP's
internal load caps to 10pF.
If the unit works fine for a while, and I remove it completely from its
supply and leave it for say a minute, then plug it back into the supply,
the unit again does not want to start-up. Most of the units work the
first time, but there are some that behaves in the way described above.
Any help or ideas will be appreciated.
.
sgId=38365/stime=1222094534/nc1=4507179/nc2=3848640/nc3=5370603>
#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared
by MailMarshal
#####################################################################################
#####################################################################################
Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from any system and destroy any copies.
Thank You.
#####################################################################################
[Non-text portions of this message have been removed]
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: MSP430F427 - Oscillator Fault - Rick Low - Sep 22 20:35:15 2008
--- In m...@yahoogroups.com, "Gerhard Wilsnach"
wrote:
> I'm working on a protection relay application using the MSP430F427.
> Some of the units will not start-up, until I re-flash them, or debug the
> code and stop it either by setting a break-point or using the manual
> break in the main loop. If I do it before the main loop, it still does
> not start up, it keeps resetting.
Hello Gerhard, here are a few ideas.
First, what is the soure of the continuous resets? Is it NMI, SVS, or
WDT? What I like to do is write stub ISRs for every interrupt vector,
containing nothing but "while(1);". That way you can trap spurious
interrupts with the debugger.
Second, do you have any large initialized data arrays, or is your info
flash BCC check done before execution gets to main()? If so, the
watchdog timer may be expiring before execution even gets to main().
To avoid time-consuming data initialization, use the __no_init keyword
on any large arrays.
> * I have set up the WDT to reset the MSP every 1s if not
> reset/toggled by software.
>
> * The main clock is setup to run at 8MHz from the DCO (sourced
> from 32768 Hz crystal) and FLL.
>
> * The clock is set to 1MHz just before entering LPM3 and will
> only run at 8MHz if the SVSOP is not set (meaning no low power condition
> present)
Have you configured the SVS to generate a brownout reset?
Also, do you explicitly set the DCO to 1 MHz? If not, I believe 1 MHz
is the default DCO frequency for the F427, so it would mean your FLL
and DCO configuration did not work properly.
>
> * I also do a info flash BCC check in software before every
> start-up to make sure the calibration factors are still correct.
>
>
>
> I analysed the problem and found that, when the unit does not want to
> start-up, it is continuously being reset. I then checked all the flags,
> and saw that the oscillator fault flag is being set. Meaning there is a
> fault on the oscillator. But when I disable the WDT or insert a break
> point and then run the code again, the unit works fine. Meaning there is
> no oscillator fault????
An oscillator fault will only cause an interrupt if the OFIE bit is
set in special function register IE1. The power up default is for OFIE
to be cleared. This is why you got no interrupt even with an
oscillator fault.
>
>
>
> * I'm using a normal 32768 Hz crystal, I've set the MSP's
> internal load caps to 10pF.
>
>
>
> If the unit works fine for a while, and I remove it completely from its
> supply and leave it for say a minute, then plug it back into the supply,
> the unit again does not want to start-up. Most of the units work the
> first time, but there are some that behaves in the way described above.
>
>
>
> Any help or ideas will be appreciated.
>
> .
>
I hope that gives you some ideas.
--rick
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: MSP430F427 - Oscillator Fault - tintronic - Sep 23 14:50:45 2008
It would probably help if you post your oscilator initialization
routine. The problem might be there. If the oscilator doesn't start,
does your code try to re-start it again or does it just try once and
then gets stuck?
Michael K.
--- In m...@yahoogroups.com, "Gerhard Wilsnach"
wrote:
>
> Hi,
>
>
>
> I'm working on a protection relay application using the MSP430F427.
> Some of the units will not start-up, until I re-flash them, or debug the
> code and stop it either by setting a break-point or using the manual
> break in the main loop. If I do it before the main loop, it still does
> not start up, it keeps resetting.
>
>
>
> * I have set up the WDT to reset the MSP every 1s if not
> reset/toggled by software.
>
> * The main clock is setup to run at 8MHz from the DCO (sourced
> from 32768 Hz crystal) and FLL.
>
> * The clock is set to 1MHz just before entering LPM3 and will
> only run at 8MHz if the SVSOP is not set (meaning no low power condition
> present)
>
> * I also do a info flash BCC check in software before every
> start-up to make sure the calibration factors are still correct.
>
>
>
> I analysed the problem and found that, when the unit does not want to
> start-up, it is continuously being reset. I then checked all the flags,
> and saw that the oscillator fault flag is being set. Meaning there is a
> fault on the oscillator. But when I disable the WDT or insert a break
> point and then run the code again, the unit works fine. Meaning there is
> no oscillator fault????
>
>
>
> * I'm using a normal 32768 Hz crystal, I've set the MSP's
> internal load caps to 10pF.
>
>
>
> If the unit works fine for a while, and I remove it completely from its
> supply and leave it for say a minute, then plug it back into the supply,
> the unit again does not want to start-up. Most of the units work the
> first time, but there are some that behaves in the way described above.
>
>
>
> Any help or ideas will be appreciated.
>
> .
>
>
>
> sgId=38365/stime=1222094534/nc1=4507179/nc2=3848640/nc3=5370603>
>
>
#####################################################################################
> This e-mail message has been scanned for Viruses and Content and
cleared
> by MailMarshal
>
#####################################################################################
#####################################################################################
> Attention:
> The information contained in this message and or attachments is intended
> only for the person or entity to which it is addressed and may contain
> confidential and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance upon,
> this information by persons or entities other than the intended
recipient
> is prohibited. If you received this in error, please contact the
sender and
> delete the material from any system and destroy any copies.
>
> Thank You.
>
#####################################################################################
> [Non-text portions of this message have been removed]
>
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: MSP430F427 - Oscillator Fault - Graham Barnes - Sep 24 3:02:05 2008
Hi
=C2=A0
It seems to me that perhaps the 32.768KHz oscillator on some of the MSP430 =
families, is indeed very slow to start-up (a consequence of the very low po=
wer consumption).=C2=A0 I have got around this problem in the past by allow=
ing the oscillator to run with no additional loading capacitors, whilst I s=
ervice some small amount of firmware (setup ports, timers=C2=A0etc) and the=
n add the capacitors to get the timing right after this initial condition.=
=C2=A0 A low supply voltage has also been seen to slow the oscillator start=
-up some.
=C2=A0
Graham
--- On Tue, 23/9/08, tintronic
wrote:
From: tintronic
Subject: [msp430] Re: MSP430F427 - Oscillator Fault
To: m...@yahoogroups.com
Date: Tuesday, 23 September, 2008, 7:50 PM
It would probably help if you post your oscilator initialization
routine. The problem might be there. If the oscilator doesn't start,
does your code try to re-start it again or does it just try once and
then gets stuck?=20
Michael K.
--- In msp430@yahoogroups. com, "Gerhard Wilsnach" wrote:
>
> Hi,
>=20
>=20
>=20
> I'm working on a protection relay application using the MSP430F427.
> Some of the units will not start-up, until I re-flash them, or debug the
> code and stop it either by setting a break-point or using the manual
> break in the main loop. If I do it before the main loop, it still does
> not start up, it keeps resetting.
>=20
>=20
>=20
> * I have set up the WDT to reset the MSP every 1s if not
> reset/toggled by software.
>=20
> * The main clock is setup to run at 8MHz from the DCO (sourced
> from 32768 Hz crystal) and FLL.=20
>=20
> * The clock is set to 1MHz just before entering LPM3 and will
> only run at 8MHz if the SVSOP is not set (meaning no low power condition
> present)
>=20
> * I also do a info flash BCC check in software before every
> start-up to make sure the calibration factors are still correct.
>=20
>=20
>=20
> I analysed the problem and found that, when the unit does not want to
> start-up, it is continuously being reset. I then checked all the flags,
> and saw that the oscillator fault flag is being set. Meaning there is a
> fault on the oscillator. But when I disable the WDT or insert a break
> point and then run the code again, the unit works fine. Meaning there is
> no oscillator fault????
>=20
>=20
>=20
> * I'm using a normal 32768 Hz crystal, I've set the MSP's
> internal load caps to 10pF.=20
>=20
>=20
>=20
> If the unit works fine for a while, and I remove it completely from its
> supply and leave it for say a minute, then plug it back into the supply,
> the unit again does not want to start-up. Most of the units work the
> first time, but there are some that behaves in the way described above.
>=20
>=20
>=20
> Any help or ideas will be appreciated.
>=20
> .
>=20
>=20
>
50053 78/m
> sgId=3D38365/stime=3D 1222094534/ nc1=3D4507179/ nc2=3D3848640/ nc3=3D537=
0603>=20
>=20
>=20
>=20
>
############ ######### ######### ######### ######### ######### ######### ##=
####### ######### #
> This e-mail message has been scanned for Viruses and Content and
cleared=20
> by MailMarshal
>
############ ######### ######### ######### ######### ######### ######### ##=
####### ######### #
>=20
>
############ ######### ######### ######### ######### ######### ######### ##=
####### ######### #
> Attention:
> The information contained in this message and or attachments is intended
> only for the person or entity to which it is addressed and may contain
> confidential and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance upon,
> this information by persons or entities other than the intended
recipient
> is prohibited. If you received this in error, please contact the
sender and
> delete the material from any system and destroy any copies.
>=20
> Thank You.
>
############ ######### ######### ######### ######### ######### ######### ##=
####### ######### #
>=20
>=20
> [Non-text portions of this message have been removed]
>
=20
=20=20=20=20=20=20
[Non-text portions of this message have been removed]
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: MSP430F427 - Oscillator Fault - "stefan.hauenstein" - Sep 24 9:41:50 2008
Hi,
it's possible that the startup time of your oscillator is longer than
WDT timeout. So the WDT is reseting the device while you're waiting
for a valid oscillator function.
Best regards,
Stefan
--- In m...@yahoogroups.com, "Gerhard Wilsnach"
wrote:
>
> Hi,
>
>
>
> I'm working on a protection relay application using the MSP430F427.
> Some of the units will not start-up, until I re-flash them, or
debug the
> code and stop it either by setting a break-point or using the manual
> break in the main loop. If I do it before the main loop, it still
does
> not start up, it keeps resetting.
>
>
>
> * I have set up the WDT to reset the MSP every 1s if not
> reset/toggled by software.
>
> * The main clock is setup to run at 8MHz from the DCO
(sourced
> from 32768 Hz crystal) and FLL.
>
> * The clock is set to 1MHz just before entering LPM3 and
will
> only run at 8MHz if the SVSOP is not set (meaning no low power
condition
> present)
>
> * I also do a info flash BCC check in software before every
> start-up to make sure the calibration factors are still correct.
>
>
>
> I analysed the problem and found that, when the unit does not want
to
> start-up, it is continuously being reset. I then checked all the
flags,
> and saw that the oscillator fault flag is being set. Meaning there
is a
> fault on the oscillator. But when I disable the WDT or insert a
break
> point and then run the code again, the unit works fine. Meaning
there is
> no oscillator fault????
>
>
>
> * I'm using a normal 32768 Hz crystal, I've set the MSP's
> internal load caps to 10pF.
>
>
>
> If the unit works fine for a while, and I remove it completely from
its
> supply and leave it for say a minute, then plug it back into the
supply,
> the unit again does not want to start-up. Most of the units work the
> first time, but there are some that behaves in the way described
above.
>
>
>
> Any help or ideas will be appreciated.
>
> .
>
>
>
s=97359714/grpId=2342629/grpspId=1705005378/m
> sgId=38365/stime=1222094534/nc1=4507179/nc2=3848640/nc3=5370603>
>
>
######################################################################
###############
> This e-mail message has been scanned for Viruses and Content and
cleared
> by MailMarshal
>
######################################################################
###############
######################################################################
###############
> Attention:
> The information contained in this message and or attachments is
intended
> only for the person or entity to which it is addressed and may
contain
> confidential and/or privileged material. Any review,
retransmission,
> dissemination or other use of, or taking of any action in reliance
upon,
> this information by persons or entities other than the intended
recipient
> is prohibited. If you received this in error, please contact the
sender and
> delete the material from any system and destroy any copies.
>
> Thank You.
>
######################################################################
###############
> [Non-text portions of this message have been removed]
>
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )RE: Re: MSP430F427 - Oscillator Fault - Gerhard Wilsnach - Oct 13 5:10:12 2008
Hi Guys
Thanks for the replies, we fixed it by dropping the operational
frequency to 4Mhz (uC always operational at all the supply voltages!).
We also looked carefully to the startingup/switch over to PLL'ed 32khz
and VCO only operation based on you comments.
The confusion was more to do with poor documentation regarding the SVS
and behaviour of uC under low (sub 1.8V conditions). Texas has a few
undefined areas of operation and using a supercap with the low power
modes cause the uC to get into a unknown state and because of the
supercap staying at about 1.4-1.5V. Amazingly the supercap does not want
to discharge at this low voltage and the uC's low power does not drain
it either. Looks like a inherent charge that stays on the supercap
(National's 1uF 5.5V). If the uC went down into this state at a high
frequency, it never recovers. The brown-out does not always work. It
seems that a proper external watchdog reset chip is always a good idea!
The 427's documentation is also not very clear on the role of the 32k vs
VCO and PLL operation. I found the documentation for other MSP430 TI
family uC's are more clearer.
Regards
Gerhard
From: m...@yahoogroups.com [mailto:m...@yahoogroups.com] On Behalf
Of tintronic
Sent: 23 September 2008 20:51 PM
To: m...@yahoogroups.com
Subject: [msp430] Re: MSP430F427 - Oscillator Fault
It would probably help if you post your oscilator initialization
routine. The problem might be there. If the oscilator doesn't start,
does your code try to re-start it again or does it just try once and
then gets stuck?
Michael K.
--- In m...@yahoogroups.com
,
"Gerhard Wilsnach" wrote:
>
> Hi,
>
> I'm working on a protection relay application using the MSP430F427.
> Some of the units will not start-up, until I re-flash them, or debug
the
> code and stop it either by setting a break-point or using the manual
> break in the main loop. If I do it before the main loop, it still does
> not start up, it keeps resetting.
>
> * I have set up the WDT to reset the MSP every 1s if not
> reset/toggled by software.
>
> * The main clock is setup to run at 8MHz from the DCO (sourced
> from 32768 Hz crystal) and FLL.
>
> * The clock is set to 1MHz just before entering LPM3 and will
> only run at 8MHz if the SVSOP is not set (meaning no low power
condition
> present)
>
> * I also do a info flash BCC check in software before every
> start-up to make sure the calibration factors are still correct.
>
> I analysed the problem and found that, when the unit does not want to
> start-up, it is continuously being reset. I then checked all the
flags,
> and saw that the oscillator fault flag is being set. Meaning there is
a
> fault on the oscillator. But when I disable the WDT or insert a break
> point and then run the code again, the unit works fine. Meaning there
is
> no oscillator fault????
>
> * I'm using a normal 32768 Hz crystal, I've set the MSP's
> internal load caps to 10pF.
>
> If the unit works fine for a while, and I remove it completely from
its
> supply and leave it for say a minute, then plug it back into the
supply,
> the unit again does not want to start-up. Most of the units work the
> first time, but there are some that behaves in the way described
above.
>
> Any help or ideas will be appreciated.
>
> .
>
> sgId=38365/stime=1222094534/nc1=4507179/nc2=3848640/nc3=5370603>
########################################################################
#############
> This e-mail message has been scanned for Viruses and Content and
cleared
> by MailMarshal
>
########################################################################
#############
########################################################################
#############
> Attention:
> The information contained in this message and or attachments is
intended
> only for the person or entity to which it is addressed and may contain
> confidential and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance
upon,
> this information by persons or entities other than the intended
recipient
> is prohibited. If you received this in error, please contact the
sender and
> delete the material from any system and destroy any copies.
>
> Thank You.
>
########################################################################
#############
> [Non-text portions of this message have been removed]
>
#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared
by MailMarshal
#####################################################################################
#####################################################################################
Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from any system and destroy any copies.
Thank You.
#####################################################################################
[Non-text portions of this message have been removed]
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )RE: Re: MSP430F427 - Oscillator Fault - Hugh Molesworth - Oct 13 11:36:05 2008
You might consider the use of a crowbar when relying on a supercap or
other high-capacity hold-up which does not discharge in a reasonable
time. The idea is to drive a switch directly across the supercap with
a high-ish value discharge resistor such that when the switch is
conducting a discharge load is applied across the supercap to safely
bring the voltage down low enough (<400mV if I remember correctly) in
a reasonable time for the MSP430 reset circuit to re-start correctly
when power is reapplied. Typically drive the switch with a port pin
to turn off the FET once the MSP430 starts up, ie the port pin is
always set to open the switch. Provided there is a default turn-off
on the switch, then when the MSP430 drops out the switch will close
and slowly discharge the supercap. The switch could be a latching
relay, a zero-threshold FET or low turn on voltage transistor. The
default "on" for the switch has to work with a Vcc of down to 400mV
(or whatever that magical MSP430 reset recovery voltage happens to be
for the specific part). The circuit only loads the supercap when
external power sources have been removed (or battery has discharged
too low to use) until new pwer is restored/applied, so the waste of
power is irrelevent.
I like to use external reset circuits, but bear in mind that these
only work down to a minimum voltage before they too don't operate.
That means even with an external reset you could get into trouble
with a supercap or solar supply..
Hugh
At 02:07 AM 10/13/2008, you wrote:
Hi Guys
Thanks for the replies, we fixed it by dropping the operational
frequency to 4Mhz (uC always operational at all the supply voltages!).
We also looked carefully to the startingup/switch over to PLL'ed 32khz
and VCO only operation based on you comments.
The confusion was more to do with poor documentation regarding the SVS
and behaviour of uC under low (sub 1.8V conditions). Texas has a few
undefined areas of operation and using a supercap with the low power
modes cause the uC to get into a unknown state and because of the
supercap staying at about 1.4-1.5V. Amazingly the supercap does not want
to discharge at this low voltage and the uC's low power does not drain
it either. Looks like a inherent charge that stays on the supercap
(National's 1uF 5.5V). If the uC went down into this state at a high
frequency, it never recovers. The brown-out does not always work. It
seems that a proper external watchdog reset chip is always a good idea!
The 427's documentation is also not very clear on the role of the 32k vs
VCO and PLL operation. I found the documentation for other MSP430 TI
family uC's are more clearer.
Regards
Gerhard
From: m...@yahoogroups.com [mailto:m...@yahoogroups.com] On Behalf
Of tintronic
Sent: 23 September 2008 20:51 PM
To: m...@yahoogroups.com
Subject: [msp430] Re: MSP430F427 - Oscillator Fault
It would probably help if you post your oscilator initialization
routine. The problem might be there. If the oscilator doesn't start,
does your code try to re-start it again or does it just try once and
then gets stuck?
Michael K.
--- In m...@yahoogroups.com
,
"Gerhard Wilsnach" wrote:
>
> Hi,
>
>
>
> I'm working on a protection relay application using the MSP430F427.
> Some of the units will not start-up, until I re-flash them, or debug
the
> code and stop it either by setting a break-point or using the manual
> break in the main loop. If I do it before the main loop, it still does
> not start up, it keeps resetting.
>
>
>
> * I have set up the WDT to reset the MSP every 1s if not
> reset/toggled by software.
>
> * The main clock is setup to run at 8MHz from the DCO (sourced
> from 32768 Hz crystal) and FLL.
>
> * The clock is set to 1MHz just before entering LPM3 and will
> only run at 8MHz if the SVSOP is not set (meaning no low power
condition
> present)
>
> * I also do a info flash BCC check in software before every
> start-up to make sure the calibration factors are still correct.
>
>
>
> I analysed the problem and found that, when the unit does not want to
> start-up, it is continuously being reset. I then checked all the
flags,
> and saw that the oscillator fault flag is being set. Meaning there is
a
> fault on the oscillator. But when I disable the WDT or insert a break
> point and then run the code again, the unit works fine. Meaning there
is
> no oscillator fault????
>
>
>
> * I'm using a normal 32768 Hz crystal, I've set the MSP's
> internal load caps to 10pF.
>
>
>
> If the unit works fine for a while, and I remove it completely from
its
> supply and leave it for say a minute, then plug it back into the
supply,
> the unit again does not want to start-up. Most of the units work the
> first time, but there are some that behaves in the way described
above.
>
>
>
> Any help or ideas will be appreciated.
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )