1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards: add esp8266-olimex-mod

This commit is contained in:
Schorcht 2018-09-05 02:39:50 +02:00
parent eca7169696
commit 081a8e8921
9 changed files with 305 additions and 0 deletions

View File

@ -0,0 +1,5 @@
MODULE = board
DIRS = $(RIOTBOARD)/common/esp8266
include $(RIOTBASE)/Makefile.base

View File

@ -0,0 +1 @@
include $(RIOTBOARD)/common/esp8266/Makefile.dep

View File

@ -0,0 +1,3 @@
# Board provides all common peripheral features defined for all ESP8266 boards
include $(RIOTBOARD)/common/esp8266/Makefile.features

View File

@ -0,0 +1,3 @@
USEMODULE += boards_common_esp8266
include $(RIOTBOARD)/common/esp8266/Makefile.include

View File

@ -0,0 +1,72 @@
/**
@defgroup boards_esp8266_olimex-mod Olimex MOD-WIFI-ESP8266-DEV
@ingroup boards_esp8266
@brief Support for the Olimex MOD-WIFI-ESP8266-DEV board.
## Overview
Olimex MOD-WIFI-ESP8266-DEV is a tiny development board that is available as open-source hardware at [GitHub](https://github.com/OLIMEX/ESP8266/tree/master/HARDWARE/MOD-WIFI-ESP8266-DEV). It uses Espressif's ESP8266EX SoC and was originally designed to add WiFi capabilities to existing boards.
Olimex MOD-WIFI-ESP8266-DEV belongs to the class of general purpose boards where all ESP8266EX pins are broken out for easier access. The board can either be soldered directly to a PCB or it can be used with a breadboard.
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Olimex-MOD-DEV.png" "Olimex MOD-WIFI-ESP8266-DEV"<br>
The board provides some pads for an UEXT interface. UEXT interface (introduced by Olimex) can be used to connect different peripherals to the board. This UEXT interface comprises the 3 serial interfaces UART, SPI and I2C. For more information about UEXT, see [UEXT](https://www.olimex.com/Products/Modules/UEXT).
Together with the Olimex ESP8266-EVB evaluation board, a development platform for IoT devices is available.
@image html "https://www.olimex.com/Products/IoT/ESP8266-EVB/images/ESP8266-EVB.jpg" "Olimex ESP8266-EVB"
## Hardware
### MCU
Most features of the board are provided by the ESP8266EX SoC.
<center>
MCU | ESP8266EX
------------|----------------------------
Family | Tensilica Xtensa LX106
Vendor | Espressif
RAM | 80 kByte
Flash | 2 MByte
Frequency | 80 / 160 MHz
FPU | no
Timers | 1 x 32 bit
ADCs | 1 x 10 bit (1 channel)
LEDs | 1 x GPIO1
I2Cs | 2 (software implementation)
SPIs | 1
UARTs | 1 (console)
WiFi | built in
Vcc | 2.5 - 3.6 V
Datasheet | [Datasheet](https://www.espressif.com/sites/default/files/documentation/0a-esp8266ex_datasheet_en.pdf)
Technical Reference | [Technical Reference](https://www.espressif.com/sites/default/files/documentation/esp8266-technical_reference_en.pdf)
Board Schematic | [Board Schematic](https://github.com/OLIMEX/ESP8266/raw/master/HARDWARE/MOD-WIFI-ESP8266-DEV/MOD-WIFI-ESP8266-DEV_schematic.pdf)
</center>
@note For detailed information about ESP8266, see \ref esp8266_riot.
### RIOT Pin Mapping
Olimex MOD-WIFI-ESP8266-DEV has 22 pin holes that can be soldered to PCB or used with a breadboard. The following figure shows the mapping of these pin holes to RIOT pins.
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Olimex-MOD-DEV_pins.png" "Olimex MOD-WIFI-ESP8266-DEV pin mapping"<br>
Since GPIOs 6, 7, 8, and 11 are used for flash memory, they cannot be used for other purposes. Furthermore, when flash mode ```qout``` or ```qio``` is used for flash memory, GPIOs 9 and 10 are used for flash memory additionally and cannot be used for other purposes, see section Flash Modes in \ref esp8266_riot.
## Flashing the Device
To flash the RIOT image, the device must be connected to the host computer through an FTDI USB to Serial adapter/cable connected to the device's UART interface, GPIO1 (TxD) and GPIO3 (RxD) ,
@note Please make sure the FTDI USB to Serial adapter/cable uses 3.3 V.
Once the device is connected to the host computer, it must be booted into UART mode where the firmware can be downloaded via the UART interface. For this purpose, GPIO15 (MTD0) and GPIO0 must be pulled down and GPIO2 must be pulled up while the device is restarted using the RSTB pin. Since GPIO15 (MTDO) is pulled down and GPIO0 as well as GPIO2 are pulled up by solder bridges, only GPIO0 needs to be pulled down while the device is being reset with the RSTB pin.
To flash the RIOT image just type:
```
make flash BOARD=esp8266-olimex-mod ...
```
For detailed information about ESP8266 as well as configuring and compiling RIOT for ESP8266 boards, see \ref esp8266_riot.
*/

View File

