]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
fixed a very subtle power drain bug that only showed up on some
authorayer1 <ayer1>
Wed, 16 Jul 2008 18:47:32 +0000 (18:47 +0000)
committerayer1 <ayer1>
Wed, 16 Jul 2008 18:47:32 +0000 (18:47 +0000)
devices in sleep, and cleaned up some other missed details on this
same subject.

main attraction:  GIO0 was changed to an input to accomodate the fact
that it was attached to a pulldown, meant for a button on the external
connector.

when an output, some boards burned ~180 ua sleeping, the others 630
ua.  as an input, we changed this reading on an example of the latter
to 180.

thanks to catalin caranfil at realtime oem for finding the problem and
pushing for a solution for the masses!

other changes:

- made onewire (data) input
- made the spi pins all gpio in appropriate directions for their
connections
- made bt_pio input, as appropriate for its connection

tos/platforms/shimmer/hardware.h

index 06013f1a893652bebfed36254355657ae5c924e2..d4769930ca60fe01e4f746df0170e3618712a0d2 100644 (file)
@@ -198,7 +198,7 @@ void TOSH_SET_PIN_DIRECTIONS(void)
   TOSH_MAKE_BT_RTS_INPUT();      
   TOSH_SEL_BT_RTS_IOFUNC();
 
-  TOSH_MAKE_BT_PIO_OUTPUT();
+  TOSH_MAKE_BT_PIO_INPUT();
   TOSH_SEL_BT_PIO_IOFUNC();
 
   TOSH_MAKE_BT_CTS_OUTPUT();
@@ -216,6 +216,25 @@ void TOSH_SET_PIN_DIRECTIONS(void)
   TOSH_SEL_PROG_IN_IOFUNC();
   TOSH_SEL_PROG_OUT_IOFUNC();
 
+  // USART lines, attached to a pullup
+  TOSH_SEL_UCLK0_IOFUNC();
+  TOSH_MAKE_UCLK0_OUTPUT();
+  TOSH_SET_UCLK0_PIN();
+  TOSH_SEL_UCLK1_IOFUNC();
+  TOSH_MAKE_UCLK1_OUTPUT();
+  TOSH_SET_UCLK1_PIN();
+
+  TOSH_SEL_SIMO0_IOFUNC();
+  TOSH_MAKE_SIMO0_OUTPUT();
+  TOSH_SET_SIMO0_PIN();
+  TOSH_SEL_SOMI0_IOFUNC();
+  TOSH_MAKE_SOMI0_INPUT();
+
+  TOSH_SEL_SIMO1_IOFUNC();
+  TOSH_MAKE_SIMO1_OUTPUT();
+  TOSH_SET_SIMO1_PIN();
+  TOSH_SEL_SOMI1_IOFUNC();
+  TOSH_MAKE_SOMI1_INPUT();
 
   // ADC lines
   TOSH_MAKE_ADC_0_OUTPUT();
@@ -253,6 +272,7 @@ void TOSH_SET_PIN_DIRECTIONS(void)
   // 1-wire function
   TOSH_MAKE_ONEWIRE_PWR_OUTPUT();
   TOSH_SEL_ONEWIRE_PWR_IOFUNC();
+  TOSH_MAKE_ONEWIRE_INPUT();
   TOSH_SEL_ONEWIRE_IOFUNC();
 
   // Accelerometer pin definitions
@@ -279,7 +299,7 @@ void TOSH_SET_PIN_DIRECTIONS(void)
   TOSH_SEL_SER0_CTS_IOFUNC();
   TOSH_MAKE_SER0_RTS_OUTPUT();
   TOSH_SEL_SER0_RTS_IOFUNC();
-  TOSH_MAKE_GIO0_OUTPUT();
+  TOSH_MAKE_GIO0_INPUT();
   TOSH_SEL_GIO0_IOFUNC();
   TOSH_MAKE_GIO1_OUTPUT();
   TOSH_SEL_GIO1_IOFUNC();