projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48088d1
)
altos/stmf0: Switch ADC fast to ADC clock
author
Keith Packard
<keithp@keithp.com>
Tue, 9 Aug 2016 05:39:16 +0000
(22:39 -0700)
committer
Keith Packard
<keithp@keithp.com>
Tue, 9 Aug 2016 05:39:16 +0000
(22:39 -0700)
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>
src/stmf0/ao_adc_fast.c
patch
|
blob
|
history
diff --git
a/src/stmf0/ao_adc_fast.c
b/src/stmf0/ao_adc_fast.c
index fbf4ad2e88527e2d5e8d88c0d47924e52ff81d95..5ce3a396e5a0c538fc8f2f3a67e8b2e6afbcd515 100644
(file)
--- 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;