From: <gu...@st...> - 2010-02-06 06:57:56
|
Hello all. I feel rather stupid. Let me explain: I have an Overo Air, and a Tobi. I figured that I'd be able to get some document that says "LED 3 is tied to port X" or something similar, which would then allow me to light those LEDs (I have experience writing RTOS's, so I'm used to a little lower level than Linux). Of course, I could find no such document, nor could I find anything on Google to help me with this. The LEDs are pretty teeny, but it does look like I have a few that are not being used. Can someone please explain how I light them? I'm very sorry, I feel like this should be easy, but I can't figure it out. Thank you very much! Kyle Fazzari |
From: Victhor <vic...@gm...> - 2010-02-06 11:24:57
|
It's rather easy, I didn't even know that it would be like that :) X is the GPIO port number. Just type in those commands and your led should light up :) echo X > /sys/class/gpio/export echo out > /sys/class/gpio/gpioX/direction # This should make the LED light up. At least it does on my Palo43 echo 1 > /sys/class/gpio/gpioX/value # On my Palo43, it turns the LED connected to that port turn off echo 0 > /sys/class/gpio/gpioX/value # Turns it on again If you don't want to use that GPIO port again, use the first command, replacing export with unexport. > Hello all. > > I feel rather stupid. Let me explain: I have an Overo Air, and a Tobi. > I figured that I'd be able to get some document that says "LED 3 is > tied to port X" or something similar, which would then allow me to > light those LEDs (I have experience writing RTOS's, so I'm used to a > little lower level than Linux). Of course, I could find no such > document, nor could I find anything on Google to help me with this. > The LEDs are pretty teeny, but it does look like I have a few that are > not being used. Can someone please explain how I light them? I'm very > sorry, I feel like this should be easy, but I can't figure it out. > Thank you very much! > > Kyle Fazzari > > ------------------------------------------------------------------------------ > 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 |
From: <cod...@gm...> - 2010-02-06 14:33:37
|
I've been struggling with turning LEDs on and off myself the past few days. I have LEDs connected to GPIOs 170, 127, and 128. I have all 3 LEDs enabled in the pin mux configuration of u-boot in the overo.h header. If I remember correctly, 2 of the GPIOs are pull type up (PTU) and the other one is pull type down (PTD). I have all 3 pins exported in /sys/class/gpio, and can echo a 1 or a 0 to each of the pins, and 'cat gpioX/value' returns the appropriate number. However, the LEDs do not change at all. One of the LEDs, I believe GPIO128, is constantly on no matter what I set the gpio to in the filesystem. What is the appropriate setting for LED pins in the pin mux configuration? Should they be a certain mode, pull type up/down? On Sat, Feb 6, 2010 at 6:24 AM, Victhor <vic...@gm...> wrote: > It's rather easy, I didn't even know that it would be like that :) > X is the GPIO port number. Just type in those commands and your led > should light up :) > echo X > /sys/class/gpio/export > echo out > /sys/class/gpio/gpioX/direction # This should make the LED > light up. At least it does on my Palo43 > echo 1 > /sys/class/gpio/gpioX/value # On my Palo43, it turns the LED > connected to that port turn off > echo 0 > /sys/class/gpio/gpioX/value # Turns it on again > If you don't want to use that GPIO port again, use the first command, > replacing export with unexport. > > Hello all. > > > > I feel rather stupid. Let me explain: I have an Overo Air, and a Tobi. > > I figured that I'd be able to get some document that says "LED 3 is > > tied to port X" or something similar, which would then allow me to > > light those LEDs (I have experience writing RTOS's, so I'm used to a > > little lower level than Linux). Of course, I could find no such > > document, nor could I find anything on Google to help me with this. > > The LEDs are pretty teeny, but it does look like I have a few that are > > not being used. Can someone please explain how I light them? I'm very > > sorry, I feel like this should be easy, but I can't figure it out. > > Thank you very much! > > > > Kyle Fazzari > > > > > ------------------------------------------------------------------------------ > > 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 > > > > > ------------------------------------------------------------------------------ > 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 > |
From: R. P. M. <log...@gm...> - 2010-02-06 14:44:08
|
On the hardware pin setting you need to set the mux to enable the output and disable both pull up and pull down. Also it would be a good idea to buffer the output from the pin. The CPU pin drivers are not really designed to drive an LED directly. On 2/6/10, cod...@gm... <cod...@gm...> wrote: > I've been struggling with turning LEDs on and off myself the past few days. > I have LEDs connected to GPIOs 170, 127, and 128. I have all 3 LEDs enabled > in the pin mux configuration of u-boot in the overo.h header. If I remember > correctly, 2 of the GPIOs are pull type up (PTU) and the other one is pull > type down (PTD). I have all 3 pins exported in /sys/class/gpio, and can > echo a 1 or a 0 to each of the pins, and 'cat gpioX/value' returns the > appropriate number. However, the LEDs do not change at all. One of the > LEDs, I believe GPIO128, is constantly on no matter what I set the gpio to > in the filesystem. > > What is the appropriate setting for LED pins in the pin mux configuration? > Should they be a certain mode, pull type up/down? > > On Sat, Feb 6, 2010 at 6:24 AM, Victhor <vic...@gm...> wrote: > >> It's rather easy, I didn't even know that it would be like that :) >> X is the GPIO port number. Just type in those commands and your led >> should light up :) >> echo X > /sys/class/gpio/export >> echo out > /sys/class/gpio/gpioX/direction # This should make the LED >> light up. At least it does on my Palo43 >> echo 1 > /sys/class/gpio/gpioX/value # On my Palo43, it turns the LED >> connected to that port turn off >> echo 0 > /sys/class/gpio/gpioX/value # Turns it on again >> If you don't want to use that GPIO port again, use the first command, >> replacing export with unexport. >> > Hello all. >> > >> > I feel rather stupid. Let me explain: I have an Overo Air, and a Tobi. >> > I figured that I'd be able to get some document that says "LED 3 is >> > tied to port X" or something similar, which would then allow me to >> > light those LEDs (I have experience writing RTOS's, so I'm used to a >> > little lower level than Linux). Of course, I could find no such >> > document, nor could I find anything on Google to help me with this. >> > The LEDs are pretty teeny, but it does look like I have a few that are >> > not being used. Can someone please explain how I light them? I'm very >> > sorry, I feel like this should be easy, but I can't figure it out. >> > Thank you very much! >> > >> > Kyle Fazzari >> > >> > >> ------------------------------------------------------------------------------ >> > 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 >> >> >> >> >> ------------------------------------------------------------------------------ >> 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 >> > |
From: Victhor <vic...@gm...> - 2010-02-06 15:08:32
|
The LEDs on the Palo43 are buffered by a 74xx chip, I don't remember the exact model. > On the hardware pin setting you need to set the mux to enable the > output and disable both pull up and pull down. > > Also it would be a good idea to buffer the output from the pin. The > CPU pin drivers are not really designed to drive an LED directly. > > On 2/6/10, cod...@gm... <cod...@gm...> wrote: > > I've been struggling with turning LEDs on and off myself the past few days. > > I have LEDs connected to GPIOs 170, 127, and 128. I have all 3 LEDs enabled > > in the pin mux configuration of u-boot in the overo.h header. If I remember > > correctly, 2 of the GPIOs are pull type up (PTU) and the other one is pull > > type down (PTD). I have all 3 pins exported in /sys/class/gpio, and can > > echo a 1 or a 0 to each of the pins, and 'cat gpioX/value' returns the > > appropriate number. However, the LEDs do not change at all. One of the > > LEDs, I believe GPIO128, is constantly on no matter what I set the gpio to > > in the filesystem. > > > > What is the appropriate setting for LED pins in the pin mux configuration? > > Should they be a certain mode, pull type up/down? > > > > On Sat, Feb 6, 2010 at 6:24 AM, Victhor <vic...@gm...> wrote: > > > >> It's rather easy, I didn't even know that it would be like that :) > >> X is the GPIO port number. Just type in those commands and your led > >> should light up :) > >> echo X > /sys/class/gpio/export > >> echo out > /sys/class/gpio/gpioX/direction # This should make the LED > >> light up. At least it does on my Palo43 > >> echo 1 > /sys/class/gpio/gpioX/value # On my Palo43, it turns the LED > >> connected to that port turn off > >> echo 0 > /sys/class/gpio/gpioX/value # Turns it on again > >> If you don't want to use that GPIO port again, use the first command, > >> replacing export with unexport. > >> > Hello all. > >> > > >> > I feel rather stupid. Let me explain: I have an Overo Air, and a Tobi. > >> > I figured that I'd be able to get some document that says "LED 3 is > >> > tied to port X" or something similar, which would then allow me to > >> > light those LEDs (I have experience writing RTOS's, so I'm used to a > >> > little lower level than Linux). Of course, I could find no such > >> > document, nor could I find anything on Google to help me with this. > >> > The LEDs are pretty teeny, but it does look like I have a few that are > >> > not being used. Can someone please explain how I light them? I'm very > >> > sorry, I feel like this should be easy, but I can't figure it out. > >> > Thank you very much! > >> > > >> > Kyle Fazzari > >> > > >> > > >> ------------------------------------------------------------------------------ > >> > 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 > >> > >> > >> > >> > >> ------------------------------------------------------------------------------ > >> 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 > >> > > > > ------------------------------------------------------------------------------ > 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 |
From: <gu...@st...> - 2010-02-06 17:23:52
|
Victhor, thank you for the great guide. Unfortunately, I have no /sys/class/gpio/gpioX/direction. All I have in there is power, uevent, subsystem, and value. What's different between our two systems? Kyle Fazzari On 2/6/10, Kyle Fazzari <ky...@gm...> wrote: > Victhor, thank you for the great guide. Unfortunately, I have no > /sys/class/gpio/gpioX/direction. All I have in there is power, uevent, > subsystem, and value. What's different between our two systems? > > Kyle Fazzari > > On 2/6/10, Victhor <vic...@gm...> wrote: >> The LEDs on the Palo43 are buffered by a 74xx chip, I don't remember the >> exact model. >>> On the hardware pin setting you need to set the mux to enable the >>> output and disable both pull up and pull down. >>> >>> Also it would be a good idea to buffer the output from the pin. The >>> CPU pin drivers are not really designed to drive an LED directly. >>> >>> On 2/6/10, cod...@gm... <cod...@gm...> wrote: >>> > I've been struggling with turning LEDs on and off myself the past few >>> > days. >>> > I have LEDs connected to GPIOs 170, 127, and 128. I have all 3 LEDs >>> > enabled >>> > in the pin mux configuration of u-boot in the overo.h header. If I >>> > remember >>> > correctly, 2 of the GPIOs are pull type up (PTU) and the other one is >>> > pull >>> > type down (PTD). I have all 3 pins exported in /sys/class/gpio, and >>> > can >>> > echo a 1 or a 0 to each of the pins, and 'cat gpioX/value' returns the >>> > appropriate number. However, the LEDs do not change at all. One of >>> > the >>> > LEDs, I believe GPIO128, is constantly on no matter what I set the >>> > gpio >>> > to >>> > in the filesystem. >>> > >>> > What is the appropriate setting for LED pins in the pin mux >>> > configuration? >>> > Should they be a certain mode, pull type up/down? >>> > >>> > On Sat, Feb 6, 2010 at 6:24 AM, Victhor <vic...@gm...> >>> > wrote: >>> > >>> >> It's rather easy, I didn't even know that it would be like that :) >>> >> X is the GPIO port number. Just type in those commands and your led >>> >> should light up :) >>> >> echo X > /sys/class/gpio/export >>> >> echo out > /sys/class/gpio/gpioX/direction # This should make the LED >>> >> light up. At least it does on my Palo43 >>> >> echo 1 > /sys/class/gpio/gpioX/value # On my Palo43, it turns the LED >>> >> connected to that port turn off >>> >> echo 0 > /sys/class/gpio/gpioX/value # Turns it on again >>> >> If you don't want to use that GPIO port again, use the first command, >>> >> replacing export with unexport. >>> >> > Hello all. >>> >> > >>> >> > I feel rather stupid. Let me explain: I have an Overo Air, and a >>> >> > Tobi. >>> >> > I figured that I'd be able to get some document that says "LED 3 is >>> >> > tied to port X" or something similar, which would then allow me to >>> >> > light those LEDs (I have experience writing RTOS's, so I'm used to >>> >> > a >>> >> > little lower level than Linux). Of course, I could find no such >>> >> > document, nor could I find anything on Google to help me with this. >>> >> > The LEDs are pretty teeny, but it does look like I have a few that >>> >> > are >>> >> > not being used. Can someone please explain how I light them? I'm >>> >> > very >>> >> > sorry, I feel like this should be easy, but I can't figure it out. >>> >> > Thank you very much! >>> >> > >>> >> > Kyle Fazzari >>> >> > >>> >> > >>> >> ------------------------------------------------------------------------------ >>> >> > 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 >>> >> >>> >> >>> >> >>> >> >>> >> ------------------------------------------------------------------------------ >>> >> 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 >>> >> >>> > >>> >>> ------------------------------------------------------------------------------ >>> 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 >> >> >> >> ------------------------------------------------------------------------------ >> 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 >> > |
From: Victhor <vic...@gm...> - 2010-02-06 17:40:50
|
I think that, like the other guy said, you have to configure U-Boot so the port you want to use is assigned to GPIO. Is that port shared with another function? > Victhor, thank you for the great guide. Unfortunately, I have no > /sys/class/gpio/gpioX/direction. All I have in there is power, uevent, > subsystem, and value. What's different between our two systems? > > Kyle Fazzari > > On 2/6/10, Kyle Fazzari <ky...@gm...> wrote: > > Victhor, thank you for the great guide. Unfortunately, I have no > > /sys/class/gpio/gpioX/direction. All I have in there is power, uevent, > > subsystem, and value. What's different between our two systems? > > > > Kyle Fazzari > > > > On 2/6/10, Victhor <vic...@gm...> wrote: > >> The LEDs on the Palo43 are buffered by a 74xx chip, I don't remember the > >> exact model. > >>> On the hardware pin setting you need to set the mux to enable the > >>> output and disable both pull up and pull down. > >>> > >>> Also it would be a good idea to buffer the output from the pin. The > >>> CPU pin drivers are not really designed to drive an LED directly. > >>> > >>> On 2/6/10, cod...@gm... <cod...@gm...> wrote: > >>> > I've been struggling with turning LEDs on and off myself the past few > >>> > days. > >>> > I have LEDs connected to GPIOs 170, 127, and 128. I have all 3 LEDs > >>> > enabled > >>> > in the pin mux configuration of u-boot in the overo.h header. If I > >>> > remember > >>> > correctly, 2 of the GPIOs are pull type up (PTU) and the other one is > >>> > pull > >>> > type down (PTD). I have all 3 pins exported in /sys/class/gpio, and > >>> > can > >>> > echo a 1 or a 0 to each of the pins, and 'cat gpioX/value' returns the > >>> > appropriate number. However, the LEDs do not change at all. One of > >>> > the > >>> > LEDs, I believe GPIO128, is constantly on no matter what I set the > >>> > gpio > >>> > to > >>> > in the filesystem. > >>> > > >>> > What is the appropriate setting for LED pins in the pin mux > >>> > configuration? > >>> > Should they be a certain mode, pull type up/down? > >>> > > >>> > On Sat, Feb 6, 2010 at 6:24 AM, Victhor <vic...@gm...> > >>> > wrote: > >>> > > >>> >> It's rather easy, I didn't even know that it would be like that :) > >>> >> X is the GPIO port number. Just type in those commands and your led > >>> >> should light up :) > >>> >> echo X > /sys/class/gpio/export > >>> >> echo out > /sys/class/gpio/gpioX/direction # This should make the LED > >>> >> light up. At least it does on my Palo43 > >>> >> echo 1 > /sys/class/gpio/gpioX/value # On my Palo43, it turns the LED > >>> >> connected to that port turn off > >>> >> echo 0 > /sys/class/gpio/gpioX/value # Turns it on again > >>> >> If you don't want to use that GPIO port again, use the first command, > >>> >> replacing export with unexport. > >>> >> > Hello all. > >>> >> > > >>> >> > I feel rather stupid. Let me explain: I have an Overo Air, and a > >>> >> > Tobi. > >>> >> > I figured that I'd be able to get some document that says "LED 3 is > >>> >> > tied to port X" or something similar, which would then allow me to > >>> >> > light those LEDs (I have experience writing RTOS's, so I'm used to > >>> >> > a > >>> >> > little lower level than Linux). Of course, I could find no such > >>> >> > document, nor could I find anything on Google to help me with this. > >>> >> > The LEDs are pretty teeny, but it does look like I have a few that > >>> >> > are > >>> >> > not being used. Can someone please explain how I light them? I'm > >>> >> > very > >>> >> > sorry, I feel like this should be easy, but I can't figure it out. > >>> >> > Thank you very much! > >>> >> > > >>> >> > Kyle Fazzari > >>> >> > > >>> >> > > >>> >> ------------------------------------------------------------------------------ > >>> >> > 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 > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> ------------------------------------------------------------------------------ > >>> >> 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 > >>> >> > >>> > > >>> > >>> ------------------------------------------------------------------------------ > >>> 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 > >> > >> > >> > >> ------------------------------------------------------------------------------ > >> 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 > >> > > > > ------------------------------------------------------------------------------ > 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 |
From: <cod...@gm...> - 2010-02-06 18:46:06
|
According to R.P. McMurphy above, "you need to set the mux to enable the output and disable both pull up and pull down." If I understand correctly, this means that in the pin mux settings of git/board/overo/overo.h you need to set the parameters of the appropriate pin mux setting for each LED GPIO pin to the following: MUX(CP(......)) (IDIS | PTU | DIS | M4) /* GPIO_XXX */\ IDIS = input disable (in otherwords, output). PTU = pull type up, but I'm guessing this can also be PTD (pull type down) because the 3rd parameter is DIS = disable pull type up/down, and M4 = mode 4. I have no idea what the modes are. Is this a correct interpretation? Disable input and disable pull type selection -> gives you a GPIO pin that is output and not pulled up or down. Then you can change it to high/low in the filesystem with 'echo (1 or 0) > gpioXXX/value' to change the LED. On Sat, Feb 6, 2010 at 12:23 PM, <gu...@st...> wrote: > Victhor, thank you for the great guide. Unfortunately, I have no > /sys/class/gpio/gpioX/direction. All I have in there is power, uevent, > subsystem, and value. What's different between our two systems? > > Kyle Fazzari > > On 2/6/10, Kyle Fazzari <ky...@gm...> wrote: > > Victhor, thank you for the great guide. Unfortunately, I have no > > /sys/class/gpio/gpioX/direction. All I have in there is power, uevent, > > subsystem, and value. What's different between our two systems? > > > > Kyle Fazzari > > > > On 2/6/10, Victhor <vic...@gm...> wrote: > >> The LEDs on the Palo43 are buffered by a 74xx chip, I don't remember the > >> exact model. > >>> On the hardware pin setting you need to set the mux to enable the > >>> output and disable both pull up and pull down. > >>> > >>> Also it would be a good idea to buffer the output from the pin. The > >>> CPU pin drivers are not really designed to drive an LED directly. > >>> > >>> On 2/6/10, cod...@gm... <cod...@gm...> wrote: > >>> > I've been struggling with turning LEDs on and off myself the past few > >>> > days. > >>> > I have LEDs connected to GPIOs 170, 127, and 128. I have all 3 LEDs > >>> > enabled > >>> > in the pin mux configuration of u-boot in the overo.h header. If I > >>> > remember > >>> > correctly, 2 of the GPIOs are pull type up (PTU) and the other one is > >>> > pull > >>> > type down (PTD). I have all 3 pins exported in /sys/class/gpio, and > >>> > can > >>> > echo a 1 or a 0 to each of the pins, and 'cat gpioX/value' returns > the > >>> > appropriate number. However, the LEDs do not change at all. One of > >>> > the > >>> > LEDs, I believe GPIO128, is constantly on no matter what I set the > >>> > gpio > >>> > to > >>> > in the filesystem. > >>> > > >>> > What is the appropriate setting for LED pins in the pin mux > >>> > configuration? > >>> > Should they be a certain mode, pull type up/down? > >>> > > >>> > On Sat, Feb 6, 2010 at 6:24 AM, Victhor <vic...@gm...> > >>> > wrote: > >>> > > >>> >> It's rather easy, I didn't even know that it would be like that :) > >>> >> X is the GPIO port number. Just type in those commands and your led > >>> >> should light up :) > >>> >> echo X > /sys/class/gpio/export > >>> >> echo out > /sys/class/gpio/gpioX/direction # This should make the > LED > >>> >> light up. At least it does on my Palo43 > >>> >> echo 1 > /sys/class/gpio/gpioX/value # On my Palo43, it turns the > LED > >>> >> connected to that port turn off > >>> >> echo 0 > /sys/class/gpio/gpioX/value # Turns it on again > >>> >> If you don't want to use that GPIO port again, use the first > command, > >>> >> replacing export with unexport. > >>> >> > Hello all. > >>> >> > > >>> >> > I feel rather stupid. Let me explain: I have an Overo Air, and a > >>> >> > Tobi. > >>> >> > I figured that I'd be able to get some document that says "LED 3 > is > >>> >> > tied to port X" or something similar, which would then allow me to > >>> >> > light those LEDs (I have experience writing RTOS's, so I'm used to > >>> >> > a > >>> >> > little lower level than Linux). Of course, I could find no such > >>> >> > document, nor could I find anything on Google to help me with > this. > >>> >> > The LEDs are pretty teeny, but it does look like I have a few that > >>> >> > are > >>> >> > not being used. Can someone please explain how I light them? I'm > >>> >> > very > >>> >> > sorry, I feel like this should be easy, but I can't figure it out. > >>> >> > Thank you very much! > >>> >> > > >>> >> > Kyle Fazzari > >>> >> > > >>> >> > > >>> >> > ------------------------------------------------------------------------------ > >>> >> > 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 > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > ------------------------------------------------------------------------------ > >>> >> 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 > >>> >> > >>> > > >>> > >>> > ------------------------------------------------------------------------------ > >>> 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 > >> > >> > >> > >> > ------------------------------------------------------------------------------ > >> 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 > >> > > > > > ------------------------------------------------------------------------------ > 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 > |
From: Dave H. <dhy...@gm...> - 2010-02-06 17:26:46
|
HI Kyle, On Fri, Feb 5, 2010 at 10:57 PM, <gu...@st...> wrote: > Hello all. > > I feel rather stupid. Let me explain: I have an Overo Air, and a Tobi. > I figured that I'd be able to get some document that says "LED 3 is > tied to port X" or something similar, which would then allow me to > light those LEDs (I have experience writing RTOS's, so I'm used to a > little lower level than Linux). Of course, I could find no such > document, nor could I find anything on Google to help me with this. > The LEDs are pretty teeny, but it does look like I have a few that are > not being used. Can someone please explain how I light them? I'm very > sorry, I feel like this should be easy, but I can't figure it out. > Thank you very much! The document you're looking for is the Tobi schematics. <http://pubs.gumstix.com/boards/TOBI/PCB30002-R2549/> So from the schematics, I'm only seeing the following LEDs: - 2 LEDs in the RJ45 connector for the ethernet jack. These are connected to the ethernet controller - 1 LED which lights up when the console USB plug is inserted. This is powered from the USB bus What other LEDs are you seeing? -- Dave Hylands Shuswap, BC, Canada http://www.DaveHylands.com/ |
From: ScottEllis <sco...@gm...> - 2010-02-06 19:48:36
|
I started some gpio documentation here http://www.jumpnowtek.com/index.php?option=com_content&view=article&id=54&Itemid=60 Still actively working on it so I'd appreciate corrections if you find errors or have something to add. It might help. -- View this message in context: http://old.nabble.com/I-want-to-light-an-LED%21-tp27477568p27482704.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: Jim D. <jd...@wh...> - 2010-02-06 23:31:16
|
Great description of what is going on. I'm using a Verdex Pro, & although I suspect the pins are different I appreciate the insight your article gives. Is there anything like this for the Verdex Pro ScottEllis wrote: > I started some gpio documentation here > > http://www.jumpnowtek.com/index.php?option=com_content&view=article&id=54&Itemid=60 > > Still actively working on it so I'd appreciate corrections if you find > errors or have something to add. > > It might help. > > > |
From: hypo <hyp...@gm...> - 2010-02-08 06:53:53
|
hi, I got GPIO for verdex PRO working by scouring through past emails on this list and through copious help from Dave Hylands and others! :) if the gpio module is not already loaded on your verdex, you can load it by doing: modprobe proc-gpio once this is done, the gpio fs should be available under /proc as /proc/gpio/GPIONN where NN is a number you can access these GPIO lines from user space using the usual file io commands. You can also use the cat command and shell redirection to read, set, respectively, states of the GPIO lines. E.g. to read current status of GPIO31, you'd do cat /proc/gpio/GPIO31 the particular line you select may be set as GPIO or as an "alternate function" (typically denoted "AF", or "AF1" or "AF2", see Gumstix docs for what alternate functions correspond to a given GPIO line). to enable a GPIO line to act as an output, and set it high (3.3v), do echo "GPIO out set" > /proc/gpio/GPIO31 to set it low (0 v), do echo "GPIO out clear" > /proc/gpio/GPIO31 to change it be an input line, do echo "GPIO in" < /proc/gpio/GPIO31 I believe you will need pull-up or pull-down resistors when a line is set as input otherwise the voltage may float and cause unwanted switching. Pay close attention to max sink current thresholds for the gumstix when set as input (1 mA max, IIRC). the pull-up / pull-down will control the "default" input voltage / sink current. Unused, unconnected GPIO lines should be set to output-high to reduce the current consumption. hope this helps, hypo jdoutt wrote: > > Great description of what is going on. I'm using a Verdex Pro, & > although I suspect the pins are different I appreciate the insight your > article gives. Is there anything like this for the Verdex Pro > > ScottEllis wrote: >> I started some gpio documentation here >> >> http://www.jumpnowtek.com/index.php?option=com_content&view=article&id=54&Itemid=60 >> >> Still actively working on it so I'd appreciate corrections if you find >> errors or have something to add. >> >> It might help. >> >> >> > > > ------------------------------------------------------------------------------ > 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 > > -- View this message in context: http://old.nabble.com/I-want-to-light-an-LED%21-tp27477568p27495967.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: Ash C. <ash...@gm...> - 2010-02-10 18:33:42
|
Hi Scott, I've linked an older GPIO page sitting in the userwiki (see: http://gumstix.net/wiki/index.php?title=GPIO) to the main page in the how-tos section. Would you consider adding in a link on this GPIO page to the documentation that you've created or better yet, edit in your information to the page. It would be great to have a solid GPIO page on the wiki :D. Thanks, -Ash On Sat, Feb 6, 2010 at 11:48 AM, ScottEllis <sco...@gm...> wrote: > > I started some gpio documentation here > > http://www.jumpnowtek.com/index.php?option=com_content&view=article&id=54&Itemid=60 > > Still actively working on it so I'd appreciate corrections if you find > errors or have something to add. > > It might help. > > > -- > View this message in context: http://old.nabble.com/I-want-to-light-an-LED%21-tp27477568p27482704.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 > |
From: ScottEllis <sco...@gm...> - 2010-02-10 19:12:42
|
Hi Ash, No problem. I fully planned to copy some or all of it over to the Gumstix wiki once I finished, but I've been working on something else and it slipped. I'll move something over in the next day or so. Best regards, Scott -- View this message in context: http://old.nabble.com/I-want-to-light-an-LED%21-tp27477568p27536459.html Sent from the Gumstix mailing list archive at Nabble.com. |