Showing results for 
Search instead for 
Did you mean: 

Programming Intel Galileo Gen2 board using Yocto linux


I am doing a project with Intel Galileo Gen2 in which I need to program it using yocto linux. I have to send commands to PIC microcontroller from the Intel Galileo for lighting on a LED. I am using the pins

# define Strobe (40) // 8 of arudino shield

# define GP_4 (48) // A0

# define GP_5 (50) // A1

# define GP_6 (52) // A2

# define GP_7 (54) // A3

I have written my c programs for both the galileo board and PIC controller. I have attached them in this post. But I am not knowing how to set the

Pin configuration options for Galileo Gen 2. I am referring to the link but I am highly confused. Because before this task I tried to simple on board led on off. For that I had to configure multiple gpio pins in linux , say gpio7,gpio30,gpio31,gpio 46. What is the significance of Level Shifter gpio,Pull Up gpio, Pin Mux1 gpio,Pin Mux 2 gpio.

If I have to configure IO14 i.e A0 pin for communication with PIC which all gpio pins have to be configured?

Can any one please explain me this with a small illustration?

Thank you in advance.



0 Kudos
1 Reply
Community Manager

Hi Poornima,



Thanks for reaching out.



According to the Pin configuration options for Galileo Gen2, for example in the case of the shield pin IO14, which has the following functions GPIO48 or in_voltage0_raw; only has associated the GPIO49 to control the 22k pull-up GPIO resistor, so you can



# echo 49 > /sys/class/gpio/export


# echo in > /sys/class/gpio/gpio49/direction



Now you should be able to read the analog value from:


# cat /sys/bus/iio/devices/iio\:device0/in_voltage0_raw



Another example, the shield pin IO19 has the following functions GPIO 58, in_voltage5_raw (A5), or i2c_0. In order to use it as an analog input you can try these configuration:



# echo 59 > /sys/class/gpio/export


# echo 60 > /sys/class/gpio/export


# echo 79 > /sys/class/gpio/export


# echo in > /sys/class/gpio/gpio59/direction


# echo high > /sys/class/gpio/gpio60/direction


# echo low > /sys/class/gpio/gpio79/direction



Now you should be able to read the analog value from:


# cat /sys/bus/iio/devices/iio\:device0/in_voltage5_raw



Hope this information helps.





-Yermi A.


0 Kudos