From: Victhor F. <vic...@gm...> - 2010-02-03 08:51:49
|
I just wanted to confirm that doing this works for GPIO22, it lights up the LED(blue) on my Palo43, but you have to set it to off because the OMAP sinks the LED, not powers it. Needless to say that this also works for the red LED on GPIO21. > > I am using a Gumstix Overo-Fire with the OMAP 3530 processor, connected to > the Tobi expansion board. The Tobi board has 40 pin header for access to > some GPIO pins. > > (Pinout for the 40-pin header) > http://www.gumstix.net/Hardware/view/I/O-connectors-cabling/Gumstix-Summit-board-40-pin-header-SV1/112.html > http://www.gumstix.net/Hardware/view/I/O-connectors-cabling/Gumstix-Summit-board-40-pin-header-SV1/112.html > > I am simply trying to turn on, and then off, a GPIO pin. I have found two > types of code for doing this, but I am still having problems. > > echo 146 > /sys/class/gpio/export //this makes the GPIO### files to > use to set up the Pin > echo out > /sys/class/gpip/gpio146/direction //This sets the pin to > output > echo 1 > /sys/class/gpio/gpio146/value //This sets the pin to > "on" > echo 0 > /sys/class/gpio/gpio146/value // This set the pin to > "off" > > 1) Is this correct? Is this how you turn on and off pin 146? > 2) Is this what is called controlling GPIO through "user-space" > 3) The link above of the 40 pin header shows that GPIO pin is at header > pin location 27. When I probe pin 27 nothing happens. Can someone let me > know what might be wrong? > 4) What pins are available for me to turn on and off? > > > 5)I found another C program that writes values directly into memory > locations to controll the GPIO pins. Is this what is called "kernel-space"? > > 6) How do I know what memory location corresponds to GPIO146? I have looked > at the OMAP processor TRM, but it doesn't explain it very well. Is there > another document? > > Thank you. > -- > View this message in context: http://old.nabble.com/How-to-turn-on-and-find-a-GPIO-pin----tp27427920p27427920.html > Sent from the Gumstix mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users |