Ok, figured out how to turn XT2 off.  Looks like there is a failsafe
where if SMCLK is selected for any peripheral (I'm using TimerA), then
you can't turn it off.  You have to configure every peripheral to use
anything other than SMCLK in order for XT2 to turn off.

Hope this helps!
Disable XT2 like this:
FLL_CTL1 = XT2OFF + SMCLKOFF;   // XT2 OFF, SMCLK -> off
Turn it on like this:
FLL_CTL1 = SELS;                // XT2 ON, XT2 -> SMCLK, SMCLK -> on

You can even do the above in reverse:
FLL_CTL1 = XT2OFF + SMCLKOFF;   // XT2 OFF, SMCLK -> off
TACTL = TASSEL0;                // Set Clk source to ACLK
The clock will still turn off, but not until the second instruction is
executed.

Enjoy
-Mark


-----Original Message-----
From: mspgcc-users-ad...@lists.sourceforge.net
[mailto:mspgcc-users-ad...@lists.sourceforge.net] On Behalf Of Mark
Stokes
Sent: Wednesday, May 07, 2003 10:37 AM
To: mspgcc-users@lists.sourceforge.net
Subject: [Mspgcc-users] Added support for XT2 on 44x


Unless I'm missing something, it appears mspgcc doesn't have support for
the second crystal on the 44x devices.  Therefore, instead of bitching
and whining about it, I decided to write the necessary fixes to make it
work.
Attached are the necessary fixed files.
All I did was add the #define for __msp430_have_xt2 in system_clock.h
and in msp430_44x.h.
I hope I followed all the necessary conventions observed by the group.
Please feel free to modify what I have done.
As far as I can tell, this works just fine.  I can "turn-on" the XT2
crystal when I want (using the attached code).  However, I am apparently
unable to turn the XT2 input off.  Not sure if this is even possible.
The only workaround I have at this time is to hit reset (NMI).  I am in
communication w/ TI about this and will report as soon as I know
something.

Enjoy
-Mark Stokes


Reply via email to