Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

GPIO input latency problem

Featured Replies

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!
 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.