@ -0,0 +1,74 @@
/*
* Copyright (C) 2018 Gunar Schorcht
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_esp8266_olimex-mod
* @brief Board specific configuration for the Arduino API
* @file
* @author Gunar Schorcht <gunar@schorcht.net>
* @{
*/
#ifndef ARDUINO_BOARD_H
#define ARDUINO_BOARD_H
#include "periph/gpio.h"
#include "periph/adc.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief The on-board LED is connected to pin 2 on this board
*/
#define ARDUINO_LED (GPIO1)
/**
* @brief Look-up table for the Arduino's digital pins
*/
static const gpio_t arduino_pinmap[] = {
GPIO1, /* ARDUINO_PIN_0 (RxD) */
GPIO3, /* ARDUINO_PIN_1 (TxD) */
GPIO0, /* ARDUINO_PIN_2 */
GPIO4, /* ARDUINO_PIN_3 */
#if defined(FLASH_MODE_QIO) || defined(FLASH_MODE_QOUT)
GPIO9, /* ARDUINO_PIN_4 */
GPIO10, /* ARDUINO_PIN_5 */
#else
GPIO_UNDEF, /* ARDUINO_PIN_4 */
GPIO_UNDEF, /* ARDUINO_PIN_5 */
#endif
GPIO5, /* ARDUINO_PIN_6 */
GPIO_UNDEF, /* ARDUINO_PIN_7 */
GPIO_UNDEF, /* ARDUINO_PIN_8 */
GPIO_UNDEF, /* ARDUINO_PIN_9 */
GPIO15, /* ARDUINO_PIN_10 (CS0) */
GPIO13, /* ARDUINO_PIN_11 (MOSI) */
GPIO12, /* ARDUINO_PIN_12 (MISO) */
GPIO14, /* ARDUINO_PIN_13 (SCK) */
GPIO_UNDEF, /* ARDUINO_PIN_A0 */
GPIO_UNDEF, /* ARDUINO_PIN_A1 */
GPIO_UNDEF, /* ARDUINO_PIN_A2 */
GPIO_UNDEF, /* ARDUINO_PIN_A3 */
GPIO2, /* ARDUINO_PIN_A4 (SDA) */
GPIO14, /* ARDUINO_PIN_A5 (SCL) */
};
/**
* @brief Look-up table for the Arduino's analog pins
*/
static const adc_t arduino_analog_map[] = {
};
#ifdef __cplusplus
}
#endif
#endif /* ARDUINO_BOARD_H */
/** @} */

View File

@ -0,0 +1,49 @@
/*
* Copyright (C) 2018 Gunar Schorcht
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @defgroup boards_esp8266_olimex-mod Olimex MOD-WIFI-ESP8266-DEV
* @ingroup boards_esp8266
*/
/**
* @ingroup boards_esp8266_olimex-mod
* @brief Board specific definitions for
* Olimex MOD-WIFI-ESP8266-DEV boards.
* @file
* @author Gunar Schorcht <gunar@schorcht.net>
* @{
*/
#ifndef BOARD_H
#define BOARD_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name On-board LED configuration and control definitions
* @{
*/
#define LED0_PIN GPIO1 /**< GPIO1 is used as LED Pin */
#define LED0_ACTIVE (0) /**< LED is low active */
/** @} */
#ifdef __cplusplus
} /* end extern "C" */
#endif
/* include common board definitions as last step */
#include "board_common.h"
#endif /* BOARD_H */
/** @} */

View File

@ -0,0 +1,45 @@
/*
* Copyright (C) 2018 Gunar Schorcht
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
#ifndef GPIO_PARAMS_H
#define GPIO_PARAMS_H
/**
* @ingroup boards_esp8266_olimex-mod
* @brief Board specific configuration of direct mapped GPIOs
* @file
* @author Gunar Schorcht <gunar@schorcht.net>
* @{
*/
#include "board.h"
#include "saul/periph.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief LED configuration
*/
static const saul_gpio_params_t saul_gpio_params[] =
{
{
.name = "LED",
.pin = LED0_PIN,
.mode = GPIO_OUT,
.flags = (SAUL_GPIO_INVERTED | SAUL_GPIO_INIT_CLEAR)
}
};
#ifdef __cplusplus
}
#endif
#endif /* GPIO_PARAMS_H */
/** @} */

View File

@ -0,0 +1,53 @@
/*
* Copyright (C) 2018 Gunar Schorcht
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_esp8266_olimex-mod
* @brief Board specific configuration of MCU periphery for
* Olimex MOD-WIFI-ESP8266-DEV boards.
* @file
* @author Gunar Schorcht <gunar@schorcht.net>
* @{
*/
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name I2C configuration
* @{
*/
#ifndef I2C_NUMOF
#define I2C_NUMOF (1) /**< Number of I2C interfaces */
#endif
#ifndef I2C0_SPEED
#define I2C0_SPEED I2C_SPEED_FAST /**< I2C bus speed of I2C_DEV(0) */
#endif
#ifndef I2C0_SDA
#define I2C0_SDA GPIO4 /**< SDA signal of I2C_DEV(0) */
#endif
#ifndef I2C0_SCL
#define I2C0_SCL GPIO5 /**< SCL signal of I2C_DEV(0) */
#endif
/** @} */
#ifdef __cplusplus
} /* end extern "C" */
#endif
/* include common peripheral definitions as last step */
#include "periph_conf_common.h"
#endif /* PERIPH_CONF_H */
/** @} */