ankitsohaliya / mansos

Automatically exported from code.google.com/p/mansos
0 stars 0 forks source link

Main clock frequency is off on XM-1000 #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce the problem:
1. Go to apps/demo/PrintCounter
2. Write CPU_MHZ=1 in config file
3. Compile the app for on a mote with MSP430F261x MCU (Zolertia z1 or XM-1000)

What is the expected output? What do you see instead?

Printing fails because speed calculation in msp430_usci_uart.c is too imprecise.

Any additional information below:

Maybe look at how it's done in TinyOS: tos/chips/msp430/x2xxx/usci/msp430usci.h

In MansOS the SPI/UART code is a mess...

Original issue reported on code.google.com by atis.el...@gmail.com on 10 Jul 2012 at 8:44

GoogleCodeExporter commented 9 years ago
The UART clock divider value is calculated correctly, with minor difference 
from the true value. The actual issue is that with CPU_MHZ=1 the main clock 
frequency on XM-1000 is not 1 MHz as expected, but roughly about 1.25 MHz. It 
is likely that the problem is with DCO calibration code for this platform.

Original comment by andrey.vihrov on 12 Jul 2012 at 10:59