The process of setting up GPIOs directly on the Edison module is similar to the one described on the Intel® Edison Arduino* Expansion Board Hardware Guide on section 11. In fact if you check it out the commands are based on the table 4 of the same document.
If you'd like to configure the GPIOs directly from the module, then you will also have to do all the muxing from Linux just like in the examples on section 11 of the Intel® Edison Arduino* Expansion Board Hardware Guide but this time you will have to base your work on table 5 of the Intel® Edison Compute Module Hardware Guide.
I suggest you to pay close attention to the examples in the Intel® Edison Arduino* Expansion Board Hardware Guide so you can use them as examples when you try to do it on the module.
Thank's, but ... an infinite number of times re-read this document. Is very difficult translate table arduino<->linux<->pin number. Can you give an example code as an answer to my question?
1. Enable alternate function Pin 33 (GP13_PWM1)
2. Set/clear pin 42 (GP15)
3. Pin 25 (GP165) for Input.
echo 13 > /sys/class/gpio/export # Enable GP13 (pin 33)
echo mode1 > /sys/kernel/debug/gpio_debug/gpio13/current_pinmux # Set mode PWM for GP13 (pin 33)
Right? You need to consider GPIO214 ? (http://screencast.com/t/rbcMsewMUe1G )
Wow. Resolved the issue with the led (DS2).
echo 40 > /sys/class/gpio/export # Enable GP40 (USER LED = DS2 = IO13)
echo high > /sys/class/gpio/gpio40/direction # Set output mode (1 = output)
echo mode0 > /sys/kernel/debug/gpio_debug/gpio40/current_pinmux # Enable mode for GP40 (vs I2S or SPI)
echo 0 > /sys/class/gpio/gpio40/value # Set value to 0
echo 1 > /sys/class/gpio/gpio40/value # Set value to 1
But the question remains. See 2015-12-11_1951 - kav-it's library
These lines will be relevant to any board or only Intel Edison Arduino board?
If you are not developing for the Arduino expansion board then I believe that's not the column you should be looking, since that is as you mentioned, specific for the Arduino expansion board. I believe you should be looking at the Linux pins as pointed out in the next picture:
I also suggest you to check the Intel® Edison Arduino* Expansion Board Schematic because you can see which pins are connected directly to the Edison Module. If you do, you’ll notice that those pins are the same as the Linux pins.
So if Intel Edison is used without an Arduino, I need to look at the documentation of the Intel Edison Breakout board, but using SoC modes from documentation of the Intel Edison Arduino board. Get confusing for those who don't need to use Arduino.
Q1: Is there any document in the summary table describes the correspondence of pins of connector and Linux ? For example see image, which I compiled myself from various documents
Q2: How configure Pin 42 (GP15) for input (I take the pin, which is not in the Intel Edison Arduino board for example)?
Q3: What is the "magic" pin214. Where is located? Why it present in the Arduino board, but it is not present in the Breakout board
Actually I only showed that table for illustrative reasons and you can also find that information in the breakout board documentation in table 2 of its Hardware Guide.
1. As I mentioned it is also displayed on table 2 of Intel® Edison Breakout Board Hardware Guide, the second column of the table has all the GPIO Linux numbers available on the Breakout Board.
2. These are the steps you should follow to make GP15 an input on the breakout board:
echo 15 > /sys/class/gpio/export echo in > /sys/class/gpio/gpio15/direction
Then you can read the pins value with:
3. Pin 214 is the buffer used in the Arduino Expansion Board, in fact that's how mraa detects whether you are using the Arduino Expansion Board or the mini breakout board. So if you are not using the Arduino Expansion Board you should not use this pin.