[#5636] generic gpio works on bf533 in the opposite way
Submitted By: Mingquan Pan
Open Date
2009-10-23 00:30:30 Close Date
2009-10-26 03:34:34
Priority:
Medium Assignee:
Michael Hennerich
Status:
Closed Fixed In Release:
N/A
Found In Release:
2010R1 Release:
Category:
N/A Board:
N/A
Processor:
BF533 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Rejected
Uboot version or rev.:
Toolchain version or rev.:
09r1-rc9
App binary format:
N/A
Summary: generic gpio works on bf533 in the opposite way
Details:
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
root:/sys/devices/virtual/gpio/gpio2> echo 1 > 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
1
root:/sys/devices/virtual/gpio/gpio5> cat value
0
root:/sys/devices/virtual/gpio/gpio5> cat value
Follow-ups
--- 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
Logic 1.
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.
Rejected
--- 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
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found