summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Baumann <derflob@derflob.de>2020-04-29 18:53:30 +0200
committerFlorian Baumann <derflob@derflob.de>2020-04-29 18:53:30 +0200
commita79a1465165373ebc3df762e4a1c863c52b44877 (patch)
tree11035f217bd52c53cb1f9c33f833703cad246e05
parent427560fdd8e0f0cce9b590f416c2b10856dafe1d (diff)
downloadULPSoilMonitor-a79a1465165373ebc3df762e4a1c863c52b44877.tar.gz
ULPSoilMonitor-a79a1465165373ebc3df762e4a1c863c52b44877.tar.bz2
enable adc1 for ulp before setting it up
-rw-r--r--ULPSoilMonitor.ino2
1 files changed, 1 insertions, 1 deletions
diff --git a/ULPSoilMonitor.ino b/ULPSoilMonitor.ino
index d91fd3d..f7ccdb1 100644
--- a/ULPSoilMonitor.ino
+++ b/ULPSoilMonitor.ino
@@ -60,6 +60,7 @@ static void init_ulp_program()
ESP_ERROR_CHECK(err);
/* Configure ADC channel */
+ adc1_ulp_enable();
adc1_config_channel_atten(ADC1_CHANNEL_7, ADC_ATTEN_DB_0);
adc1_config_channel_atten(ADC1_CHANNEL_4, ADC_ATTEN_DB_0);
adc1_config_channel_atten(ADC1_CHANNEL_5, ADC_ATTEN_DB_0);
@@ -67,7 +68,6 @@ static void init_ulp_program()
adc1_config_channel_atten(ADC1_CHANNEL_3, ADC_ATTEN_DB_0);
adc1_config_channel_atten(ADC1_CHANNEL_0, ADC_ATTEN_DB_0);
adc1_config_width(ADC_WIDTH_BIT_12);
- adc1_ulp_enable();
gpio_deep_sleep_hold_en();