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...@windriver.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...@lists.sourceforge.net [mailto:mspgcc-users-boun...@lists.sourceforge.net] On Behalf Of Lichen Wang Sent: Friday, August 25, 2006 2:10 PM To: GCC for MSP430 - http://mspgcc.sf.net Subject: Re: [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...@windriver.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 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 Lichen 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 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 Lichen 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.