Hi all!
I have Orange Pi One with Armbian Debian 5.8.9-sunxi on board.
The problem is that when I catch 2 kHz square wave with OPi gpio, I have very big delta between signals.
If I use "interrupt both endges" parameter for gpio, time between signals must be 250 microsecs. But now it floats between 200 - 290 microsecs.
And I have achive this result after some suggestions from other forum topics: using isolcpu=3, run c program on this cpu, use max priority, disable powersaving for CPU.
I try to read with wiringOP lib, and directly from sysfs, but still have jittering about 90 us.
Also I think, that I have not very bad results for cyclictest:
# cyclictest -a -t -n -p80
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 0.00 0.00 0.00 1/127 2335
T: 0 ( 2332) P:80 I:1000 C: 32762 Min: 8 Act: 11 Avg: 12 Max: 98
T: 1 ( 2333) P:80 I:1500 C: 21841 Min: 8 Act: 19 Avg: 11 Max: 48
T: 2 ( 2334) P:80 I:2000 C: 16381 Min: 8 Act: 9 Avg: 12 Max: 113
T: 3 ( 2335) P:80 I:2500 C: 13104 Min: 10 Act: 10 Avg: 10 Max: 16
The main quieston is - does direct programming /dev/mem gpio registers helps me to decrease floating between receiving signals?
May be other suggestions? Please, help!
Thank you!