summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-08-08 22:39:16 -0700
committerKeith Packard <keithp@keithp.com>2016-08-08 22:39:16 -0700
commit46b1234140c04dbfac22be0fdf80be96506b6948 (patch)
tree0324fd9f1ecc28542ff0fd30a503c69ff0bd0cec /src
parent48088d1d6a66c5d5271b52191367f07b09626b29 (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/stmf0/ao_adc_fast.c2
1 files changed, 1 insertions, 1 deletions
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;