Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
View: 1522|Reply: 6

Orange rk3399 & GPIO

[Copy link]

2

Threads

9

Posts

71

Credits

Registered member

Rank: 2

Credits
71
Post time 2019-4-11 18:47:06 | Show all posts |Read mode
Is anybody know how to use GPIO with some of existing os images?? WiringOP does not not work. Why i bought this board? =(((

0

Threads

3

Posts

42

Credits

Novice

Rank: 1

Credits
42
Post time 2019-5-20 14:13:54 | Show all posts
iBuben replied at 2019-5-18 07:48
Hmm. Now I can write to output, but can't read from input pins. Even if I set mode to "in", gpio sti ...

This issue is resolved, you can try it.
https://github.com/orangepi-xunlong/wiringOP

0

Threads

3

Posts

42

Credits

Novice

Rank: 1

Credits
42
Post time 2019-4-26 19:58:49 | Show all posts

2

Threads

9

Posts

71

Credits

Registered member

Rank: 2

Credits
71
 Author| Post time 2019-4-22 06:28:25 | Show all posts
So, I tried to patch sources of "wiringop". Just changed path from /proc/cpuinfo to dummy file with hardware and revision strings... Now it crashes at mmap call.
root@orangepi:~# gpio readall
wiringPiSetup: mmap (GPIO) failed: Operation not permitted
I also tried run "cat /dev/mem" ang got many kernel messages:

root@orangepi:~#
Message from syslogd@localhost at Apr 21 22:10:00 ...
kernel:[  346.116162] Internal error: Oops: 96000006 [#1] SMP

Message from syslogd@localhost at Apr 21 22:10:00 ...
kernel:[  346.680390] Process cat (pid: 1799, stack limit = 0xffffffc0ec1dc000)

Message from syslogd@localhost at Apr 21 22:10:00 ...
kernel:[  346.682506] Stack: (0xffffffc0ec1dfd60 to 0xffffffc0ec1e0000)

Message from syslogd@localhost at Apr 21 22:10:00 ...
kernel:[  346.684567] fd60: ffffffc0ec1dfdb0 ffffff80081f2d78 ffffffc0ecf3db80 ffffffc0ec1dfeb8

Message from syslogd@localhost at Apr 21 22:10:00 ...
kernel:[  346.686840] fd80: 0000000000020000 0000007fae7b2000 0000000080000000 0000000000000015

Message from syslogd@localhost at Apr 21 22:10:00 ...
kernel:[  346.689126] fda0: 000000000000011d 000000000000003f ffffffc0ec1dfe40 ffffff80081f3628
..........

Not sure, that I do right, but on orangePi PC this action does not cause any errors and messages.

2

Threads

9

Posts

71

Credits

Registered member

Rank: 2

Credits
71
 Author| Post time 2019-5-17 07:14:57 | Show all posts
chenshiyan replied at 2019-4-26 19:58
https://github.com/chen3135/wiringOP_rk3399.git

Wow! Thank you, buddy!! This really works!!!

2

Threads

9

Posts

71

Credits

Registered member

Rank: 2

Credits
71
 Author| Post time 2019-5-18 07:48:58 | Show all posts
Hmm. Now I can write to output, but can't read from input pins. Even if I set mode to "in", gpio still able to write to this pin. It's strange. On my orange pi pc such action is impossible. I tried to connect 3.3v to any input pins and read it, but it shows value 0.

2

Threads

9

Posts

71

Credits

Registered member

Rank: 2

Credits
71
 Author| Post time 2019-5-20 22:52:12 | Show all posts
chenshiyan replied at 2019-5-20 14:13
This issue is resolved, you can try it.
https://github.com/orangepi-xunlong/wiringOP

Thanks! Now I see data from my dht11 sensor.
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-12-14 19:03 GMT+8 , Processed in 0.029165 second(s), 23 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list