Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » MSPGCC
  • » [Mspgcc-users] MSP430F169 DCO for UART clock [RSS Feed]

#1 Aug. 25, 2006 21:49:16

Rasche, G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] MSP430F169 DCO for UART clock


I need to generate an accurate CPU clock using the internal MSP430F169
DCO. The 800K default SMCLK is very temperature sensitive, and does a
bad job generating the BAUD UART CLK. I want 115,200 baud, and the DCO
and internal resistors generate bad UART rates.

I can install a 0.1% external resistor if I need it. It seems like
there would be a table in the MSP PDF files that says that with 3.3V you
need external resistor value X to generate Y MHz. I can not find that
table.

I know that "controlling the DCO frequency of the MSP430x11x" SLAA047
exists. There must be an easier way the get an accurate 115,200 baud
rate with the DCO.

Is there an easy way to get SMCLK to run at 4 MHz or 8 MHz?

greg

Offline

#2 Aug. 25, 2006 22:10:19

Lichen W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] MSP430F169 DCO for UART clock


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.

Do you have a 32kHz crystal or something else as a reference for
calibration?

Another way is to use the incoming serial data as a reference. But
you need the cooperation of the device that is sending serial data.
The Boot-Strap Loader uses such a scheme. I used the same
scheme and implemented auto-baud detect as well. It works well
for 9.6 to 115.2 kb/s. But I was not using an USART. I was doing
bit-banging and it was half-duplex only.

"Rasche, Greg" <greg.ras***@*indriver.com> wrote:
I need to generate an accurate CPU clock using the internal MSP430F169
DCO. The 800K default SMCLK is very temperature sensitive, and does a bad job
generating the BAUD UART CLK. I want 115,200 baud, and the DCO and internal
resistors generate bad UART rates.

I can install a 0.1% external resistor if I need it. It seems like there
would be a table in the MSP PDF files that says that with 3.3V you need
external resistor value X to generate Y MHz. I can not find that table.

I know that "controlling the DCO frequency of the MSP430x11x" SLAA047
exists. There must be an easier way the get an accurate 115,200 baud rate with
the DCO.

Is there an easy way to get SMCLK to run at 4 MHz or 8 MHz?

greg
-------------------------------------------------------------------------
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 Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642_______________________________________________Mspgcc-users mailing list
Mspgcc-us***@*ists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/mspgcc-usersLichen Wang

Darwin was wrong. Monkeys might have evolved. Human did not.



---------------------------------
All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.

Offline

#3 Aug. 26, 2006 00:32:38

Rasche, G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] MSP430F169 DCO for UART clock


I have a 32K OSC that works fine.

Do I need to do what it says in SLAA0047?

greg

________________________________

From: mspgcc-users-boun***@*ists.sourceforge.net
On Behalf Of Lichen
Wang
Sent: Friday, August 25, 2006 2:10 PM
To: GCC for MSP430 -http://mspgcc.sf.netSubject: Re: MSP430F169 DCO for UART clock


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.

Do you have a 32kHz crystal or something else as a reference for
calibration?

Another way is to use the incoming serial data as a reference. But
you need the cooperation of the device that is sending serial data.
The Boot-Strap Loader uses such a scheme. I used the same
scheme and implemented auto-baud detect as well. It works well
for 9.6 to 115.2 kb/s. But I was not using an USART. I was doing
bit-banging and it was half-duplex only.

"Rasche, Greg" <greg.ras***@*indriver.com> wrote:

I need to generate an accurate CPU clock using the internal
MSP430F169 DCO. The 800K default SMCLK is very temperature sensitive,
and does a bad job generating the BAUD UART CLK. I want 115,200 baud,
and the DCO and internal resistors generate bad UART rates.

I can install a 0.1% external resistor if I need it. It seems
like there would be a table in the MSP PDF files that says that with
3.3V you need external resistor value X to generate Y MHz. I can not
find that table.

I know that "controlling the DCO frequency of the MSP430x11x"
SLAA047 exists. There must be an easier way the get an accurate 115,200
baud rate with the DCO.

Is there an easy way to get SMCLK to run at 4 MHz or 8 MHz?

greg

