altos/stmf0: Switch ADC fast to ADC clock
[fw/altos] / src / stmf0 / ao_adc_fast.c
index 0a2e2c5c7b13f952ec5e20ede18132381862d2be..5ce3a396e5a0c538fc8f2f3a67e8b2e6afbcd515 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -153,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;