[Tinyos-beta-commits]
CVS: tinyos-1.x/beta/Deluge/Deluge/TOSBoot/msp430
VoltageC.nc, 1.2, 1.3
Jonathan Hui
jwhui at users.sourceforge.net
Mon Jul 18 22:00:09 PDT 2005
Update of /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/TOSBoot/msp430
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7176/msp430
Modified Files:
VoltageC.nc
Log Message:
- Fixed a bug that left ADC12 on. Current draw of mote after exiting
the bootloader drops from ~550 uA to ~7 uA.
Index: VoltageC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/TOSBoot/msp430/VoltageC.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** VoltageC.nc 9 Jun 2005 19:37:13 -0000 1.2
--- VoltageC.nc 19 Jul 2005 04:59:51 -0000 1.3
***************
*** 46,54 ****
// Turn on and set up ADC12 with REF_1_5V
! ADC12CTL0 = ADC12ON + SHT0_2 + REFON;
// Use sampling timer
ADC12CTL1 = SHP;
// Set up to sample voltage
! ADC12MCTL0 = SREF_1 + INCH_11;
// Delay for reference start-up
for ( i=0; i<0x3600; i++ );
--- 46,54 ----
// Turn on and set up ADC12 with REF_1_5V
! ADC12CTL0 = ADC12ON | SHT0_2 | REFON;
// Use sampling timer
ADC12CTL1 = SHP;
// Set up to sample voltage
! ADC12MCTL0 = EOS | SREF_1 | INCH_11;
// Delay for reference start-up
for ( i=0; i<0x3600; i++ );
***************
*** 62,65 ****
--- 62,66 ----
// Turn off ADC12
+ ADC12CTL0 &= ~ENC;
ADC12CTL0 = 0;
More information about the Tinyos-beta-commits
mailing list