From 299d8c6cbfe0bc32fe00f0065d3d0e2be6f791de Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Sun, 3 Feb 2013 14:54:08 -0500 Subject: [PATCH] set the pin defaults properly to reduce current consumption on sleeping M12s. --- platform/econotag/main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/platform/econotag/main.c b/platform/econotag/main.c index 76f572548..cb31944fe 100644 --- a/platform/econotag/main.c +++ b/platform/econotag/main.c @@ -70,6 +70,17 @@ int main(void) { PRINTF("trim xtal for M12\n\r"); CRM->XTAL_CNTLbits.XTAL_CTUNE = (M12_CTUNE_4PF << 4) | M12_CTUNE; CRM->XTAL_CNTLbits.XTAL_FTUNE = M12_FTUNE; + + /* configure pullups for low power */ + GPIO->FUNC_SEL.GPIO_63 = 3; + GPIO->PAD_PU_SEL.GPIO_63 = 0; + GPIO->FUNC_SEL.SS = 3; + GPIO->PAD_PU_SEL.SS = 1; + GPIO->FUNC_SEL.VREF2H = 3; + GPIO->PAD_PU_SEL.VREF2H = 1; + GPIO->FUNC_SEL.U1RTS = 3; + GPIO->PAD_PU_SEL.U1RTS = 1; + } else { /* econotag I */ PRINTF("trim xtal for Econotag I\n\r");