GPIO and UART3

103 views
Skip to first unread message

Kristoff Bonne

unread,
Sep 10, 2012, 4:26:33 PM9/10/12
to panda...@googlegroups.com
Hi,

According page 26 and 27 of the pandaboard system reference manual, 4
pins of the UART3 (the DB9 serial connector) should be connected to GPIO
pins 141 up to 144.

However, when I try to control pins 142 andc 144 for output using the
default gpio interstructions I do not get any reactions:
echo "142" >/sys/class/gpio/export
echo "out" >/sys/class/gpio/gpio142/direction

echo "0" >/sys/class/gpio/gpio142/value
echo "1" >/sys/class/gpio/gpio142/value

(same thing with gpio pin 144)

The output of the TX pin or RTS pin does not change. It stays at -5 V.


Has anybody successfully been able to control the UART3 pins with GPIO;
or read data from them?



Cheerio! Kr. Bonne.

ChuckMcM

unread,
Sep 10, 2012, 11:38:23 PM9/10/12
to panda...@googlegroups.com
So you have to tell the GPIO pins what they are supposed to be, the kernel connects them to UART3 so you can't talk to them as GPIO pins, you can configure a kernel without UART3 if you want and then use them for other purposes. Well at least that is what it looks like by reading the code.
--Chuck

Kristoff Bonne

unread,
Sep 11, 2012, 6:47:28 AM9/11/12
to panda...@googlegroups.com
Hi Chuck,


I also noticed that remark about "multiplexing" the GPIO pins but I hadn't found yet how to modify this.


Where in the kernel-code did you find the remark about setting up UART, you mention?



Cheerio! Kr. Bonne.

Kristoff Bonne

unread,
Nov 25, 2012, 8:33:05 AM11/25/12
to panda...@googlegroups.com
Hi All,


For the record (and the mail archive), after some more experimenting, I found out it is possible to use the DB9 RS232 interface (UART3) as GPIO input and output pins.

The trick to do is first configure the OMAP multiplex to set up these ports as attached to gpio_141 up to gpio_144.
I've written a small blogport about it here:
http://villazeebries.krbonne.net/hamstuff/?p=270

The information on how to multiplex these GPIO pins can be found here: (in french)
http://www.blaess.fr/christophe/2012/06/04/gpio-pandaboard-et-temps-reel-5-le-multiplexage-des-gpio/



Chéééééééério!
Kr. Bonne.
Reply all
Reply to author
Forward
0 new messages