Hello!
I'm using kernel 6.1.115-vendor-rk35xx from armbian on Orange Pi 3B v2.1, it has rk3566 chip. I try to use DHT11 humidity and temperature module on GPIO3-D0 pin with kernel driver drivers/iio/humidity/dht11.c.
Oscilloscope shows that signal has correct waveform - 20 ms low, then 42 pulses with correct timings. But kernel driver fails to count pulses edges, and reports error in dmesg. Exact amount of detected edges changes each time. Also I see, that sometimes it detects high->low and next again high->low. It definetly means that kernel misses some of edges and this is root of trouble.
Code:
[ 2504.491143] dht11 dht11@0: current timeresolution: 41ns
[ 2508.023547] dht11 dht11@0: 45 edges detected:
[ 2508.023607] dht11 dht11@0: 1: 69125 ns low
[ 2508.023640] dht11 dht11@0: 2: 161875 ns low
[ 2508.023668] dht11 dht11@0: 3: 67958 ns high
[ 2508.023696] dht11 dht11@0: 4: 13125 ns low
[ 2508.023724] dht11 dht11@0: 5: 47834 ns high
[ 2508.023751] dht11 dht11@0: 6: 47541 ns low
[ 2508.023778] dht11 dht11@0: 7: 160417 ns high
[ 2508.023804] dht11 dht11@0: 8: 67375 ns low
[ 2508.023831] dht11 dht11@0: 9: 49291 ns high
[ 2508.023857] dht11 dht11@0: 10: 46083 ns low
[ 2508.023883] dht11 dht11@0: 11: 160417 ns high
[ 2508.023910] dht11 dht11@0: 12: 65625 ns low
[ 2508.023936] dht11 dht11@0: 13: 51916 ns low
[ 2508.023963] dht11 dht11@0: 14: 161584 ns low
[ 2508.023989] dht11 dht11@0: 15: 67083 ns low
[ 2508.024015] dht11 dht11@0: 16: 12250 ns low
[ 2508.024041] dht11 dht11@0: 17: 160708 ns low
[ 2508.024067] dht11 dht11@0: 18: 67083 ns low
[ 2508.024094] dht11 dht11@0: 19: 163333 ns low
[ 2508.024121] dht11 dht11@0: 20: 67375 ns low
[ 2508.024147] dht11 dht11@0: 21: 165084 ns high
[ 2508.024173] dht11 dht11@0: 22: 15166 ns low
[ 2508.024199] dht11 dht11@0: 23: 172083 ns high
[ 2508.024225] dht11 dht11@0: 24: 66209 ns high
[ 2508.024252] dht11 dht11@0: 25: 12541 ns high
[ 2508.024278] dht11 dht11@0: 26: 168875 ns high
[ 2508.024303] dht11 dht11@0: 27: 66208 ns low
[ 2508.024331] dht11 dht11@0: 28: 161875 ns low
[ 2508.024357] dht11 dht11@0: 29: 66792 ns low
[ 2508.024383] dht11 dht11@0: 30: 162458 ns low
[ 2508.024409] dht11 dht11@0: 31: 74958 ns high
[ 2508.024436] dht11 dht11@0: 32: 54542 ns high
[ 2508.024463] dht11 dht11@0: 33: 58333 ns low
[ 2508.024489] dht11 dht11@0: 34: 163041 ns low
[ 2508.024515] dht11 dht11@0: 35: 16625 ns high
[ 2508.024542] dht11 dht11@0: 36: 74375 ns high
[ 2508.024568] dht11 dht11@0: 37: 47542 ns high
[ 2508.024595] dht11 dht11@0: 38: 43750 ns low
[ 2508.024621] dht11 dht11@0: 39: 160708 ns low
[ 2508.024647] dht11 dht11@0: 40: 65333 ns low
[ 2508.024675] dht11 dht11@0: 41: 47834 ns high
[ 2508.024701] dht11 dht11@0: 42: 45208 ns low
[ 2508.024726] dht11 dht11@0: 43: 11375 ns high
[ 2508.024752] dht11 dht11@0: 44: 156333 ns low
[ 2508.024780] dht11 dht11@0: Only 45 signal edges detected
There should be 83 edges (low->high and high->low), according to source:
Code:
/*
* Note that when reading the sensor actually 84 edges are detected, but
* since the last edge is not significant, we only store 83:
*/
Did anyone used this driver and if you had same issue, how it fixed?
Thank you!