Hi Chris,

The fll_adjust() function from the mspgcc library works perfect.  The
UART works as desired at 115,200.  I added a 100K external resistor, and
set the fll_adjust() desired clock rate to 7 MHz.  I chose 7 MHz because
of this comment in the "[Mspgcc-users] msp430 CPU clock" email thread on
8/19/2006.

-> Be aware, that maximum CPU clock is supply 
-> voltage dependant!  Check 
-> http://focus.ti.com/lit/ds/symlink/msp430f148.pdf page 24.  
-> For 3.3V max is at about 7.2MHz.

I do not really need to run at 7 MHz.  I could run at 4M or slightly
slower, if needed.  

Questions:  
1) What are CPU frequency ranges available, if I use the 270K ROSC
(rather than the 100K) as you suggest below?  Where is that table?

2) do I need to re-run fll_adjust() from time-to-time as the device
changes temperature?

Thanks for the help!

Greg

-----Original Message-----
From: mspgcc-users-boun...@lists.sourceforge.net
[mailto:mspgcc-users-boun...@lists.sourceforge.net] On Behalf Of Chris
Liechti
Sent: Friday, August 25, 2006 6:22 PM
To: GCC for MSP430 - http://mspgcc.sf.net
Subject: Re: [Mspgcc-users] MSP430F169 DCO for UART clock

Lichen Wang schrieb:
> The method in slaa047.pdf is trying to adjust the DCO to maintain a 
> certain desired frequency. I do not think you need to do that. What 
> you need is to get a high enough DCO frequency and to know what that
frequency is.
>  
> I suggest the following:
>  
> (a) Add an external resistor (100K, 1%) and set Rosc=1

a value around 270k will give better stablity over temperature but no so
high frequencies

> (b) Set RSELx=7 (instead of default =4), default DCO+MOD are fine (The

> above should give you stable and fast enough DCO frequency.)
> (c) Use the 32768Hz to generate a 4096Hz ACLK. (32768 / 8=4096)
> (d) Use the DCO output as MCLK and SMCLK.
> (e) Use TimerA or TimerB, clock it with SMCLK and use the capture mode

> to capture the rising (or falling) edge of ACLK.
> (f) The difference of consecutive captured counts times 4096 is the 
> frequency of SMCLK.
> (g) Use this measure frequency of SMCLK to set the baudrate divider.
> (h) You can free (or stop) the 32768Hz and the Timer for other use.

you can use the fll_adjust() function from the mspgcc library. it
implements this. there is an example in "examples/libraries"

[...]
>     The external resistor will help reducing the temperature and
voltage
>     dependency of DCO frequency. However, I think there is still about
>     15% variation from chip to chip.

that's without calibration. once that is done, you can save the clock
settings in the flash. however you'still only have +/-5% which isn't
accurate enough for the serial port (not over the entire temperaure
range at least).

(the msp430-dco tool can be used to get calibration values, parallel
port JTAG only)

chris

------------------------------------------------------------------------
-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to