mraa: update to version 0.8.0
[contrib/mraa.git] / docs / edison.md
1 Intel Edison                            {#edison}
2 =============
3
4 Intel(R) Edison is a dual-core Silvermont Atom(TM) clocked at 500MHz. The
5 Edison also features 4GB of storage, 1GB ram and on-board WiFi and Bluetooth.
6
7 Currently supported boards:
8 - Intel Arduino board
9 - Intel breakout board
10
11 UART
12 ----
13 On both the Arduino board and the breakout board, The available UART interface is on /dev/ttyMFD1
14
15 Intel Arduino board
16 -------------------
17 The Edison used with the Arduino board has the following limitations
18 in libmraa:
19
20 - I2C is exposed on i2c-6, therefore you must use bus 6 and not bus 0
21 - PWM available on default swizzler positions. (3,5,6,9)
22 - SPI exposed is also used for the ADC. Try not to use your own CS.
23 - Max SPI speed is 25Mhz/4 ~6.25Mhz
24 - SPI PM can sometimes do weird things you can disable it with:
25   `echo on > /sys/devices/pci0000\:00/0000\:00\:07.1/power/control`
26 - ADC kernel module will return 16bit number but the ADC itself only has an
27   accuracy of maximum 12bits and in MRAA it's limited to 10bits by default.
28   Use `mraa_aio_set_bit(12)` to switch to the maximum resolution mode.
29   This ADC is only included on the Arduino board.
30 - AIO pins are treated as 0-5 in `mraa_aio_init()` but as 14-19 for everything
31   else. Therefore use `mraa_gpio_init(14)` to use A0 as a GPIO
32 - Arduino pin 7 can sometimes negatively impact the WiFi capability, if using
33   WiFi avoid using this pin
34
35 Because of the way IO is setup with the tristate on the Arduino breakout board
36 IO will be flipped as it is setup. It's recommended to setup IO pins &
37 direction before using them in a `setup()` method or similar. It's impossible on
38 this platform to avoid some GPIOs flipping on setup.
39
40 Intel(R) breakout board
41 -----------------------
42
43 - Both I2C buses are available 1 & 6
44 - IO on the miniboard is 1.8V
45 - Requesting GPIO 4 will break your FTDI UART console, so bear in mind when trying to use it
46
47 Please see the following table on how the physical pins map to mraa pin numbers
48
49 | MRAA Number | Physical Pin | Edison Pin    | Notes                   | Pinmode0 | Pinmode1   | Pinmode2 |
50 |-------------|--------------|---------------|-------------------------|----------|------------|----------|
51 | 0           | J17-1        | GP182         |                         | GPIO-182 | PWM2       |          |
52 | 1           | J17-2        | NC            | Nothing from mraa       |          |            |          |
53 | 2           | J17-3        | NC            | Nothing from mraa       |          |            |          |
54 | 3           | J17-4        | VIN           | Nothing from mraa       |          |            |          |
55 | 4           | J17-5        | GP135         |                         | GPIO-135 | UART       |          |
56 | 5           | J17-6        | RCVR_MODE     | Nothing from mraa       |          |            |          |
57 | 6           | J17-7        | GP27          |                         | GPIO-27  | I2C-6-SCL  |          |
58 | 7           | J17-8        | GP20          |                         | GPIO-20  | I2C-1-SDA  |          |
59 | 8           | J17-9        | GP28          |                         | GPIO-28  | I2C-6-SDA  |          |
60 | 9           | J17-10       | GP111         |                         | GPIO-111 | SPI-5-CS1  |          |
61 | 10          | J17-11       | GP109         |                         | GPIO-109 | SPI-5-SCK  |          |
62 | 11          | J17-12       | GP115         |                         | GPIO-115 | SPI-5-MOSI |          |
63 | 12          | J17-13       | OSC_CLK_OUT_0 | Nothing from mraa/check |          |            |          |
64 | 13          | J17-14       | GP128         |                         | GPIO-128 | UART-1-CTS |          |
65 | 14          | J18-1        | GP13          |                         | GPIO-13  | PWM1       |          |
66 | 15          | J18-2        | GP165         |                         | GPIO-165 |            |          |
67 | 16          | J18-3        | GPI_PWRBTN_N  | Nothing from mraa       |          |            |          |
68 | 17          | J18-4        | MSIC_SLP_CLK2 | Nothing from mraa       |          |            |          |
69 | 18          | J18-5        | V_VBAT_BKUP   | Nothing from mraa       |          |            |          |
70 | 19          | J18-6        | GP19          |                         | GPIO-19  | I2C-1-SCL  |          |
71 | 20          | J18-7        | GP12          | PWM0                    | GPIO-12  | PWM0       |          |
72 | 21          | J18-8        | GP183         | PWM3                    | GPIO-183 | PWM3       |          |
73 | 22          | J18-9        | NC            | Nothing from mraa       |          |            |          |
74 | 23          | J18-10       | GP110         |                         | GPIO-110 | SPI-5-CS0  |          |
75 | 24          | J18-11       | GP114         |                         | GPIO-114 | SPI-5-MISO |          |
76 | 25          | J18-12       | GP129         |                         | GPIO-129 | UART-1-RTS |          |
77 | 26          | J18-13       | GP130         |                         | GPIO-130 | UART-1-RX  |          |
78 | 27          | J18-14       | FW_RCVR       | Nothing from mraa       |          |            |          |
79 | 28          | J19-1        | NC            | Nothing from mraa       |          |            |          |
80 | 29          | J19-2        | V_V1P80       | Nothing from mraa       |          |            |          |
81 | 30          | J19-3        | GND           | Nothing from mraa       |          |            |          |
82 | 31          | J19-4        | GP44          |                         | GPIO-44  |            |          |
83 | 32          | J19-5        | GP46          |                         | GPIO-46  |            |          |
84 | 33          | J19-6        | GP48          |                         | GPIO-48  |            |          |
85 | 34          | J19-7        | RESET_OUT     | Nothing from mraa       |          |            |          |
86 | 35          | J19-8        | GP131         |                         | GPIO-131 | UART-1-TX  |          |
87 | 36          | J19-9        | GP14          |                         | GPIO-14  |            |          |
88 | 37          | J19-10       | GP40          |                         | GPIO-40  | SSP2_CLK   |          |
89 | 38          | J19-11       | GP43          |                         | GPIO-43  | SSP2_TXD   |          |
90 | 39          | J19-12       | GP77          |                         | GPIO-77  | SD         |          |
91 | 40          | J19-13       | GP82          |                         | GPIO-82  | SD         |          |
92 | 41          | J19-14       | GP83          |                         | GPIO-83  | SD         |          |
93 | 42          | J20-1        | V_VSYS        | Nothing from mraa       |          |            |          |
94 | 43          | J20-2        | V_V3P30       | Nothing from mraa       |          |            |          |
95 | 44          | J20-3        | GP134         |                         |          |            |          |
96 | 45          | J20-4        | GP45          |                         | GPIO-45  |            |          |
97 | 46          | J20-5        | GP47          |                         | GPIO-47  |            |          |
98 | 47          | J20-6        | GP49          |                         | GPIO-49  |            |          |
99 | 48          | J20-7        | GP15          |                         | GPIO-15  |            |          |
100 | 49          | J20-8        | GP84          |                         | GPIO-84  | SD         |          |
101 | 50          | J20-9        | GP42          |                         | GPIO-42  | SSP2_RXD   |          |
102 | 51          | J20-10       | GP41          |                         | GPIO-41  | SSP2_FS    |          |
103 | 52          | J20-11       | GP78          |                         | GPIO-78  | SD         |          |
104 | 53          | J20-12       | GP79          |                         | GPIO-79  | SD         |          |
105 | 54          | J20-13       | GP80          |                         | GPIO-80  | SD         |          |
106 | 55          | J20-14       | GP81          |                         | GPIO-81  | SD         |          |