Quantcast

Newbie: Duovero GPIO question

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Newbie: Duovero GPIO question

johnb
Hi,

I've got a duovero on a parlor board. I did the mksdcard.sh thing and got a bootable card that boots fine (if I hold my finger on it) . So I've got a working Sakoman/ yocto kernel on a  microSD. YAY!

I figured I'd try to turn on the parlor led and read the switch, nice and simple you might think.

The Duovero system reference 0.4 tells me that the led is on gpio122.

So I did.
echo 122 > /sys/class/gpio/export
That creates a gpio122 diretcory and associated files ok.

root@omap4-multi:~# echo out>/sys/class/gpio/gpio122/direction
root@omap4-multi:~# cat /sys/class/gpio/gpio122/direction
out
root@omap4-multi:~# cat  /sys/class/gpio/gpio122/value
0
root@omap4-multi:~# echo 1 > /sys/class/gpio/gpio122/value
root@omap4-multi:~# cat  /sys/class/gpio/gpio122/value
1

There's nothing from the led.  

So my question is, what stupid thing am I doing wrong?

Thanks J.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Newbie: Duovero GPIO question

carveone
Hold your finger on it? There was a patch for that problem - don't use
the Sakoman images, they are out of date. I would use the updated
images from the gumstix website itself:

http://gumstix.org/download-prebuilt-images.html

