From 764446fb8680d75f93481c039adebda88f0fb960 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sun, 29 Nov 2020 15:06:13 -0500 Subject: adc measures vdd; sleep mode for 1.1mA idd --- cfg/halconf.h | 2 +- cfg/mcuconf.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'cfg') diff --git a/cfg/halconf.h b/cfg/halconf.h index fe4c478..5cdb5e0 100644 --- a/cfg/halconf.h +++ b/cfg/halconf.h @@ -44,7 +44,7 @@ * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC TRUE #endif /** diff --git a/cfg/mcuconf.h b/cfg/mcuconf.h index f02fe10..19caa57 100644 --- a/cfg/mcuconf.h +++ b/cfg/mcuconf.h @@ -42,18 +42,18 @@ #define STM32_VOS STM32_VOS_1P8 #define STM32_PVD_ENABLE FALSE #define STM32_PLS STM32_PLS_LEV0 -#define STM32_HSI16_ENABLED FALSE +#define STM32_HSI16_ENABLED TRUE #define STM32_HSI16_DIVIDER_ENABLED FALSE #define STM32_LSI_ENABLED TRUE #define STM32_HSE_ENABLED FALSE #define STM32_LSE_ENABLED FALSE -#define STM32_ADC_CLOCK_ENABLED FALSE -#define STM32_MSIRANGE STM32_MSIRANGE_2M -#define STM32_SW STM32_SW_MSI +//#define STM32_ADC_CLOCK_ENABLED FALSE +#define STM32_MSIRANGE STM32_MSIRANGE_4M +#define STM32_SW STM32_SW_HSI16 #define STM32_PLLSRC STM32_PLLSRC_HSI16 #define STM32_PLLMUL_VALUE 4 #define STM32_PLLDIV_VALUE 2 -#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_HPRE STM32_HPRE_DIV4 #define STM32_PPRE1 STM32_PPRE1_DIV1 #define STM32_PPRE2 STM32_PPRE2_DIV1 #define STM32_MCOSEL STM32_MCOSEL_NOCLOCK @@ -85,7 +85,7 @@ * ADC driver system settings. * Note, IRQ is shared with EXT channels 21 and 22. */ -#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC1 TRUE #define STM32_ADC_ADC1_CKMODE STM32_ADC_CKMODE_ADCCLK #define STM32_ADC_ADC1_DMA_PRIORITY 2 #define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 -- cgit v1.2.3