(0 << STM_ADC_CR1_AWDCH ));
/* 384 cycle sample time for everyone */
- stm_adc.smpr1 = 0x3ffff;
+ stm_adc.smpr1 = 0x00ffffff;
stm_adc.smpr2 = 0x3fffffff;
stm_adc.sqr1 = ((AO_NUM_ADC - 1) << 20);
#error "too many ADC channels"
#endif
-#ifndef HAS_ADC_TEMP
-#error Please define HAS_ADC_TEMP
-#endif
-#if HAS_ADC_TEMP
- stm_adc.cr2 |= ((1 << STM_ADC_CR2_TSVREFE));
-#endif
-
/* Clear any stale status bits */
stm_adc.sr = 0;
ao_dma_alloc(STM_DMA_INDEX(STM_DMA_CHANNEL_ADC1));
+ /* Turn on the ADC so that it is ready to convert */
+
+ stm_adc.cr2 = AO_ADC_CR2_VAL;
+
ao_cmd_register(&ao_adc_cmds[0]);
}
#include <ao_flash_stm_pins.h>
-/* Companion port cs_companion0 PB6 */
+/* USB DM is on PA11 (CN10 pin 14). USB DP is on PA12 (CN10 pin 12) */
+
+/* For pullup, we'll use PB6 (CN10 pin 16) */
#define AO_BOOT_PIN 1
#define AO_BOOT_APPLICATION_GPIO stm_gpiob