[solved] C2 GPIO 7 switches to input automatically

Post Reply
dertester
Posts: 120
Joined: Fri Feb 20, 2015 8:51 pm
languages_spoken: english
Contact:

[solved] C2 GPIO 7 switches to input automatically

Unread post by dertester » Sat Aug 18, 2018 7:42 pm

Hey,

im running a C2
Linux odroid 3.16.57-24 #1 SMP PREEMPT Mon Jul 2 18:10:24 -03 2018 aarch64 aarch64 aarch64 GNU/Linux
Release: 18.04

I wonder why or what sets my GPIO 7 (wiring pi number, export 249) back to input mode.

For example i do "gpio mode 7 out" it changes state and after 2-10 seconds it switches back to input mode...

Any ideas?
Last edited by dertester on Wed Aug 22, 2018 7:08 am, edited 1 time in total.

User avatar
odroid
Site Admin
Posts: 29651
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: C2 GPIO 7 switches to input automatically

Unread post by odroid » Mon Aug 20, 2018 9:40 am

Can you show us your full WiringPi Python code?
Also check "lsmod" output too.

dertester
Posts: 120
Joined: Fri Feb 20, 2015 8:51 pm
languages_spoken: english
Contact:

Re: C2 GPIO 7 switches to input automatically

Unread post by dertester » Mon Aug 20, 2018 6:27 pm

Hey,
thanks for the answer.

But im not sure what is meant with "full WiringPi Phython code".

The only thing i installed is WiringPi following the first part of this guide:https://wiki.odroid.com/odroid-c2/appli ... o/wiringpi

Code: Select all

$ sudo apt install git
$ git clone https://github.com/hardkernel/wiringPi
$ cd wiringPi
$ sudo ./build
0-6 are working like they should but 7 always goes back to input.
I basically only use the gpio commands from bash.


Here is the output of lsmod

Code: Select all

root@odroid:~# lsmod
Module                  Size  Used by
rtl8192cu              94442  0
rtl_usb                14065  1 rtl8192cu
rtlwifi                84204  2 rtl_usb,rtl8192cu
rtl8192c_common        55051  1 rtl8192cu
mac80211              538166  3 rtl_usb,rtlwifi,rtl8192cu
cfg80211              480030  2 mac80211,rtlwifi
w1_gpio                 3801  0
wire                   28606  1 w1_gpio
meson_gpiomem           4048  0
gxbb_wdt                3395  0
sch_fq_codel            7827  6
ip_tables              17220  0
ipv6                  387345  29
autofs4                27592  2

User avatar
odroid
Site Admin
Posts: 29651
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: C2 GPIO 7 switches to input automatically

Unread post by odroid » Tue Aug 21, 2018 8:51 am

1-wire device drivers are bothering GPIO 249 probably.
Add w1_gpio and wire into /etc/modprobe.d/blacklist.conf file.

dertester
Posts: 120
Joined: Fri Feb 20, 2015 8:51 pm
languages_spoken: english
Contact:

Re: C2 GPIO 7 switches to input automatically

Unread post by dertester » Wed Aug 22, 2018 7:08 am

Thank you!

That solved the problem

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 1 guest