[#5636] generic gpio works on bf533 in the opposite way
Submitted By: Mingquan Pan
2009-10-23 00:30:30 Close Date
Closed Fixed In Release:
Found In Release:
BF533 Silicon Revision:
Is this bug repeatable?:
Uboot version or rev.:
Toolchain version or rev.:
App binary format:
Summary: generic gpio works on bf533 in the opposite way
generic gpio works on bf533 in the opposite way.
When testing led1, given 1, turn off and given 0 ,it is on.
root:/sys/devices/virtual/gpio/gpio2> echo out > direction
root:/sys/devices/virtual/gpio/gpio2> echo 1 > value
root:/sys/devices/virtual/gpio/gpio2> echo 0 > value
when testing btn1, pushing is 0 and release is 1.
root:/sys/devices/virtual/gpio/gpio5> echo in > direction
root:/sys/devices/virtual/gpio/gpio5> cat value
--- Mike Frysinger 2009-10-23 02:29:27
and you're using 2009R1+ u-boot right ?
--- Michael Hennerich 2009-10-23 03:53:14
This is absolutely expected behavior. It's due to the way the LEDs and Buttons
are wired on the BF533-STAMP board. The button has a PULL-UP, while the button
press shorts the PULL-UP to GND. So pressing the button is Logic 0 while open is
With the LEDs it's quite similar - the Anode of the LED is permanently
connected to the Positive Supply - while a logic Zero connects the Cathode to
GND - and thus turns on the LED.
--- Mingquan Pan 2009-10-26 03:34:34
Well, but I don't remember that when testing simple gpio case, the reaction of
bf533 stamp is on the opposite of other boards. So I have to treat it
differently in the generic gpio test case. Close.
--- Mike Frysinger 2009-10-26 04:03:34
i think i added workarounds to the simple gpio userland code
File Name File Type File Size Posted By
No Files Were Found