Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
912 Views

problems writing changes to /sys/kernel/debug/gpio_debug/gpio31 etc...

Jump to solution

I post below output from terminal.

Current_pullmode appears to contain a blank line

I attempt to write "pullup" to the file, but still have a file containing a blank line after this operation

My listing shows that changes have been made to file current_pullmode, and at no stage did I have issues with permissions.

How can I make changes to this file?

root@edison1:~# cd /sys/kernel/debug/gpio_debug/gpio31

root@edison1:/sys/kernel/debug/gpio_debug/gpio31# cat current_pullmode

root@edison1:/sys/kernel/debug/gpio_debug/gpio31# echo "pullup" > current_pullmode

root@edison1:/sys/kernel/debug/gpio_debug/gpio31# cat current_pullmode

root@edison1:/sys/kernel/debug/gpio_debug/gpio31# ls -l

-r--r--r-- 1 root root 0 Jan 1 2000 available_debounce

-r--r--r-- 1 root root 0 Jan 1 2000 available_direction

-r--r--r-- 1 root root 0 Jan 1 2000 available_irqtype

-r--r--r-- 1 root root 0 Jan 1 2000 available_opendrain

-r--r--r-- 1 root root 0 Jan 1 2000 available_override_indir

-r--r--r-- 1 root root 0 Jan 1 2000 available_override_inval

-r--r--r-- 1 root root 0 Jan 1 2000 available_override_outdir

-r--r--r-- 1 root root 0 Jan 1 2000 available_override_outval

-r--r--r-- 1 root root 0 Jan 1 2000 available_pinmux

-r--r--r-- 1 root root 0 Jan 1 2000 available_pullmode

-r--r--r-- 1 root root 0 Jan 1 2000 available_pullstrength

-r--r--r-- 1 root root 0 Jan 1 2000 available_standby_indir

-r--r--r-- 1 root root 0 Jan 1 2000 available_standby_inval

-r--r--r-- 1 root root 0 Jan 1 2000 available_standby_opendrain

-r--r--r-- 1 root root 0 Jan 1 2000 available_standby_outdir

-r--r--r-- 1 root root 0 Jan 1 2000 available_standby_outval

-r--r--r-- 1 root root 0 Jan 1 2000 available_standby_pullmode

-r--r--r-- 1 root root 0 Jan 1 2000 available_standby_trigger

-r--r--r-- 1 root root 0 Jan 1 2000 available_value

-rw-r--r-- 1 root root 0 Jan 1 2000 conf_reg

-rw-r--r-- 1 root root 0 Jan 1 2000 current_debounce

-rw-r--r-- 1 root root 0 Jan 1 2000 current_direction

-rw-r--r-- 1 root root 0 Jan 1 2000 current_irqtype

-rw-r--r-- 1 root root 0 Jan 1 2000 current_opendrain

-rw-r--r-- 1 root root 0 Jan 1 2000 current_override_indir

-rw-r--r-- 1 root root 0 Jan 1 2000 current_override_inval

-rw-r--r-- 1 root root 0 Jan 1 2000 current_override_outdir

-rw-r--r-- 1 root root 0 Jan 1 2000 current_override_outval

-rw-r--r-- 1 root root 0 Jan 1 2000 current_pinmux

-rw-r--r-- 1 root root 0 Sep 26 16:02 current_pullmode

-rw-r--r-- 1 root root 0 Jan 1 2000 current_pullstrength

-rw-r--r-- 1 root root 0 Jan 1 2000 current_standby_indir

-rw-r--r-- 1 root root 0 Jan 1 2000 current_standby_inval

-rw-r--r-- 1 root root 0 Jan 1 2000 current_standby_opendrain

-rw-r--r-- 1 root root 0 Jan 1 2000 current_standby_outdir

-rw-r--r-- 1 root root 0 Jan 1 2000 current_standby_outval

-rw-r--r-- 1 root root 0 Jan 1 2000 current_standby_pullmode

-rw-r--r-- 1 root root 0 Jan 1 2000 current_standby_trigger

-rw-r--r-- 1 root root 0 Jan 1 2000 current_value

-r--r--r-- 1 root root 0 Jan 1 2000 irq_count

-r--r--r-- 1 root root 0 Jan 1 2000 register_info

root@edison1:/sys/kernel/debug/gpio_debug/gpio31#

thank you

0 Kudos

Accepted Solutions
Highlighted
Community Manager
22 Views

Hi jayls,

 

 

Thank you for your interest in our products.

 

Regarding your issue (and I believe you're using the Arduino Breakout board, please correct me if I'm wrong), there are some GPIO pins that can't be changed or edited because they are part of the bigger multiplexing control. I believe this is the case for GPIO31, and this is way you're getting this behavior. Take a look at the Edison Hardware Guide to check the available pins http://download.intel.com/support/edison/sb/edisonarduino_hg_331191007.pdf http://download.intel.com/support/edison/sb/edisonarduino_hg_331191007.pdf.

 

 

Regards,

 

-Pablo

View solution in original post

0 Kudos
3 Replies
Highlighted
Community Manager
23 Views

Hi jayls,

 

 

Thank you for your interest in our products.

 

Regarding your issue (and I believe you're using the Arduino Breakout board, please correct me if I'm wrong), there are some GPIO pins that can't be changed or edited because they are part of the bigger multiplexing control. I believe this is the case for GPIO31, and this is way you're getting this behavior. Take a look at the Edison Hardware Guide to check the available pins http://download.intel.com/support/edison/sb/edisonarduino_hg_331191007.pdf http://download.intel.com/support/edison/sb/edisonarduino_hg_331191007.pdf.

 

 

Regards,

 

-Pablo

View solution in original post

0 Kudos
Highlighted
New Contributor I
22 Views

Hi Pablo,

You are wrong that I am using an arduino breakout board, but nevertheless, I suspect, you have still pointed me in the right direction.

I am using a Sparkfun breakout board and more pertinently the sparkfun GPIO block.

As far as I can see this has twenty pins not dissimilar to an Arduino (I know nothing about arduinos!).

Here is a graphic of the GPIO block

and here is a little table I use to map the gpio pins to mraa

GPIO

mraa

14

36

15

48

44

31

45

45

46

32

47

46

48

33

49

47

So if I want to use gpio 44, then I code using mraa pin 31.

Where I have been going wrong is thinking that the stuff in /sys/kernel/debug/gpio_debug/gpio* relates to mraa numbers when in fact it relates to gpio numbers,

So in the example above using gpio44 I code using mraa pin 31, but if I want to make changes to the pullup etc then I need to be working in directory /sys/kernel/debug/gpio_debug/gpio44

and lo and behold I have no problem writing to that directory.

However, that is as far as I will get with this tonight

0 Kudos
Highlighted
Community Manager
22 Views

Hi Jayls,

 

 

I apologize for the confusion then, thanks for letting me know about the product you're actually using. But yes, the MRAA GPIO enumeration is different from the Linux GPIO enumeration, there's in fact a really good guide that you can check here http://www.i-programmer.info/programming/hardware/8744-exploring-edison-mraa-gpio.html http://www.i-programmer.info/programming/hardware/8744-exploring-edison-mraa-gpio.html.

 

 

Regards,

 

-Pablo
0 Kudos