summaryrefslogtreecommitdiff
path: root/src/lpc/ao_timer_lpc.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-06-16 15:07:54 -0700
committerKeith Packard <keithp@keithp.com>2013-06-16 15:07:54 -0700
commit1676c7dbc3dcce2962be9ef9a58d37c7b48e3c0f (patch)
tree9e031ad4f3f9abe8d5da507fc2e13567fc1d67cd /src/lpc/ao_timer_lpc.c
parentbe9ee9ed2d041c4ab4e77ee2010fe3c7a1ca6597 (diff)
altos/lpc: Turn off more clocks, disable USART for easymini
Try to reduce noise on the power supply. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lpc/ao_timer_lpc.c')
-rw-r--r--src/lpc/ao_timer_lpc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lpc/ao_timer_lpc.c b/src/lpc/ao_timer_lpc.c
index 51835baa..73a0e258 100644
--- a/src/lpc/ao_timer_lpc.c
+++ b/src/lpc/ao_timer_lpc.c
@@ -177,4 +177,15 @@ ao_clock_init(void)
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));
}