From 46b1234140c04dbfac22be0fdf80be96506b6948 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 8 Aug 2016 22:39:16 -0700 Subject: [PATCH] altos/stmf0: Switch ADC fast to ADC clock Using this slower clock eliminates sampling problems with the ADC and cleans up the chaoskey raw data. Signed-off-by: Keith Packard --- src/stmf0/ao_adc_fast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stmf0/ao_adc_fast.c b/src/stmf0/ao_adc_fast.c index fbf4ad2e..5ce3a396 100644 --- a/src/stmf0/ao_adc_fast.c +++ b/src/stmf0/ao_adc_fast.c @@ -154,7 +154,7 @@ ao_adc_init(void) #endif /* Set the clock */ - stm_adc.cfgr2 = STM_ADC_CFGR2_CKMODE_PCLK_2 << STM_ADC_CFGR2_CKMODE; + stm_adc.cfgr2 = STM_ADC_CFGR2_CKMODE_ADCCLK << STM_ADC_CFGR2_CKMODE; /* Shortest sample time */ stm_adc.smpr = STM_ADC_SMPR_SMP_1_5 << STM_ADC_SMPR_SMP; -- 2.30.2