mraa  2.0.0
Low Level Skeleton Library for Communication on GNU/Linux platforms
Galileo Gen 2 - Rev H

Galileo is a microcontroller board based on the Intel(R) Quark(TM) SoC X1000 Application Processor, a 32-bit Intel Pentium-class system on a chip.

The Gen 2 board has the following limitations in libmraa:

  title Quark X1000 kernel-MassStorage iot-devkit on SD IMR-On IO-APIC/HPET NoEMU debug
  root (hd0,0)
  kernel /bzImage root=/dev/mmcblk0p2 intel_qrk_plat_galileo_gen2.gpio_cs=1 rootwait console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x8010f000,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5

Uart 1 on gen2

Uart 1 is connected to the FTDI header and the linux console. It's also possible to use it from A2(Rx)/A3(Tx). However mraa does not support this directly so you need to enable the muxing manually. Here is an example of how this is done, this was tested using an FTDI 3.3V TTL cable:

1 $ systemctl stop serial-getty@ttyS1.service
2 $ python
3 >>> # Configure the Muxes for Uart1 on Aio2/3
4 >>> import mraa as m
5 >>> p77 = m.Gpio(77, False, True)
6 >>> p76 = m.Gpio(76, False, True)
7 >>> p16 = m.Gpio(16, False, True)
8 >>> p17 = m.Gpio(17, False, True)
9 >>> p77.write(1)
10 >>> p76.write(1)
11 >>> p16.dir(m.DIR_OUT)
12 >>> p16.write(0)
13 >>> p17.dir(m.DIR_OUT)
14 >>> p17.write(1)
15 
16 >>> # For Rx to work correctly switch the level shifter
17 >>> p34 = m.Gpio(34, False, True)
18 >>> p34.dir(m.DIR_OUT)
19 >>> p34.write(1)
20 
21 >>> # Use the uart
22 >>> x = m.Uart(1)
23 >>> x.setBaudRate(115200)
24 >>> x.writeStr('hello')
25 >>> x.read(5)
26 bytearray(b'dsds\n')