------------------------------------------------------------------------
-
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 Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642_______________________________________________
Mspgcc-users mailing list
Mspgcc-us***@*ists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/mspgcc-usersLichen Wang
Darwin was wrong. Monkeys might have evolved. Human did not.

________________________________

All-new Yahoo! Mail
<http://us.rd.yahoo.com/evt=43256/*http://advision.webevents.yahoo.com/mailbeta> - Fire up a more powerful email and get things done faster.

Offline

#4 Aug. 26, 2006 01:35:01

Lichen W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] MSP430F169 DCO for UART clock


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
(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.

Hope this is clear enough. I can go to more details if you want.

"Rasche, Greg" <greg.ras***@*indriver.com> wrote:
I have a 32K OSC that works fine.

Do I need to do what it says in SLAA0047?

greg


---------------------------------
From: mspgcc-users-boun***@*ists.sourceforge.net
On Behalf Of Lichen Wang
Sent: Friday, August 25, 2006 2:10 PM
To: GCC for MSP430 -http://mspgcc.sf.netSubject: Re: MSP430F169 DCO for UART clock



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.

Do you have a 32kHz crystal or something else as a reference for
calibration?

Another way is to use the incoming serial data as a reference. But
you need the cooperation of the device that is sending serial data.
The Boot-Strap Loader uses such a scheme. I used the same
scheme and implemented auto-baud detect as well. It works well
for 9.6 to 115.2 kb/s. But I was not using an USART. I was doing
bit-banging and it was half-duplex only.

"Rasche, Greg" <greg.ras***@*indriver.com> wrote:
I need to generate an accurate CPU clock using the internal MSP430F169
DCO. The 800K default SMCLK is very temperature sensitive, and does a bad job
generating the BAUD UART CLK. I want 115,200 baud, and the DCO and internal
resistors generate bad UART rates.

I can install a 0.1% external resistor if I need it. It seems like there
would be a table in the MSP PDF files that says that with 3.3V you need
external resistor value X to generate Y MHz. I can not find that table.

I know that "controlling the DCO frequency of the MSP430x11x" SLAA047
exists. There must be an easier way the get an accurate 115,200 baud rate with
the DCO.

Is there an easy way to get SMCLK to run at 4 MHz or 8 MHz?

greg
-------------------------------------------------------------------------
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 Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642_______________________________________________Mspgcc-users mailing list
Mspgcc-us***@*ists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/mspgcc-usersLichen Wang
Darwin was wrong. Monkeys might have evolved. Human did not.


---------------------------------
All-new Yahoo! Mail - Fire up a more powerful email and get things done
faster.
-------------------------------------------------------------------------
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 Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642_______________________________________________Mspgcc-users mailing list
Mspgcc-us***@*ists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/mspgcc-usersLichen Wang

Darwin was wrong. Monkeys might have evolved. Human did not.



---------------------------------
Do you Yahoo!?
Get on board. You're invited to try the new Yahoo! Mail.

Offline

#5 Aug. 26, 2006 02:22:41

Chris L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[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=1a value around 270k will give better stablity over temperature but no sohigh 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. itimplements 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 clocksettings in the flash. however you'still only have +/-5% which isn'taccurate enough for the serial port (not over the entire temperaurerange at least).(the msp430-dco tool can be used to get calibration values, parallelport JTAG only)chris

Offline

#6 Aug. 31, 2006 20:26:31

Chris L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] MSP430F169 DCO for UART clock


Rasche, Greg schrieb:
I do not really need to run at 7 MHz. I could run at 4M or slightlyslower, 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?good question, i can't find it at the moment. i belive to remember thatit was in a datasheet where they listed the values of the internal RSELselections.i do not remeber if the detailed temperature selections were documentedin a data sheet or if we made our own measurements.2) do I need to re-run fll_adjust() from time-to-time as the device
changes temperature?yes. it will be quicker that the first time on startup, but during FLLadjusting you mighn not be able to receive on the serial port (especialywhen the RSEL range has to be changed)chris

Offline

#7 March 9, 2017 23:00:14

ThomasHen
Registered: 2017-02-21
Posts: 1
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] MSP430F169 DCO for UART clock

This post is being moderated

Offline

  • Root
  • » MSPGCC
  • » [Mspgcc-users] MSP430F169 DCO for UART clock [RSS Feed]

Board footer

Moderator control

Enjoy the 22nd of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support