Nothing prevents you using the mksdcard.sh script for local images
(there's a command line parameter. Like local or something....)

I tried the LED too, exactly the same procedure as you, and didn't get
anywhere either... Not sure that the LED is on the board - can't see
it at least. I'll check the PCB overlay in Eagle.

Conor.

On Fri, Sep 20, 2013 at 3:59 PM, johnb <[hidden email]> wrote:

> Hi,
>
> I've got a duovero on a parlor board. I did the mksdcard.sh thing and got a
> bootable card that boots fine (if I hold my finger on it) . So I've got a
> working Sakoman/ yocto kernel on a  microSD. YAY!
>
> I figured I'd try to turn on the parlor led and read the switch, nice and
> simple you might think.
>
> The Duovero system reference 0.4 tells me that the led is on gpio122.
>
> So I did.
> echo 122 > /sys/class/gpio/export
> That creates a gpio122 diretcory and associated files ok.
>
> root@omap4-multi:~# echo out>/sys/class/gpio/gpio122/direction
> root@omap4-multi:~# cat /sys/class/gpio/gpio122/direction
> out
> root@omap4-multi:~# cat  /sys/class/gpio/gpio122/value
> 0
> root@omap4-multi:~# echo 1 > /sys/class/gpio/gpio122/value
> root@omap4-multi:~# cat  /sys/class/gpio/gpio122/value
> 1
>
> There's nothing from the led.
>
> So my question is, what stupid thing am I doing wrong?
>
> Thanks J.
>
>
>
>
>
> --
> View this message in context: http://gumstix.8.x6.nabble.com/Newbie-Duovero-GPIO-question-tp4967968.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Newbie: Duovero GPIO question

carveone
> I tried the LED too, exactly the same procedure as you, and didn't get
> anywhere either... Not sure that the LED is on the board - can't see
> it at least. I'll check the PCB overlay in Eagle.
>
> Conor.

The blue diode is on the edge of the board, beside the HDMI connector.
Not that you wouldn't notice it if it, like, went on...!

Conor.

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Newbie: Duovero GPIO question

Philipp Lutz
In reply to this post by johnb
The problem is that that the corresponding OMAP pin is not set to the correct pinmuxing mode.
According to the padconf section in the OMAP4 technical reference manual you can find out about the other possible modes and finally find that the alternative name for this pin is "abe_dmic_din3".
Btw. this is also possible by searching for "gpio_122" in the board pinmuxing configuration stored here: /sys/kernel/debug/omap_mux/board/core (every pin which can be configured as gpio has a hint about that).

So now just check which is the current pinmuxing configuration for this pin by:
$ cat /sys/kernel/debug/omap_mux/abe_dmic_din3
name: abe_dmic_din3.abe_dmic_din3 (0x4a100116/0x116 = 0x0100), b ah24, t NA
mode: OMAP_PIN_INPUT | OMAP_MUX_MODE0
signals: abe_dmic_din3 | slimbus2_data | abe_dmic_clk2 | gpio_122 | NA | dmtimer9_pwm_evt | NA | safe_mode
As the output suggests, the pin is configured in MODE0, this is 'abe_dmic_din3'.
You only have to set the mode to 3 by:
$ echo 3 > /sys/kernel/debug/omap_mux/abe_dmic_din3
And here you go, now you can continue using your gpio configuration via the debugfs interface (/sys/class/gpio/).
Hope that helps! At least that worked for me.

Cheers
Phil


-------- Original Message --------
Subject: [Gumstix-users] Newbie: Duovero GPIO question
From: johnb [hidden email]
To: [hidden email]
Date: 09/20/2013 04:59 PM
Hi,

I've got a duovero on a parlor board. I did the mksdcard.sh thing and got a
bootable card that boots fine (if I hold my finger on it) . So I've got a
working Sakoman/ yocto kernel on a  microSD. YAY!

I figured I'd try to turn on the parlor led and read the switch, nice and
simple you might think.

The Duovero system reference 0.4 tells me that the led is on gpio122.

So I did.
echo 122 > /sys/class/gpio/export
That creates a gpio122 diretcory and associated files ok.

root@omap4-multi:~# echo out>/sys/class/gpio/gpio122/direction
root@omap4-multi:~# cat /sys/class/gpio/gpio122/direction
out
root@omap4-multi:~# cat  /sys/class/gpio/gpio122/value
0
root@omap4-multi:~# echo 1 > /sys/class/gpio/gpio122/value
root@omap4-multi:~# cat  /sys/class/gpio/gpio122/value
1

There's nothing from the led.  

So my question is, what stupid thing am I doing wrong?

Thanks J.





------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Newbie: Duovero GPIO question

carveone
I figured as much but wasn't sure what to change - it would normally
be a kernel recompile (at least it was for me previously). That's very
very useful to know that you can check the pinmuxes in
/sys/kernel/debug just like that - *and* it tells you what the
functions are. Almost magic that you can change them! Thanks so much
for that!

As as aside, I needed to change a pinmux from McAsp to GPIO on an ARM
board but the startup code had nabbed it for audio and was using it so
that did indeed require some edits and a kernel rebuild. It's probably
a bad plan to go around changing pinmuxes without checking who owns
them!

Thanks,

Conor.

On Fri, Sep 20, 2013 at 5:00 PM, Philipp Lutz <[hidden email]> wrote:

> The problem is that that the corresponding OMAP pin is not set to the
> correct pinmuxing mode.
> According to the padconf section in the OMAP4 technical reference manual you
> can find out about the other possible modes and finally find that the
> alternative name for this pin is "abe_dmic_din3".
> Btw. this is also possible by searching for "gpio_122" in the board
> pinmuxing configuration stored here: /sys/kernel/debug/omap_mux/board/core
> (every pin which can be configured as gpio has a hint about that).
>
> So now just check which is the current pinmuxing configuration for this pin
> by:
>
> $ cat /sys/kernel/debug/omap_mux/abe_dmic_din3
> name: abe_dmic_din3.abe_dmic_din3 (0x4a100116/0x116 = 0x0100), b ah24, t NA
> mode: OMAP_PIN_INPUT | OMAP_MUX_MODE0
> signals: abe_dmic_din3 | slimbus2_data | abe_dmic_clk2 | gpio_122 | NA |
> dmtimer9_pwm_evt | NA | safe_mode
>
> As the output suggests, the pin is configured in MODE0, this is
> 'abe_dmic_din3'.
> You only have to set the mode to 3 by:
>
> $ echo 3 > /sys/kernel/debug/omap_mux/abe_dmic_din3
>
> And here you go, now you can continue using your gpio configuration via the
> debugfs interface (/sys/class/gpio/).
> Hope that helps! At least that worked for me.
>
> Cheers
> Phil
>
>
>
> -------- Original Message --------
> Subject: [Gumstix-users] Newbie: Duovero GPIO question
> From: johnb <[hidden email]>
> To: [hidden email]
> Date: 09/20/2013 04:59 PM
>
> Hi,
>
> I've got a duovero on a parlor board. I did the mksdcard.sh thing and got a
> bootable card that boots fine (if I hold my finger on it) . So I've got a
> working Sakoman/ yocto kernel on a  microSD. YAY!
>
> I figured I'd try to turn on the parlor led and read the switch, nice and
> simple you might think.
>
> The Duovero system reference 0.4 tells me that the led is on gpio122.
>
> So I did.
> echo 122 > /sys/class/gpio/export
> That creates a gpio122 diretcory and associated files ok.
>
> root@omap4-multi:~# echo out>/sys/class/gpio/gpio122/direction
> root@omap4-multi:~# cat /sys/class/gpio/gpio122/direction
> out
> root@omap4-multi:~# cat  /sys/class/gpio/gpio122/value
> 0
> root@omap4-multi:~# echo 1 > /sys/class/gpio/gpio122/value
> root@omap4-multi:~# cat  /sys/class/gpio/gpio122/value
> 1
>
> There's nothing from the led.
>
> So my question is, what stupid thing am I doing wrong?
>
> Thanks J.
>
>
>
>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Newbie: Duovero GPIO question

johnb
In reply to this post by Philipp Lutz
Hi,
Many thanks. I now have a nice shining blue led.

The muxing info is dead useful, there's everything in that core file :-)

I'll get the patched kernel too and rest my finger.

All the best, J.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Newbie: Duovero GPIO question

Steve Sakoman
In reply to this post by carveone
> don't use
> the Sakoman images, they are out of date

Indeed they are!  I haven't done any overo/duovero projects since last
year, so I haven't maintained them.

I've changed the name of the directory that holds them from feeds to
obsolete-feeds to make it obvious that they are old!

Steve

On Fri, Sep 20, 2013 at 8:40 AM, Conor O'Rourke
<[hidden email]> wrote:

> Hold your finger on it? There was a patch for that problem - don't use
> the Sakoman images, they are out of date. I would use the updated
> images from the gumstix website itself:
>
> http://gumstix.org/download-prebuilt-images.html
>
> Nothing prevents you using the mksdcard.sh script for local images
> (there's a command line parameter. Like local or something....)
>
> I tried the LED too, exactly the same procedure as you, and didn't get
> anywhere either... Not sure that the LED is on the board - can't see
> it at least. I'll check the PCB overlay in Eagle.
>
> Conor.
>
> On Fri, Sep 20, 2013 at 3:59 PM, johnb <[hidden email]> wrote:
>> Hi,
>>
>> I've got a duovero on a parlor board. I did the mksdcard.sh thing and got a
>> bootable card that boots fine (if I hold my finger on it) . So I've got a
>> working Sakoman/ yocto kernel on a  microSD. YAY!
>>
>> I figured I'd try to turn on the parlor led and read the switch, nice and
>> simple you might think.
>>
>> The Duovero system reference 0.4 tells me that the led is on gpio122.
>>
>> So I did.
>> echo 122 > /sys/class/gpio/export
>> That creates a gpio122 diretcory and associated files ok.
>>
>> root@omap4-multi:~# echo out>/sys/class/gpio/gpio122/direction
>> root@omap4-multi:~# cat /sys/class/gpio/gpio122/direction
>> out
>> root@omap4-multi:~# cat  /sys/class/gpio/gpio122/value
>> 0
>> root@omap4-multi:~# echo 1 > /sys/class/gpio/gpio122/value
>> root@omap4-multi:~# cat  /sys/class/gpio/gpio122/value
>> 1
>>
>> There's nothing from the led.
>>
>> So my question is, what stupid thing am I doing wrong?
>>
>> Thanks J.
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://gumstix.8.x6.nabble.com/Newbie-Duovero-GPIO-question-tp4967968.html
>> Sent from the Gumstix mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------------------------------
>> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
>> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
>> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
>> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
>> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
>> _______________________________________________
>> gumstix-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Loading...