diff options
author | Florian Baumann <derflob@derflob.de> | 2020-05-06 22:56:52 +0200 |
---|---|---|
committer | Florian Baumann <derflob@derflob.de> | 2020-05-06 22:56:52 +0200 |
commit | 247514b80357b62725abdfc76af620145ad0a2fb (patch) | |
tree | c40b65dc65d42ede5ccb910e9f3a79aac8d2a42e | |
parent | a79a1465165373ebc3df762e4a1c863c52b44877 (diff) | |
download | ULPSoilMonitor-247514b80357b62725abdfc76af620145ad0a2fb.tar.gz ULPSoilMonitor-247514b80357b62725abdfc76af620145ad0a2fb.tar.bz2 |
wait 125ms before measuring sensor
-rw-r--r-- | ulp_soil.s | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -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: |