- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are trying to enable serial (ttys0) on digital 0 & 1 on Galileo gen 2 under WR Linux. I can find zero documentation from Intel on how the GPIOs are mapped in Linux (i.e. schematic vs Linux GPIOs). Based on schematic analysis and using the gpio information from the link below, I believe the proper settings to enable serial is:
P0_0, on GPIO Expander 1 must be low (pulled up by default—R63) gpio32
P0_1, on GPIO Expander 1 must be tri-stated (or remove R11) gpio33
GPIO3_R from Quark must be tri-stated, gpio11
P1_4, on GPIO Expander 0, must be set low, gpio28
P1_5, on GPIO Expander 0, must be set tri-state, gpio29
P1_5, on GPIO Expander 1, must be set high, gpio45
The problem we have is that under both Yocto and WR Linux, we get an error when trying to set GPIO11. Can you tell me the proper way to enable serial on dig 0&1? Here is the error we get:
root@WR-IntelligentDevice:~# echo -n "11" > /sys/class/gpio/export
root@WR-IntelligentDevice:~# echo -n "out" > /sys/class/gpio/gpio11/direction
root@WR-IntelligentDevice:~# echo -n "hiz" > /sys/class/gpio/gpio11/drive
-sh: echo: write error: Invalid argument
- Tags:
- Internet of Things
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try libmraa it will then work on both galileo's, edison with & without minibreakout board.
#include "mraa.h" mraa_uart_context uart; uart = mraa_uart_init(0);
See: http://iotdk.intel.com/docs/master/mraa/uart_8h.html & http://iotdk.intel.com/docs/master/mraa/classmraa_1_1_uart.html
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
+1. I need an answer to the same question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since no one else bothered to, I will answer my own question with what I found to work. To enable serial (ttys0) on digital 0 & 1 on Galileo gen 2 under Yocto or Wind River Linux, set the following GPIO settings:
- 32 -> value = 1
- 33 -> value = 1
- 28 -> value = 0
- 29 -> drive = hiz
- 45 -> value = 1
Here's a great primer on configuring Galileo (gen 1) GPIO:
http://www.malinov.com/Home/sergey-s-blog/intelgalileo-programminggpiofromlinux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes , for GPIO related configurations, you can change them in linux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For Edison you can run these commands on terminal to enable the serial port on pins 0 and 1
echo 214 > /sys/class/gpio/export 2>&1
echo high > /sys/class/gpio/gpio214/direction
echo low > /sys/class/gpio/gpio214/direction
echo 131 > /sys/class/gpio/export 2>&1
echo mode1 > /sys/kernel/debug/gpio_debug/gpio131/current_pinmux
echo 249 > /sys/class/gpio/export 2>&1
echo high > /sys/class/gpio/gpio249/direction
echo 1 > /sys/class/gpio/gpio249/value
echo 217 > /sys/class/gpio/export 2>&1
echo high > /sys/class/gpio/gpio217/direction
echo 1 > /sys/class/gpio/gpio217/value
echo out > /sys/class/gpio/gpio131/direction
echo 0 > /sys/class/gpio/gpio131/value
echo 130 > /sys/class/gpio/export 2>&1
echo mode1 > /sys/kernel/debug/gpio_debug/gpio130/current_pinmux
echo 248 > /sys/class/gpio/export 2>&1
echo low > /sys/class/gpio/gpio248/direction
echo 0 > /sys/class/gpio/gpio248/value
echo 216 > /sys/class/gpio/export 2>&1
echo in > /sys/class/gpio/gpio216/direction
echo in > /sys/class/gpio/gpio130/direction
echo high > /sys/class/gpio/gpio214/direction
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try libmraa it will then work on both galileo's, edison with & without minibreakout board.
#include "mraa.h" mraa_uart_context uart; uart = mraa_uart_init(0);
See: http://iotdk.intel.com/docs/master/mraa/uart_8h.html & http://iotdk.intel.com/docs/master/mraa/classmraa_1_1_uart.html
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page