bugAVR Downloader/UploaDEr - Bugs: bug #40748, linuxgpio doesn't work on...


You are not allowed to post comments on this tracker with your current authentication level.

bug #40748: linuxgpio doesn't work on Raspberry PI rev. 2.

Submitted by:  None
Submitted on:  Fri 29 Nov 2013 12:19:14 PM UTC  
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  Rene Liebscher <rliebscher> Originator Name:  Joakim Lubeck
Originator Email:  -email is unavailable- Open/Closed:  Closed
Release:  6.1 Programmer hardware: 
Device type: 

Fri 16 Nov 2018 10:48:31 PM UTC, comment #3: 

> This bug is present in 6.3.

Nope. What you're reporting is actually bug #47550 which has already been fixed in the sources, but is unrelated to this (original) bug.

Joerg Wunsch <joerg_wunsch>
Project Administrator
Thu 15 Nov 2018 04:20:55 PM UTC, comment #2: 

This bug is present in 6.3.
6.2 works.

Thanks for this awesome software!

Gaspar Karm <gasparka>
Sat 30 Nov 2013 12:16:19 PM UTC, comment #1: 

fixed in revision 1251

There were two problems:

- linuxgpio: did not mask out the inverse flag at the check for pin == 0 (so it tried to open gpio for vcc and buff functions)
- pindefs.c: fill_old_pinlist did create an entry (O | inverse_flag) for unused pin lists (buff and vcc)

Please test it now again.

Rene Liebscher <rliebscher>
Project MemberIn charge of this item.
Fri 29 Nov 2013 12:19:14 PM UTC, original submission:  

I just wanted to test linuxgpio on a Raspberry PI rev. 2. I used the following configuration entry:

  id    = "linuxgpio";
  desc  = "Use the Linux sysfs interface to bitbang GPIO lines";
  type  = "linuxgpio";
  reset = 17;
  sck   = 2;
  mosi  = 3;
  miso  = 4;

And used this command:

sudo ./avrdude -c linuxgpio -p t1634
Can't export GPIO 0, already exported/busy?: Device or resource busy

I don't really know why, but it may be because GPIO 0 isn't available on the RPi rev. 2. and because of the "special handling" of GPIO 0 in linuxgpio.c.

I don't have a solution but got it to work with this as a workaround:

svn diff linuxgpio.c 
Index: linuxgpio.c
--- linuxgpio.c (revision 1250)
+++ linuxgpio.c (working copy)
@@ -257,7 +257,7 @@
   //that unwanted toggling of GPIO0 can occur and that other optional pins
   //mostry LED status, can't be set to GPIO0. It can be fixed when a better
   //solution exists.
-  for (i=0; i<N_PINS; i++) {
+  for (i=2; i<N_PINS; i++) {
     if ( pgm->pinno[i] != 0 ||
          i == PIN_AVR_RESET ||
          i == PIN_AVR_SCK   ||




No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by gasparka (Posted a comment)
  • -email is unavailable- added by rliebscher (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-11-16 joerg_wunsch StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
        ReleaseNone => 6.1
    2013-11-30 rliebscher StatusNone => Ready For Test
        Assigned toNone => rliebscher

    Back to the top

    Powered by Savane 3.5