From: smckown Date: Mon, 2 Nov 2009 20:43:24 +0000 (+0000) Subject: Ensure that uC input pin P1.2_CP_RTS is valid when the CP2103 is off. X-Git-Tag: release/2.1.0-2~30 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=6b620e461f73eabb91ffd9c0ae4d4c6b6a686415 Ensure that uC input pin P1.2_CP_RTS is valid when the CP2103 is off. We accomplish this by enabling an internal pull-down on P1.2 of the MSP430. It would be better to enable a pull-up, but then we are sending a voltage to the CP2103 when it is off, which may cause a latch-up problem. The pull-down isn't terrible, since it represents the condition whereby the USB host is ready to receive data from the RWS. When the USB is connected, this is likely to be the most common condition. --- diff --git a/tos/platforms/tmicore/MotePlatformC.nc b/tos/platforms/tmicore/MotePlatformC.nc index c298d760..ebf625e8 100644 --- a/tos/platforms/tmicore/MotePlatformC.nc +++ b/tos/platforms/tmicore/MotePlatformC.nc @@ -50,7 +50,7 @@ implementation { P1SEL = 0; /* 0 0 0 0 0 0 0 0 */ P1OUT = 0x31; /* 0 0 1 1 0 0 0 1 */ P1DIR = 0x08; /* 0 0 0 0 1 0 0 0 */ - P1REN = 0x31; /* 0 0 1 1 0 0 0 1 */ + P1REN = 0x35; /* 0 0 1 1 0 1 0 1 */ /* Port 2: * 7:-, 6:-, 5:BUTTONn, 4:USB_SUSPENDn, 3:-, 2:BSL_RX, 1:USBPGn, diff --git a/tos/platforms/tmirws/MotePlatformC.nc b/tos/platforms/tmirws/MotePlatformC.nc index 6aebc096..b5c151bf 100644 --- a/tos/platforms/tmirws/MotePlatformC.nc +++ b/tos/platforms/tmirws/MotePlatformC.nc @@ -50,7 +50,7 @@ implementation { P1SEL = 0; /* 0 0 0 0 0 0 0 0 */ P1OUT = 0x10; /* 0 0 0 1 0 0 0 0 */ P1DIR = 0x08; /* 0 0 0 0 1 0 0 0 */ - P1REN = 0x10; /* 0 0 0 1 0 0 0 0 */ + P1REN = 0x14; /* 0 0 0 1 0 1 0 0 */ /* Port 2: * 7:SHT_DATA, 6:SCP_DRDY, 5:BUTTONn, 4:USB_SUSPENDn, 3:GM_PWRMON,