From: ayer1 Date: Wed, 16 Jul 2008 18:47:32 +0000 (+0000) Subject: fixed a very subtle power drain bug that only showed up on some X-Git-Tag: release_tinyos_2_1_0_0~68 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=f0135f27e8f60903c11ebb833d08dd22ef4811b2 fixed a very subtle power drain bug that only showed up on some 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 --- diff --git a/tos/platforms/shimmer/hardware.h b/tos/platforms/shimmer/hardware.h index 06013f1a..d4769930 100644 --- a/tos/platforms/shimmer/hardware.h +++ b/tos/platforms/shimmer/hardware.h @@ -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();