diff options
author | Keith Packard <keithp@keithp.com> | 2016-08-08 22:39:16 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2016-08-08 22:39:16 -0700 |
commit | 46b1234140c04dbfac22be0fdf80be96506b6948 (patch) | |
tree | 0324fd9f1ecc28542ff0fd30a503c69ff0bd0cec /src | |
parent | 48088d1d6a66c5d5271b52191367f07b09626b29 (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.c | 2 |
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; |