View: 6645|Reply: 6

Orange rk3399 & GPIO

[Copy link]

2

threads

9

posts

71

credits

Registered member

Rank: 2

credits
71
Published in 2019-4-11 18:47:06 | Show all floors |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
Published in 2019-5-20 14:13:54 | Show all floors
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
Published in 2019-4-26 19:58:49 | Show all floors

2

threads

9

posts

71

credits

Registered member

Rank: 2

credits
71
 Author| Published in 2019-4-22 06:28:25 | Show all floors
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| Published in 2019-5-17 07:14:57 | Show all floors
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| Published in 2019-5-18 07:48:58 | Show all floors
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| Published in 2019-5-20 22:52:12 | Show all floors
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 need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list