summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Baumann <derflob@derflob.de>2020-05-06 22:56:52 +0200
committerFlorian Baumann <derflob@derflob.de>2020-05-06 22:56:52 +0200
commit247514b80357b62725abdfc76af620145ad0a2fb (patch)
treec40b65dc65d42ede5ccb910e9f3a79aac8d2a42e
parenta79a1465165373ebc3df762e4a1c863c52b44877 (diff)
downloadULPSoilMonitor-247514b80357b62725abdfc76af620145ad0a2fb.tar.gz
ULPSoilMonitor-247514b80357b62725abdfc76af620145ad0a2fb.tar.bz2
wait 125ms before measuring sensor
-rw-r--r--ulp_soil.s34
1 files changed, 34 insertions, 0 deletions
diff --git a/ulp_soil.s b/ulp_soil.s
index 75e49d2..195f9b3 100644
--- a/ulp_soil.s
+++ b/ulp_soil.s
@@ -88,6 +88,40 @@ enable_sensors:
WRITE_RTC_REG(RTC_GPIO_OUT_W1TC_REG, RTC_GPIO_OUT_DATA_W1TC_S + 6, 1, 1)
WRITE_RTC_REG(RTC_IO_PAD_DAC1_REG, RTC_IO_PDAC1_HOLD_S, 1, 1)
+ /* wait about 125ms for SENSOR values to stabilize */
+ wait 40000 /* 5 ms */
+ wait 40000
+ wait 40000
+ wait 40000
+
+ wait 40000
+ wait 40000
+ wait 40000
+ wait 40000
+
+ wait 40000
+ wait 40000
+ wait 40000
+ wait 40000
+
+ wait 40000
+ wait 40000
+ wait 40000
+ wait 40000
+
+ wait 40000
+ wait 40000
+ wait 40000
+ wait 40000
+
+ wait 40000
+ wait 40000
+ wait 40000
+ wait 40000
+
+ wait 40000
+
+
/* r2: adc_soilx maps soil sensor to adc channel */
/* r3: after measurement return to store soilx value to its shadow value */
measure_soil0: