Hi all,
As the internal DCO of MSP430 is not much reliable over extreme
temperatures, we would like to use an external, more stable crystal
oscillator. We are placing an 8 MHz oscillator on our MSP430 based
mote and connecting it to the processor through XT2. We change the
following file & function as shown below. Are these changes correct &
enough? Should we change any other files as well? Blink example works
fine with these changes, however, we do not want to miss other uses
where main or sub-main clocks are used.
Thanks in advance.
Bulut
Changed File:
--------------------
/opt/tinyos-2.x/tos/chips/msp430/timer/
Changed Function:
---------------------------
command void Msp430ClockInit.defaultInitClocks()
{
// BCSCTL1
// .XT2OFF = 1; disable the external oscillator for SCLK and MCLK
// .XTS = 0; set low frequency mode for LXFT1
// .DIVA = 0; set the divisor on ACLK to 1
// .RSEL, do not modify
BCSCTL1 &= ~XT2OFF;
// BCSCTL2
// .SELM = 0; select DCOCLK as source for MCLK
// .DIVM = 0; set the divisor of MCLK to 1
// .SELS = 0; select DCOCLK as source for SCLK
// .DIVS = 2; set the divisor of SCLK to 4
// .DCOR = 0; select internal resistor for DCO
BCSCTL2 |= (SELM1 + SELS + DIVS0 + DIVS1 + DIVM0);
// IE1.OFIE = 0; no interrupt for oscillator fault
CLR_FLAG( IE1, OFIE );
}
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help