2010-04-08 04:16:03     BF537 GPIO

Document created by Aaronwu Employee on Aug 21, 2013
Version 1Show Document
  • View in full screen mode

2010-04-08 04:16:03     BF537 GPIO

Louis Ruch (SOUTH AFRICA)

Message: 88225   

 

Hello everyone,

 

I am busy working on a BF537 Stamp board, I have been looking through the forums trying to find exactly how to do this.  First of all I have enabled the GPIO sysfs driver as shown in:

 

  docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:gpio-sysfs

 

and I am trying to get access to two GPIO pins to use with our projects.

 

PF4 and PF6

 

 

 

PF4* – GPIO/TMR5/SPI SSEL6

 

PF6* – GPIO/TMR3/SPI SSEL4

 

I am not exactly sure how it is mapped to a pin number though, from the BF537 if I try and export the pin PF4:

 

 

 

root:/sys/class/gpio> echo PF4 > /sys/class/gpio/export

 

PFroot:/sys/class/gpio> ls

 

export     gpiochip0  unexport

 

root:/sys/class/gpio>

 

I get nothing so I assume it is tied to a full number not PF4, so after some searching I tried using 54 (found this in the forum), however this seems to activate gpio5, all 5x seem to do this.  The same happens with 64, etc.

root:/sys/class/gpio> echo 54 > /sys/class/gpio/export

root:/sys/class/gpio> ls

export     gpio5      gpiochip0  unexport

root:/sys/class/gpio>

 

 

 

 

Thanks in advanced,

 

 

 

Louis

QuoteReplyEditDelete

 

 

2010-04-08 04:21:57     Re: BF537 GPIO

Louis Ruch (SOUTH AFRICA)

Message: 88226   

 

Hello everyone,

 

 

 

I see that 54 is the IRQ number not the GPIO number.  I found this link the the previous document that discribes what I need:

 

  docs.blackfin.uclinux.org/doku.php?id=linux-kernel:interrupts#gpio_interrupt_processing

 

 

 

Regards,

Attachments

    Outcomes