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

 
 

You are not allowed to post comments on this tracker with your current authentification 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: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: Ready For TestPrivacy: Public
Assigned to: Rene Liebscher <rliebscher>Originator Name: Joakim Lubeck
Originator Email: -unavailable-Open/Closed: Open

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:

---
programmer
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 ||
---

/Joakim

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 30 Nov 2013 12:16:18 PM UTCrliebscherStatusNone=>Ready For Test
      Assigned toNone=>rliebscher

    Back to the top


    Powered by Savane 3.1-cleanup