altos/lpc: Turn off more clocks, disable USART for easymini
authorKeith Packard <keithp@keithp.com>
Sun, 16 Jun 2013 22:07:54 +0000 (15:07 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 16 Jun 2013 22:07:54 +0000 (15:07 -0700)
Try to reduce noise on the power supply.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/easymini-v0.1/Makefile
src/easymini-v0.1/ao_pins.h
src/lpc/ao_timer_lpc.c

index 612cc47238dfe738c95ffd04de12c6d84e726986..dfa7624ce25544f361fa56c00184ce2a292bf413 100644 (file)
@@ -39,7 +39,6 @@ ALTOS_SRC = \
        ao_config.c \
        ao_timer_lpc.c \
        ao_exti_lpc.c \
        ao_config.c \
        ao_timer_lpc.c \
        ao_exti_lpc.c \
-       ao_serial_lpc.c \
        ao_usb_lpc.c \
        ao_spi_lpc.c \
        ao_adc_lpc.c \
        ao_usb_lpc.c \
        ao_spi_lpc.c \
        ao_adc_lpc.c \
index d4fbe7a1e176e4e018e19f9c3b6d1b4f9a58bf12..e14e1eb40e9cb30fa3deae2b467f17988e642b44 100644 (file)
@@ -43,7 +43,7 @@
 
 /* USART */
 
 
 /* USART */
 
-#define HAS_SERIAL             1
+#define HAS_SERIAL             0
 #define USE_SERIAL_0_STDIN     1
 #define SERIAL_0_18_19         1
 #define SERIAL_0_14_15         0
 #define USE_SERIAL_0_STDIN     1
 #define SERIAL_0_18_19         1
 #define SERIAL_0_14_15         0
index 51835baaa76310f94ec1381541db33e65987f210..73a0e258c6f1974f749b37880508d92904a71c08 100644 (file)
@@ -177,4 +177,15 @@ ao_clock_init(void)
        lpc_scb.ssp1clkdiv = 0;
        lpc_scb.usbclkdiv = 0;
        lpc_scb.clkoutdiv = 0;
        lpc_scb.ssp1clkdiv = 0;
        lpc_scb.usbclkdiv = 0;
        lpc_scb.clkoutdiv = 0;
+
+       /* Power down everything we don't need */
+       lpc_scb.pdruncfg = ((1 << LPC_SCB_PDRUNCFG_IRCOUT_PD) |
+                           (1 << LPC_SCB_PDRUNCFG_IRC_PD) |
+                           (1 << LPC_SCB_PDRUNCFG_BOD_PD) |
+                           (1 << LPC_SCB_PDRUNCFG_ADC_PD) |
+                           (1 << LPC_SCB_PDRUNCFG_WDTOSC_PD) |
+                           (1 << LPC_SCB_PDRUNCFG_USBPLL_PD) |
+                           (1 << LPC_SCB_PDRUNCFG_USBPAD_PD) |
+                           (1 << 11) |
+                           (7 << 13));
 }
 }