mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #16985 from gschorcht/cpu/esp/fix_doc
cpu/esp8266, boards/*esp*: fix documentation
This commit is contained in:
commit
696598ff9e
@ -18,7 +18,8 @@
|
||||
* This file contains the default configurations for those external hardware
|
||||
* modules that have been tested with the ESP8266 and are preconfigured here.
|
||||
* Most of these configurations can be overridden by an
|
||||
* \ref esp8266_app_spec_conf "application-specific configuration".
|
||||
* \ref esp8266_application_specific_board_configuration
|
||||
* "application-specific configuration".
|
||||
*
|
||||
* The configurations of the respective hardware modules only take place if
|
||||
* the corresponding driver modules are used.
|
||||
@ -41,9 +42,8 @@ extern "C" {
|
||||
* Configuration for the ENC28J60 interface when module ```enc28j60``` is used.
|
||||
*
|
||||
* SPI_DEV(0) is always used for the the module. The only configurations that
|
||||
* can be overridden by
|
||||
* \ref esp8266_app_spec_conf "Application Specific Board Configuration"
|
||||
* are the CS, INT and RESET signals.
|
||||
* can be overridden by \ref esp8266_application_specific_board_configuration
|
||||
* "Application Specific Board Configuration" are the CS, INT and RESET signals.
|
||||
*
|
||||
* @note The RESET signal can also be connected to the ESP8266 RST pin to
|
||||
* keep an additional GPIO free.
|
||||
@ -71,9 +71,8 @@ extern "C" {
|
||||
* Configuration for the MRF24J40 interface when module ```mrf24j40``` is used.
|
||||
*
|
||||
* SPI_DEV(0) is always used for the the module. The only configurations that
|
||||
* can be overridden by
|
||||
* \ref esp8266_app_spec_conf "Application Specific Board Configuration"
|
||||
* are the CS, INT and RESET signals.
|
||||
* can be overridden by \ref esp8266_application_specific_board_configuration
|
||||
* "Application Specific Board Configuration" are the CS, INT and RESET signals.
|
||||
*
|
||||
* @note The RESET signal can also be connected to the ESP8266 RST pin to
|
||||
* keep an additional GPIO free.
|
||||
@ -104,7 +103,8 @@ extern "C" {
|
||||
*
|
||||
* The SPI interface with the corresponding pins used for the SD-Card
|
||||
* interface is fixed. SPI_DEV(0) is always used for the SD-Card. The only
|
||||
* configuration that can be overridden by \ref esp8266_app_spec_conf
|
||||
* configuration that can be overridden by
|
||||
* \ref esp8266_application_specific_board_configuration
|
||||
* "Application Specific Board Configuration" is the CS signal.
|
||||
* If not defined, the default CS signal of SPI_DEV(0) is used.
|
||||
* @{
|
||||
|
@ -8,21 +8,23 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup boards_esp32_esp-ethernet-kit-v1_0 v1.0 Board
|
||||
* @defgroup boards_esp32_esp-ethernet-kit-v1_0 ESP32-Ethernet-Kit V1.0 Board
|
||||
* @ingroup boards_esp32_esp-ethernet-kit
|
||||
* @brief Support for for Espressif ESP32-Ethernet-Kit v1.0
|
||||
* @author Gunar Schorcht <gunar@schorcht.net>
|
||||
* @author Erik Ekman <eekman@google.com>
|
||||
|
||||
## <a name="toc"> Table of Contents </a>
|
||||
\section esp32-ethernet-kit-v1_0 Espressif ESP32-Ethernet-Kit V1.0
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Hardware](#hardware)
|
||||
1. [Board Configuration](#board_configuration)
|
||||
2. [Board Pinout](#pinout)
|
||||
3. [Other Documentation Resources](#other-resources)
|
||||
## Table of Contents {#esp32_ethernet_kit_v1_0_toc}
|
||||
|
||||
## <a name="overview"> Overview </a> [[TOC](#toc)]
|
||||
1. [Overview](#esp32_ethernet_kit_v1_0_overview)
|
||||
2. [Hardware](#esp32_ethernet_kit_v1_0_hardware)
|
||||
1. [Board Configuration](#esp32_ethernet_kit_v1_0_board_configuration)
|
||||
2. [Board Pinout](#esp32_ethernet_kit_v1_0_pinout)
|
||||
3. [Other Documentation Resources](#esp32_ethernet_kit_v1_0_other-resources)
|
||||
|
||||
## Overview {#esp32_ethernet_kit_v1_0_overview}
|
||||
|
||||
The Espressif [ESP32-Ethernet-Kit](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-ethernet-kit-v1.0.html) is a development board that uses the ESP32-WROVER-B module. Most important features of the board are
|
||||
|
||||
@ -32,14 +34,20 @@ The Espressif [ESP32-Ethernet-Kit](https://docs.espressif.com/projects/esp-idf/e
|
||||
Furthermore, some GPIOs are broken out for extension. The USB bridge based on FDI FT2232HL provides a JTAG interface for OCD debugging through the USB interface.
|
||||
For flashing and debugging the board, see \ref boards_esp32_esp-ethernet-kit common board documentation.
|
||||
|
||||
## <a name="hardware"> Hardware </a> [[TOC](#toc)]
|
||||
@image html "https://docs.espressif.com/projects/esp-idf/en/latest/esp32/_images/esp32-ethernet-kit-v1.0.png" "ESP32-Ethernet-Kit V1.0" width=500
|
||||
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_0_toc)
|
||||
|
||||
## Hardware {#esp32_ethernet_kit_v1_0_hardware}
|
||||
|
||||
This section describes
|
||||
|
||||
- the default [board configuration](#board_configuration),
|
||||
- the [board pinout](#pinout).
|
||||
- the default [board configuration](#esp32_ethernet_kit_v1_0_board_configuration),
|
||||
- the [board pinout](#esp32_ethernet_kit_v1_0_pinout).
|
||||
|
||||
### <a name="board_configuration"> Board Configuration </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_0_toc)
|
||||
|
||||
### Board Configuration {#esp32_ethernet_kit_v1_0_board_configuration}
|
||||
|
||||
ESP32-Ethernet-Kit v1.0 has the following on-board components
|
||||
|
||||
@ -53,7 +61,6 @@ section Peripherals in \ref esp32_riot.
|
||||
Only a few GPIOs are broken out and available for external hardware on ESP32-Ethernet-Kit boards. Which GPIOs are available as peripherals depends on used modules.
|
||||
|
||||
<center>
|
||||
\anchor esp32_ethernet_kit_v1_0_table_board_configuration
|
||||
Function | GPIOs | Remarks |Configuration
|
||||
:---------------|:-------|:--------|:----------------------------------
|
||||
BTN0 | GPIO0 | not available if `esp_eth` is used | |
|
||||
@ -69,20 +76,30 @@ SPI_DEV(0):CS0 | GPIO15 | HSPI is used | \ref esp32_spi_interfaces "SPI Interf
|
||||
UART_DEV(0):TxD | GPIO1 | Console (configuration is fixed) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
UART_DEV(0):RxD | GPIO3 | Console (configuration is fixed) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
</center>
|
||||
|
||||
\n
|
||||
@note
|
||||
- GPIO4 only works properly on the board if the function switch for GPIO4 (DIP SW 5) is OFF.
|
||||
- SPI_DEV(0) is not available if module `esp_jtag` is used. For the SPI_DEV(0) pins to work properly, the function switches (DIP switches) for the JTAG signals must be set to OFF.
|
||||
- GPIO4 only works properly on the board if the function switch
|
||||
for GPIO4 (DIP SW 5) is OFF.
|
||||
- SPI_DEV(0) is not available if module `esp_jtag` is used. For the
|
||||
SPI_DEV(0) pins to work properly, the function switches (DIP switches)
|
||||
for the JTAG signals must be set to OFF.
|
||||
|
||||
### <a name="pinout"> Board Pinout </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_0_toc)
|
||||
|
||||
### Board Pinout {#esp32_ethernet_kit_v1_0_pinout}
|
||||
|
||||
The board schematic can be found [here](https://dl.espressif.com/dl/schematics/SCH_ESP32-ETHERNET-KIT_A_V1.0_20190517.pdf).
|
||||
|
||||
By default, only 3 bidirectional GPIO pins are unused: GPIO4, GPIO32, GPIO33. The suggested configuration is for PWM
|
||||
and I2C, but they can also be used for SPI or another serial port. By disabling the JTAG interface on the board,
|
||||
By default, only 3 bidirectional GPIO pins are unused: GPIO4, GPIO32, GPIO33.
|
||||
The suggested configuration is for PWM and I2C, but they can also be used
|
||||
for SPI or another serial port. By disabling the JTAG interface on the board,
|
||||
another 4 GPIOs can be made available (GPIO12, GPIO13, GPIO14, GPIO15).
|
||||
|
||||
## <a name="other-resources"> Other Documentation Resources </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_0_toc)
|
||||
|
||||
## Other Documentation Resources {#esp32_ethernet_kit_v1_0_other-resources}
|
||||
|
||||
There is a comprehensive [Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-ethernet-kit-v1.0.html) for the ESP32-Ethernet-Kit with a lot information about hardware configuration.
|
||||
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_0_toc)
|
||||
*/
|
||||
|
@ -14,16 +14,18 @@
|
||||
* @author Gunar Schorcht <gunar@schorcht.net>
|
||||
* @author Erik Ekman <eekman@google.com>
|
||||
|
||||
## <a name="toc"> Table of Contents </a>
|
||||
\section esp32_ethernet_kit Espressif ESP32-Ethernet-Kit
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Hardware](#hardware)
|
||||
1. [MCU](#mcu)
|
||||
2. [Board Configuration](#common_board_configuration)
|
||||
3. [Flashing the Device](#flashing)
|
||||
4. [On-Chip Debugging with the device](#debugging)
|
||||
## Table of Contents {#esp32_ethernet_kit_toc}
|
||||
|
||||
## <a name="overview"> Overview </a> [[TOC](#toc)]
|
||||
1. [Overview](#esp32_ethernet_kit_overview)
|
||||
2. [Hardware](#esp32_ethernet_kit_hardware)
|
||||
1. [MCU](#esp32_ethernet_kit_mcu)
|
||||
2. [Board Configuration](#esp32_ethernet_kit_board_configuration)
|
||||
3. [Flashing the Device](#esp32_ethernet_kit_flashing)
|
||||
4. [On-Chip Debugging with the device](#esp32_ethernet_kit_debugging)
|
||||
|
||||
## Overview {#esp32_ethernet_kit_overview}
|
||||
|
||||
The Espressif [ESP32-Ethernet-Kit](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-ethernet-kit.html) is a development board that uses a ESP32-WROVER module (-B or -E depending on version). Most important features of the board are
|
||||
|
||||
@ -32,24 +34,32 @@ The Espressif [ESP32-Ethernet-Kit](https://docs.espressif.com/projects/esp-idf/e
|
||||
|
||||
Furthermore, some GPIOs are broken out for extension. The USB bridge based on FDI FT2232HL provides a JTAG interface for OCD debugging through the USB interface.
|
||||
|
||||
@image html "https://docs.espressif.com/projects/esp-idf/en/latest/esp32/_images/esp32-ethernet-kit-v1.2-overview.png" "ESP32-Ethernet-Kit" width=500
|
||||
|
||||
There are different revisions of the board:
|
||||
- \ref boards_esp32_esp-ethernet-kit-v1_0
|
||||
- \ref boards_esp32_esp-ethernet-kit-v1_1
|
||||
- \ref boards_esp32_esp-ethernet-kit-v1_2
|
||||
|
||||
## <a name="hardware"> Hardware </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ethernet_kit_toc)
|
||||
|
||||
## Hardware {#esp32_ethernet_kit_hardware}
|
||||
|
||||
This section describes
|
||||
|
||||
- the [MCU](#mcu),
|
||||
- the default [board configuration](#common_board_configuration).
|
||||
- the [MCU](#esp32_ethernet_kit_mcu),
|
||||
- the default [board configuration](#esp32_ethernet_kit_board_configuration).
|
||||
|
||||
### <a name="mcu"> MCU </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ethernet_kit_toc)
|
||||
|
||||
### MCU {#esp32_ethernet_kit_mcu}
|
||||
|
||||
Most features of the board are provided by the ESP32 SoC. For detailed
|
||||
information about the ESP32, see section \ref esp32_mcu_esp32 "MCU ESP32".
|
||||
|
||||
### <a name="common_board_configuration"> Board Configuration </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ethernet_kit_toc)
|
||||
|
||||
### Board Configuration {#esp32_ethernet_kit_board_configuration}
|
||||
|
||||
ESP32-Ethernet-Kit has the following on-board components
|
||||
|
||||
@ -61,33 +71,40 @@ section Peripherals in \ref esp32_riot.
|
||||
|
||||
The board is available in different versions. See the per-version file for details.
|
||||
|
||||
## <a name="flashing"> Flashing the Device </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ethernet_kit_toc)
|
||||
|
||||
## Flashing the Device {#esp32_ethernet_kit_flashing}
|
||||
|
||||
Flashing RIOT is quite straight forward. The board has a Micro-USB connector with reset/boot/flash logic. Just connect the board using the programming port to your host computer and type:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make flash BOARD=esp32-ethernet-kit-v1_X ...
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
where `X` is the minor revision number of the board.
|
||||
|
||||
The USB bridge is based on FDI FT2232HL and offers two USB interfaces:
|
||||
|
||||
- the first interface is the JTAG interface for [On-Chip debugging](#debugging)
|
||||
- the first interface is the JTAG interface for [On-Chip debugging](#esp32_ethernet_kit_debugging)
|
||||
- the second interface is the console interface, which is also used for flashing
|
||||
|
||||
Therefore, it might be necessary have to declare the USB interface in the make command. For example, if the ESP32-Ethernet-Kit is connected to the host computer through the USB interfaces `/dev/ttyUSB0` and `/dev/ttyUSB1`, the make command would be used as following:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make flash BOARD=esp32-ethernet-kit-v1_X PORT=/dev/ttyUSB1 ...
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Please note that `/dev/ttyUSB1` is used as the console port by default. Therefore the variable `PORT` only needs to be defined if the console port is another port.
|
||||
|
||||
For detailed information about ESP32 as well as configuring and compiling RIOT for ESP32 boards, see \ref esp32_riot.
|
||||
|
||||
## <a name="debugging"> On-Chip Debugging with the Device </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ethernet_kit_toc)
|
||||
|
||||
## On-Chip Debugging with the Device {#esp32_ethernet_kit_debugging}
|
||||
|
||||
Since the USB bridge based on FDI FT2232HL provides a JTAG interface for debugging through an USB interface, using ESP32-Ethernet-Kit is the easiest and most convenient way for On-Chip debugging. Please refer the [ESP-IDF Programming Guide](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/jtag-debugging/index.html) for details on how to setup and how to use ESP32-Ethernet-Kit and OpenOCD.
|
||||
|
||||
To use the JTAG interface, the `esp_jtag` module must be used to disable the `SPI_DEV(0)` which normally uses the GPIOs for the JTAG signals.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE=esp_jtag make flash BOARD=esp32-ethernet-kit-v1_X ...
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Furthermore the function switches (DIP switches) for the JTAG signals must be set to ON.
|
||||
|
||||
[Back to table of contents](#esp32_ethernet_kit_toc)
|
||||
*/
|
||||
|
@ -8,21 +8,23 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup boards_esp32_esp-ethernet-kit-v1_1 v1.1 Board
|
||||
* @defgroup boards_esp32_esp-ethernet-kit-v1_1 ESP32-Ethernet-Kit V1.1 Board
|
||||
* @ingroup boards_esp32_esp-ethernet-kit
|
||||
* @brief Support for for Espressif ESP32-Ethernet-Kit v1.1
|
||||
* @author Gunar Schorcht <gunar@schorcht.net>
|
||||
* @author Erik Ekman <eekman@google.com>
|
||||
|
||||
## <a name="toc"> Table of Contents </a>
|
||||
\section esp32_esp-ethernet-kit-v1_1 Espressif ESP32-Ethernet-Kit V1.1
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Hardware](#hardware)
|
||||
1. [Board Configuration](#board_configuration)
|
||||
2. [Board Pinout](#pinout)
|
||||
3. [Other Documentation Resources](#other-resources)
|
||||
## Table of Contents {#esp32_esp-ethernet-kit-v1_1_toc}
|
||||
|
||||
## <a name="overview"> Overview </a> [[TOC](#toc)]
|
||||
1. [Overview](#esp32_ethernet_kit_v1_1_overview)
|
||||
2. [Hardware](#esp32_ethernet_kit_v1_1_hardware)
|
||||
1. [Board Configuration](#esp32_ethernet_kit_v1_1_board_configuration)
|
||||
2. [Board Pinout](#esp32_ethernet_kit_v1_1_pinout)
|
||||
3. [Other Documentation Resources](#esp32_ethernet_kit_v1_1_other-resources)
|
||||
|
||||
## Overview {#esp32_esp-ethernet-kit-v1_1_overview}
|
||||
|
||||
The Espressif [ESP32-Ethernet-Kit](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-ethernet-kit-v1.1.html) is a development board that uses the ESP32-WROVER-B module. Most important features of the board are
|
||||
|
||||
@ -32,14 +34,20 @@ The Espressif [ESP32-Ethernet-Kit](https://docs.espressif.com/projects/esp-idf/e
|
||||
Furthermore, some GPIOs are broken out for extension. The USB bridge based on FDI FT2232HL provides a JTAG interface for OCD debugging through the USB interface.
|
||||
For flashing and debugging the board, see \ref boards_esp32_esp-ethernet-kit common board documentation.
|
||||
|
||||
## <a name="hardware"> Hardware </a> [[TOC](#toc)]
|
||||
@image html "https://docs.espressif.com/projects/esp-idf/en/latest/esp32/_images/esp32-ethernet-kit-v1.1.png" "ESP32-Ethernet-Kit V1.1" width=500
|
||||
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_1_toc)
|
||||
|
||||
## Hardware {#esp32_esp-ethernet-kit-v1_1_hardware}
|
||||
|
||||
This section describes
|
||||
|
||||
- the default [board configuration](#board_configuration),
|
||||
- the [board pinout](#pinout).
|
||||
- the default [board configuration](#esp32_ethernet_kit_v1_1_board_configuration),
|
||||
- the [board pinout](#esp32_ethernet_kit_v1_1_pinout).
|
||||
|
||||
### <a name="board_configuration"> Board Configuration </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_1_toc)
|
||||
|
||||
### Board Configuration {#esp32_esp-ethernet-kit-v1_1_board_configuration}
|
||||
|
||||
ESP32-Ethernet-Kit v1.1 has the following on-board components
|
||||
|
||||
@ -53,7 +61,6 @@ section Peripherals in \ref esp32_riot.
|
||||
Only a few GPIOs are broken out and available for external hardware on ESP32-Ethernet-Kit boards. Which GPIOs are available as peripherals depends on used modules.
|
||||
|
||||
<center>
|
||||
\anchor esp32_ethernet_kit_v1_1_table_board_configuration
|
||||
Function | GPIOs | Remarks |Configuration
|
||||
:---------------|:-------|:--------|:----------------------------------
|
||||
BTN0 | GPIO0 | not available if `esp_eth` is used | |
|
||||
@ -69,11 +76,13 @@ SPI_DEV(0):CS0 | GPIO15 | HSPI is used | \ref esp32_spi_interfaces "SPI Interf
|
||||
UART_DEV(0):TxD | GPIO1 | Console (configuration is fixed) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
UART_DEV(0):RxD | GPIO3 | Console (configuration is fixed) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
</center>
|
||||
|
||||
\n
|
||||
@note
|
||||
- SPI_DEV(0) is not available if module `esp_jtag` is used. For the SPI_DEV(0) pins to work properly, the function switches (DIP switches) for the JTAG signals must be set to OFF.
|
||||
SPI_DEV(0) is not available if module `esp_jtag` is used. For the SPI_DEV(0) pins to work properly, the function switches (DIP switches) for the JTAG signals must be set to OFF.
|
||||
|
||||
### <a name="pinout"> Board Pinout </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_1_toc)
|
||||
|
||||
### Board Pinout {#esp32_esp-ethernet-kit-v1_1_pinout}
|
||||
|
||||
The board schematic can be found [here](https://dl.espressif.com/dl/schematics/SCH_ESP32-ETHERNET-KIT_A_V1.1_20190711.pdf).
|
||||
|
||||
@ -81,7 +90,11 @@ By default, only 4 bidirectional GPIO pins are unused: GPIO2, GPIO4, GPIO32, GPI
|
||||
and I2C, but they can also be used for SPI or another serial port. By disabling the JTAG interface on the board,
|
||||
another 4 GPIOs can be made available (GPIO12, GPIO13, GPIO14, GPIO15).
|
||||
|
||||
## <a name="other-resources"> Other Documentation Resources </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_1_toc)
|
||||
|
||||
## Other Documentation Resources {#esp32_esp-ethernet-kit-v1_1_other-resources}
|
||||
|
||||
There is a comprehensive [Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-ethernet-kit-v1.1.html) for the ESP32-Ethernet-Kit with a lot information about hardware configuration.
|
||||
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_1_toc)
|
||||
*/
|
||||
|
@ -8,21 +8,23 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup boards_esp32_esp-ethernet-kit-v1_2 v1.2 Board
|
||||
* @defgroup boards_esp32_esp-ethernet-kit-v1_2 ESP32-Ethernet-Kit V1.2 Board
|
||||
* @ingroup boards_esp32_esp-ethernet-kit
|
||||
* @brief Support for for Espressif ESP32-Ethernet-Kit v1.2
|
||||
* @brief Support for for Espressif ESP32-Ethernet-Kit V1.2
|
||||
* @author Gunar Schorcht <gunar@schorcht.net>
|
||||
* @author Erik Ekman <eekman@google.com>
|
||||
|
||||
## <a name="toc"> Table of Contents </a>
|
||||
\section esp32-ethernet-kit-v1_2 Espressif ESP32-Ethernet-Kit v1.2
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Hardware](#hardware)
|
||||
1. [Board Configuration](#board_configuration)
|
||||
2. [Board Pinout](#pinout)
|
||||
3. [Other Documentation Resources](#other-resources)
|
||||
## Table of Contents {#esp32_ethernet_kit_v1_2_toc}
|
||||
|
||||
## <a name="overview"> Overview </a> [[TOC](#toc)]
|
||||
1. [Overview](#esp32_ethernet_kit_v1_2_overview)
|
||||
2. [Hardware](#esp32_ethernet_kit_v1_2_hardware)
|
||||
1. [Board Configuration](#esp32_ethernet_kit_v1_2_board_configuration)
|
||||
2. [Board Pinout](#esp32_ethernet_kit_v1_2_pinout)
|
||||
3. [Other Documentation Resources](#esp32_ethernet_kit_v1_2_other-resources)
|
||||
|
||||
## Overview {#esp32_ethernet_kit_v1_2_overview}
|
||||
|
||||
The Espressif [ESP32-Ethernet-Kit](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-ethernet-kit.html) is a development board that uses the ESP32-WROVER-E module. Most important features of the board are
|
||||
|
||||
@ -32,14 +34,20 @@ The Espressif [ESP32-Ethernet-Kit](https://docs.espressif.com/projects/esp-idf/e
|
||||
Furthermore, some GPIOs are broken out for extension. The USB bridge based on FDI FT2232HL provides a JTAG interface for OCD debugging through the USB interface.
|
||||
For flashing and debugging the board, see \ref boards_esp32_esp-ethernet-kit common board documentation.
|
||||
|
||||
## <a name="hardware"> Hardware </a> [[TOC](#toc)]
|
||||
@image html "https://docs.espressif.com/projects/esp-idf/en/latest/esp32/_images/esp32-ethernet-kit-v1.2.jpg" "ESP32-Ethernet-Kit V1.2" width=500
|
||||
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_2_toc)
|
||||
|
||||
## Hardware {#esp32_ethernet_kit_v1_2_hardware}
|
||||
|
||||
This section describes
|
||||
|
||||
- the default [board configuration](#board_configuration),
|
||||
- the [board pinout](#pinout).
|
||||
- the default [board configuration](#esp32_ethernet_kit_v1_2_board_configuration),
|
||||
- the [board pinout](#esp32_ethernet_kit_v1_2_pinout).
|
||||
|
||||
### <a name="board_configuration"> Board Configuration </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_2_toc)
|
||||
|
||||
### Board Configuration {#esp32_ethernet_kit_v1_2_board_configuration}
|
||||
|
||||
ESP32-Ethernet-Kit v1.2 has the following on-board components
|
||||
|
||||
@ -53,7 +61,6 @@ section Peripherals in \ref esp32_riot.
|
||||
Only a few GPIOs are broken out and available for external hardware on ESP32-Ethernet-Kit boards. Which GPIOs are available as peripherals depends on used modules.
|
||||
|
||||
<center>
|
||||
\anchor esp32_ethernet_kit_v1_2_table_board_configuration
|
||||
Function | GPIOs | Remarks |Configuration
|
||||
:---------------|:-------|:--------|:----------------------------------
|
||||
BTN0 | GPIO0 | not available if `esp_eth` is used | |
|
||||
@ -69,11 +76,13 @@ SPI_DEV(0):CS0 | GPIO15 | HSPI is used | \ref esp32_spi_interfaces "SPI Interf
|
||||
UART_DEV(0):TxD | GPIO1 | Console (configuration is fixed) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
UART_DEV(0):RxD | GPIO3 | Console (configuration is fixed) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
</center>
|
||||
|
||||
\n
|
||||
@note
|
||||
- SPI_DEV(0) is not available if module `esp_jtag` is used. For the SPI_DEV(0) pins to work properly, the function switches (DIP switches) for the JTAG signals must be set to OFF.
|
||||
SPI_DEV(0) is not available if module `esp_jtag` is used. For the SPI_DEV(0) pins to work properly, the function switches (DIP switches) for the JTAG signals must be set to OFF.
|
||||
|
||||
### <a name="pinout"> Board Pinout </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_2_toc)
|
||||
|
||||
### Board Pinout {#esp32_ethernet_kit_v1_2_pinout}
|
||||
|
||||
The board schematic can be found [here](https://dl.espressif.com/dl/schematics/SCH_ESP32-Ethernet-Kit_A_V1.2_20200528.pdf).
|
||||
|
||||
@ -81,7 +90,11 @@ By default, only 4 bidirectional GPIO pins are unused: GPIO2, GPIO4, GPIO32, GPI
|
||||
and I2C, but they can also be used for SPI or another serial port. By disabling the JTAG interface on the board,
|
||||
another 4 GPIOs can be made available (GPIO12, GPIO13, GPIO14, GPIO15).
|
||||
|
||||
## <a name="other-resources"> Other Documentation Resources </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_2_toc)
|
||||
|
||||
## Other Documentation Resources {#esp32_ethernet_kit_v1_2_other-resources}
|
||||
|
||||
There is a comprehensive [Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-ethernet-kit.html) for the ESP32-Ethernet-Kit with a lot information about hardware configuration.
|
||||
|
||||
[Back to table of contents](#esp32_ethernet_kit_v1_2_toc)
|
||||
*/
|
||||
|
@ -12,18 +12,21 @@
|
||||
* @brief Support for Heltec WiFi LoRa 32 V2 boards
|
||||
* @author Gunar Schorcht <gunar@schorcht.net>
|
||||
|
||||
## <a name="toc"> Table of Contents </a>
|
||||
\section esp32_heltec_lora32_v2 Heltec WiFi LoRa 32 V2
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Hardware](#hardware)
|
||||
1. [MCU](#mcu)
|
||||
2. [Board Configuration](#board_configuration)
|
||||
3. [Board Pinout](#pinout)
|
||||
4. [Using the OLED Display](#oled_display)
|
||||
5. [Optional Hardware Configurations](#optional_hardware)
|
||||
3. [Flashing the Device](#flashing)
|
||||
## Table of Contents {#esp32_heltec_lora32_v2_toc}
|
||||
|
||||
## <a name="overview"> Overview </a> [[TOC](#toc)]
|
||||
1. [Overview](#esp32_heltec_lora32_v2_overview)
|
||||
2. [Hardware](#esp32_heltec_lora32_v2_hardware)
|
||||
1. [MCU](#esp32_heltec_lora32_v2_mcu)
|
||||
2. [Board Configuration](#esp32_heltec_lora32_v2_board_configuration)
|
||||
3. [Board Pinout](#esp32_heltec_lora32_v2_pinout)
|
||||
4. [Using the OLED Display](#esp32_heltec_lora32_v2_oled_display)
|
||||
5. [Optional Hardware Configurations]
|
||||
(#esp32_heltec_lora32_v2_optional_hardware)
|
||||
3. [Flashing the Device](#esp32_heltec_lora32_v2_flashing)
|
||||
|
||||
## Overview {#esp32_heltec_lora32_v2_overview}
|
||||
|
||||
Heltec WiFi LoRa 32 V2 is an ESP32 development board with 8 MB Flash that uses
|
||||
the EPS32 chip directly. It integrates
|
||||
@ -35,24 +38,29 @@ Since the board is
|
||||
[open source hardware](https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series),
|
||||
a number of clones are available.
|
||||
|
||||
\htmlonly<style>div.image img[src="https://heltec.org/wp-content/uploads/2019/07/SAM_0748_800X800.png"]{width:400px;}</style>\endhtmlonly
|
||||
\image html "https://heltec.org/wp-content/uploads/2019/07/SAM_0748_800X800.png" "Heltec WiFi Lora 32 V2"
|
||||
@image html "https://heltec.org/wp-content/uploads/2020/04/SAM_0748_800X800.png" "Heltec WiFi Lora 32 V2" width=400px
|
||||
|
||||
## <a name="hardware"> Hardware </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_heltec_lora32_v2_toc)
|
||||
|
||||
## Hardware {#esp32_heltec_lora32_v2_hardware}
|
||||
|
||||
This section describes
|
||||
|
||||
- the [MCU](#mcu),
|
||||
- the default [board configuration](#board_configuration),
|
||||
- [optional hardware configurations](#optional_hardware),
|
||||
- the [board pinout](#pinout).
|
||||
- the [MCU](#esp32_heltec_lora32_v2_mcu),
|
||||
- the default [board configuration](#esp32_heltec_lora32_v2_board_configuration),
|
||||
- [optional hardware configurations](#esp32_heltec_lora32_v2_optional_hardware),
|
||||
- the [board pinout](#esp32_heltec_lora32_v2_pinout).
|
||||
|
||||
### <a name="mcu"> MCU </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_heltec_lora32_v2_toc)
|
||||
|
||||
### MCU {#esp32_heltec_lora32_v2_mcu}
|
||||
|
||||
Most features of the board are provided by the ESP32 SoC. For detailed
|
||||
information about the ESP32, see section \ref esp32_mcu_esp32 "MCU ESP32".
|
||||
|
||||
### <a name="board_configuration"> Board Configuration </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_heltec_lora32_v2_toc)
|
||||
|
||||
### Board Configuration {#esp32_heltec_lora32_v2_board_configuration}
|
||||
|
||||
Heltec WiFi LoRa 32 V2 has the following on-board components:
|
||||
|
||||
@ -68,7 +76,8 @@ There are two hardware versions of the board:
|
||||
Since many GPIOs are broken out, they can be used for different purposes
|
||||
in different applications. For flexibility, some GPIOs might be listed in
|
||||
various peripheral configurations. For example, GPIO0 is used in the ADC
|
||||
channel definition \ref ADC_GPIOS and the PWM channel definition \ref PWM0_GPIOS.
|
||||
channel definition \ref ADC_GPIOS and the PWM channel definition
|
||||
\ref PWM0_GPIOS.
|
||||
|
||||
This is possible because GPIOs are only used for a specific peripheral
|
||||
interface when
|
||||
@ -88,15 +97,15 @@ unless you exactly know what you are doing.
|
||||
|
||||
The following table shows the default board configuration, which is sorted
|
||||
according to the defined functionality of GPIOs. This configuration can be
|
||||
overridden by \ref esp32_application_specific_configurations "application-specific configurations".
|
||||
overridden by \ref esp32_application_specific_configurations
|
||||
"application-specific configurations".
|
||||
|
||||
<center>
|
||||
\anchor esp32_heltec_lora_32_v2_table_board_configuration
|
||||
Function | GPIOs | Remarks |Configuration
|
||||
:---------------|:-------|:--------|:----------------------------------
|
||||
BTN0 | GPIO0 | low active | |
|
||||
LED0 | GPIO25 | high active | |
|
||||
ADC | GPIO36, GPIO39, GPIO37, GPIO38, <br>GPIO0, GPIO2, GPIO12, GPIO13, <br>GPIO4, GPIO15 | | \ref esp32_adc_channels "ADC Channels"
|
||||
ADC | GPIO36, GPIO39, GPIO37, GPIO38,\n GPIO0, GPIO2, GPIO12, GPIO13,\n GPIO4, GPIO15 | | \ref esp32_adc_channels "ADC Channels"
|
||||
DAC | | | \ref esp32_dac_channels "DAC Channels"
|
||||
PWM_DEV(0) | GPIO25, GPIO0, GPIO2, GPIO17 | | \ref esp32_pwm_channels "PWM Channels"
|
||||
PWM_DEV(1) | GPIO22, GPIO23 | | \ref esp32_pwm_channels "PWM Channels"
|
||||
@ -112,7 +121,7 @@ UART_DEV(1):TxD | GPIO10 | not available in **qout** and **qio** flash mode | \r
|
||||
UART_DEV(1):RxD | GPIO9 | not available in **qout** and **qio** flash mode | \ref esp32_uart_interfaces "UART interfaces"
|
||||
OLED RESET | GPIO16 | | |
|
||||
</center>
|
||||
<br>
|
||||
\n
|
||||
@note
|
||||
- The configuration of ADC channels contains all ESP32 GPIOs that can be used
|
||||
as ADC channels.
|
||||
@ -122,18 +131,20 @@ OLED RESET | GPIO16 | | |
|
||||
For detailed information about the configuration of ESP32 boards, see
|
||||
section \ref esp32_peripherals "Common Peripherals".
|
||||
|
||||
### <a name="oled_display"> Using the OLED Display </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_heltec_lora32_v2_toc)
|
||||
|
||||
### Using the OLED Display {#esp32_heltec_lora32_v2_oled_display}
|
||||
|
||||
The 0.96-inch OLED display with 128x64 pixels uses the widely used SSD1306
|
||||
controller. It is connected via `I2C_DEV(0)`. It can be used with the `pkg/u8g2`
|
||||
package. For this purpose, the `pkg/u8g2` package has to be used in the
|
||||
application Makefile
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEPKG += u8g2
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
and function `u8g2_Setup_ssd1306_i2c_128x64_noname_f` has to be called to
|
||||
setup the right driver, for example:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#include "u8g2.h"
|
||||
#include "u8x8_riotos.h"
|
||||
|
||||
@ -153,24 +164,25 @@ u8g2_SetUserPtr(&u8g2, &user_data);
|
||||
u8g2_SetI2CAddress(&u8g2, SSD1306_I2C_ADDR);
|
||||
u8g2_InitDisplay(&u8g2);
|
||||
u8g2_SetPowerSave(&u8g2, 0);
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The `tests/pkg_u8g2` test application is a good example of how to use the
|
||||
`pkg/u8g2` package. It can be compiled for the board with the following command:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
TEST_OUTPUT=4 TEST_I2C=0 TEST_ADDR=0x3c TEST_PIN_RESET=GPIO16 \
|
||||
TEST_DISPLAY=u8g2_Setup_ssd1306_i2c_128x64_noname_f \
|
||||
BOARD=esp32-heltec-lora32-v2 make -C tests/pkg_u8g2/ flash
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
### <a name="optional_hardware"> Optional Hardware Configurations </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_heltec_lora32_v2_toc)
|
||||
|
||||
### Optional Hardware Configurations {#esp32_heltec_lora32_v2_optional_hardware}
|
||||
|
||||
MRF24J40-based IEEE 802.15.4 radio modules and ENC28J60-based Ethernet
|
||||
network interface modules have been tested with the board. You could use
|
||||
the following code in your
|
||||
\ref esp32_application_specific_configurations "application-specific configuration"
|
||||
to use such modules:
|
||||
the following code in your \ref esp32_application_specific_configurations
|
||||
"application-specific configuration" to use such modules:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#ifdef BOARD_ESP32_HELTEC_LORA32_V2
|
||||
|
||||
#if MODULE_MRF24J40
|
||||
@ -186,36 +198,45 @@ to use such modules:
|
||||
#endif
|
||||
|
||||
#endif
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For other parameters, the default values defined by the drivers can be used.
|
||||
|
||||
@note The **RESET** signal of MRF24J40 and ENC28J60 based modules can also
|
||||
be connected to the **RST** pin of the board
|
||||
(see \ref esp32_heltec_lora_32_v2_pinout "pinout") to keep the configured
|
||||
(see \ref esp32_heltec_lora_32_v2_pinout_img "pinout") to keep the configured
|
||||
GPIO free for other purposes.
|
||||
|
||||
### <a name="pinout"> Board Pinout </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_heltec_lora32_v2_toc)
|
||||
|
||||
### Board Pinout {#esp32_heltec_lora32_v2_pinout}
|
||||
|
||||
The following figure shows the pinout of the defined default configuration
|
||||
for Heltec WiFi LoRa 32 V2 boards. The light green GPIOs are not used
|
||||
by configured on-board hardware components and can be used for any
|
||||
purpose. However, if optional off-board hardware modules are used,
|
||||
these GPIOs may also be occupied,
|
||||
see \ref esp32_heltec_lora_32_v2_table_board_configuration "optional functions"
|
||||
in table board configuration.
|
||||
see section \ref esp32_heltec_lora32_v2_board_configuration for more information.
|
||||
|
||||
The corresponding board schematics can be found
|
||||
[here for SX1276 version](https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series/blob/master/SchematicDiagram/WiFi_LoRa_32(V2)/WIFI_LoRa_32_V2(868-915).PDF) and
|
||||
[here for SX1278 version](https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series/blob/master/SchematicDiagram/WiFi_LoRa_32(V2)/WiFi_LoRa_32_V2(433%2C470-510).PDF).
|
||||
The corresponding board schematics can be found [here for SX1276 version]
|
||||
(https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series/blob/master/SchematicDiagram/WiFi_LoRa_32(V2)/WIFI_LoRa_32_V2(868-915).PDF)
|
||||
and [here for SX1278 version]
|
||||
(https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series/blob/master/SchematicDiagram/WiFi_LoRa_32(V2)/WiFi_LoRa_32_V2(433%2C470-510).PDF).
|
||||
|
||||
\anchor esp32_heltec_lora_32_v2_pinout
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/Heltec_WiFi_LoRa_32_V2_pinout.png?inline=false" "WiFi LoRa 32 V2 Pintout Diagram"
|
||||
\anchor esp32_heltec_lora_32_v2_pinout_img
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/Heltec_WiFi_LoRa_32_V2_pinout.png" "WiFi LoRa 32 V2 Pintout Diagram"
|
||||
|
||||
## <a name="flashing"> Flashing the Device </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_heltec_lora32_v2_toc)
|
||||
|
||||
Flashing RIOT is quite easy. The board has a Micro-USB connector with reset/boot/flash logic. Just connect the board to your host computer and type using the programming port:
|
||||
```
|
||||
## Flashing the Device {#esp32_heltec_lora32_v2_flashing}
|
||||
|
||||
Flashing RIOT is quite easy. The board has a Micro-USB connector with
|
||||
reset/boot/flash logic. Just connect the board to your host computer and
|
||||
type using the programming port:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make flash BOARD=esp32-heltec-lora32-v2 ...
|
||||
```
|
||||
For detailed information about ESP32 as well as configuring and compiling RIOT for ESP32 boards, see \ref esp32_riot.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For detailed information about ESP32 as well as configuring and compiling RIOT
|
||||
for ESP32 boards, see \ref esp32_riot.
|
||||
|
||||
[Back to table of contents](#esp32_heltec_lora32_v2_toc)
|
||||
*/
|
||||
|
@ -12,22 +12,25 @@
|
||||
* @brief Support for MH-ET LIVE MiniKit for ESP32
|
||||
* @author Gunar Schorcht <gunar@schorcht.net>
|
||||
|
||||
## <a name="toc"> Table of Contents </a>
|
||||
\section esp32_mh_et_live_minikit MH-ET LIVE MiniKit for ESP32
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Hardware](#hardware)
|
||||
1. [MCU](#mcu)
|
||||
2. [Board Configuration](#board_configuration)
|
||||
3. [Board Pinout](#pinout)
|
||||
4. [Optional Hardware Configurations](#optional_hardware)
|
||||
3. [Flashing the Device](#flashing)
|
||||
## Table of Contents {#esp32_mh_et_live_minikit_toc}
|
||||
|
||||
## <a name="overview"> Overview </a> [[TOC](#toc)]
|
||||
1. [Overview](#esp32_mh_et_live_minikit_overview)
|
||||
2. [Hardware](#esp32_mh_et_live_minikit_hardware)
|
||||
1. [MCU](#esp32_mh_et_live_minikit_mcu)
|
||||
2. [Board Configuration](#esp32_mh_et_live_minikit_board_configuration)
|
||||
3. [Board Pinout](#esp32_mh_et_live_minikit_pinout)
|
||||
4. [Optional Hardware Configurations]
|
||||
(#esp32_mh_et_live_minikit_optional_hardware)
|
||||
3. [Flashing the Device](#esp32_mh_et_live_minikit_flashing)
|
||||
|
||||
## Overview {#esp32_mh_et_live_minikit_overview}
|
||||
|
||||
The MH-ET LIVE MiniKit for ESP32 uses the ESP32-WROOM-32 module. It is a very
|
||||
interesting development kit as it uses in the stackable Wemos D1 Mini format.
|
||||
Thus, all [shields for Wemos D1 mini]
|
||||
(https://docs.wemos.cc/en/latest/d1_mini_shiled/index.html) for ESP8266
|
||||
(https://docs.wemos.cc/en/latest/d1_mini_shield/index.html) for ESP8266
|
||||
can also be used with ESP32. Examples for such shields are:
|
||||
|
||||
- Micro SD-Card Shield
|
||||
@ -36,44 +39,54 @@ can also be used with ESP32. Examples for such shields are:
|
||||
- RGB LED Shield
|
||||
- ...
|
||||
|
||||
This makes it possible to create different hardware configurations without the need for a soldering iron or a breadboard.
|
||||
This makes it possible to create different hardware configurations without
|
||||
the need for a soldering iron or a breadboard.
|
||||
|
||||
MH-ET LIVE MiniKit for ESP32 belongs to the class of general purpose boards where most ESP32 pins are broken out for easier access.
|
||||
MH-ET LIVE MiniKit for ESP32 belongs to the class of general purpose boards
|
||||
where most ESP32 pins are broken out for easier access.
|
||||
|
||||
\htmlonly<style>div.image img[src="https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/MH-ET_LIVE_D1_mini_ESP32_2.png?inline=false"]{width:250px;}</style>\endhtmlonly
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/MH-ET_LIVE_D1_mini_ESP32_2.png?inline=false" "MH-ET LIVE MiniKit for ESP32"
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/MH-ET_LIVE_D1_mini_ESP32_2.png" "MH-ET LIVE MiniKit for ESP32" width=250px
|
||||
|
||||
This stackable platform was tested in an RIOT application with:
|
||||
|
||||
- [Micro SD-Card Shield](https://docs.wemos.cc/en/latest/d1_mini_shiled/micro_sd.html)
|
||||
- [Micro SD-Card Shield](https://docs.wemos.cc/en/latest/d1_mini_shield/micro_sd.html)
|
||||
- MRF24J40 IEEE 802.15.4 radio Shield (contact gunar@schorcht.net for more information)
|
||||
- BMP180 Pressure Sensor Shield
|
||||
|
||||
This application is a good example how easy it is with this board to create different hardware applications.
|
||||
This application is a good example how easy it is with this board to create
|
||||
different hardware applications.
|
||||
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/MH-ET_LIVE_D1_mini_ESP32_5.png?inline=false" "RIOT application with SD-Card, MRF24J40 Radio, and BMP180 Pressure Sensor"
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/MH-ET_LIVE_D1_mini_ESP32_5.png" "RIOT application with SD-Card, MRF24J40 Radio, and BMP180 Pressure Sensor"
|
||||
|
||||
## <a name="hardware"> Hardware </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_mh_et_live_minikit_toc)
|
||||
|
||||
## Hardware {#esp32_mh_et_live_minikit_hardware}
|
||||
|
||||
This section describes
|
||||
|
||||
- the [MCU](#mcu),
|
||||
- the default [board configuration](#board_configuration),
|
||||
- [optional hardware configurations](#optional_hardware),
|
||||
- the [board pinout](#pinout).
|
||||
- the [MCU](#esp32_mh_et_live_minikit_mcu),
|
||||
- the default [board configuration](#esp32_mh_et_live_minikit_board_configuration),
|
||||
- [optional hardware configurations](#esp32_mh_et_live_minikit_optional_hardware),
|
||||
- the [board pinout](#esp32_mh_et_live_minikit_pinout).
|
||||
|
||||
### <a name="mcu"> MCU </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_mh_et_live_minikit_toc)
|
||||
|
||||
### MCU {#esp32_mh_et_live_minikit_mcu}
|
||||
|
||||
Most features of the board are provided by the ESP32 SoC. For detailed
|
||||
information about the ESP32, see section \ref esp32_mcu_esp32 "MCU ESP32".
|
||||
|
||||
### <a name="board_configuration"> Board Configuration </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_mh_et_live_minikit_toc)
|
||||
|
||||
The following table shows the default board configuration, which is sorted according to the defined functionality of GPIOs. This configuration can be overridden by an \ref esp32_application_specific_configurations "application-specific configuration".
|
||||
### Board Configuration {#esp32_mh_et_live_minikit_board_configuration}
|
||||
|
||||
The following table shows the default board configuration, which is sorted
|
||||
according to the defined functionality of GPIOs. This configuration can be
|
||||
overridden by an \ref esp32_application_specific_configurations
|
||||
"application-specific configuration".
|
||||
|
||||
<center>
|
||||
\anchor esp32_mh-et-live-minikit_table_board_configuration
|
||||
Pin | Default Configuration<b>*</b> | Optional Modules<b>*</b> | Remarks / Prerequisites | Configuration
|
||||
Pin | Default Configuration* | Optional Modules | Remarks / Prerequisites | Configuration
|
||||
:------|:-------------------------|:--------------------------|:--------|:------
|
||||
GPIO2 | PWM_DEV(0):0 / LED blue | | | \ref esp32_pwm_channels "PWM Channels"
|
||||
GPIO0 | PWM_DEV(0):1 | | | \ref esp32_pwm_channels "PWM Channels"
|
||||
@ -84,7 +97,7 @@ GPIO21 | I2C_DEV(0):SDA | | | \ref esp32_i2c_interfaces "I2C Interface
|
||||
GPIO18 | SPI_DEV(0):SCK | | | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO19 | SPI_DEV(0):MISO | | | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO23 | SPI_DEV(0):MOSI | | | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO5 | SPI_DEV(0):CS0 | SD Card CS | when module [sdcard_spi](https://riot-os.org/api/group__drivers__sdcard__spi.html) is used | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO5 | SPI_DEV(0):CS0 | SD Card CS | when module \ref drivers_sdcard_spi "sdcard_spi" is used | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO1 | UART_DEV(0):TxD | | Console (configuration is fixed) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
GPIO3 | UART_DEV(0):RxD | | Console (configuration is fixed) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
GPIO9 | UART_DEV(1):TxD | | | \ref esp32_uart_interfaces "UART interfaces"
|
||||
@ -97,52 +110,79 @@ GPIO25 | DAC_LINE(0) | | | \ref esp32_dac_channels "DAC Channels"
|
||||
GPIO13 | - | | | |
|
||||
GPIO12 | - | | | |
|
||||
GPIO14 | - | | | |
|
||||
GPIO16 | - | MRF24J40 RESET | when module [mrf24j40](https://riot-os.org/api/group__drivers__mrf24j40.html) is used | |
|
||||
GPIO17 | - | MRF24J40 INT | when module [mrf24j40](https://riot-os.org/api/group__drivers__mrf24j40.html) is used | |
|
||||
GPIO26 | - | MRF24J40 CS | when module [mrf24j40](https://riot-os.org/api/group__drivers__mrf24j40.html) is used | |
|
||||
GPIO16 | - | MRF24J40 RESET | when module \ref drivers_mrf24j40 "mrf24j40" is used | |
|
||||
GPIO17 | - | MRF24J40 INT | when module \ref drivers_mrf24j40 "mrf24j40" is used | |
|
||||
GPIO26 | - | MRF24J40 CS | when module \ref drivers_mrf24j40 "mrf24j40" is used | |
|
||||
GPIO27 | - | | | |
|
||||
GPIO32 | - | | | |
|
||||
GPIO33 | - | | | |
|
||||
</center>
|
||||
|
||||
<b>*</b> Default configuration cannot be used or is not available at all when the the optional hardware is used.
|
||||
\b * Default configuration cannot be used or is not available at all when
|
||||
optional hardware is used.
|
||||
|
||||
@note
|
||||
- GPIO9 and GIOP10 can only be used in **dout** and **dio** \ref esp32_flash_modes "flash modes".
|
||||
- The **RESET** signal of MRF24J40 shield can be connected to the RST **pin** of the board (see \ref esp32_mh-et-live-minikit "pinout") to keep the configured GPIO free for other purposes.
|
||||
- GPIO9 and GIOP10 can only be used in **dout** and **dio**
|
||||
\ref esp32_flash_modes "flash modes".
|
||||
- The **RESET** signal of MRF24J40 shield can be connected to the RST **pin**
|
||||
of the board (see \ref esp32_mh_et_live_minikit_pinout_img "pinout") to
|
||||
keep the configured GPIO free for other purposes.
|
||||
|
||||
For detailed information about the configuration of ESP32 boards, see section \ref esp32_peripherals "Common Peripherals".
|
||||
For detailed information about the configuration of ESP32 boards, see
|
||||
section \ref esp32_peripherals "Common Peripherals".
|
||||
|
||||
### <a name="optional_hardware"> Optional Hardware Configurations </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_mh_et_live_minikit_toc)
|
||||
|
||||
ENC28J60-based Ethernet network interface modules have been tested with the board. You could use the following code in your \ref esp32_application_specific_configurations "application-specific configuration" to use such a module:
|
||||
### Optional Hardware Configurations {#esp32_mh_et_live_minikit_optional_hardware}
|
||||
|
||||
```
|
||||
ENC28J60-based Ethernet network interface modules have been tested with the
|
||||
board. You could use the following code in your
|
||||
\ref esp32_application_specific_configurations
|
||||
"application-specific configuration" to use such a module:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#if MODULE_ENC28J80 && BOARD_ESP32_MH_ET_LIVE_MINIKIT
|
||||
#define ENC28J80_PARAM_CS GPIO14 /* ENC28J80 CS signal */
|
||||
#define ENC28J80_PARAM_INT GPIO33 /* ENC28J80 INT signal */
|
||||
#define ENC28J80_PARAM_RESET GPIO12 /* ENC28J80 RESET signal */
|
||||
#endif
|
||||
```
|
||||
For **ENC28J80_PARAM_SPI** the default parameter defined by the driver can be used.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For **ENC28J80_PARAM_SPI** the default parameter defined by the driver can
|
||||
be used.
|
||||
|
||||
@note The **RESET** signal of ENC28J60 based modules can also be connected to the **RST** pin of the board (see \ref esp32_mh-et-live-minikit "pinout") to keep the configured GPIO free for other purposes.
|
||||
@note The **RESET** signal of ENC28J60 based modules can also be connected
|
||||
to the **RST** pin of the board (see \ref esp32_mh_et_live_minikit_pinout_img
|
||||
"pinout") to keep the configured GPIO free for other purposes.
|
||||
|
||||
### <a name="pinout"> Board Pinout </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_mh_et_live_minikit_toc)
|
||||
|
||||
The following picture shows the pinout of MH-ET LIVE MiniKit for ESP32 board as defined by the default board configuration. The light green GPIOs are not used by configured on-board hardware components and can be used for any purpose. However, if optional off-board hardware modules are used, these GPIOs may also be occupied, see \ref esp32_mh-et-live-minikit_table_board_configuration "optional functions" in table board configuration.
|
||||
### Board Pinout {#esp32_mh_et_live_minikit_pinout}
|
||||
|
||||
The corresponding board schematic can be found [here](https://i.imgur.com/EpE4dGj.jpg)
|
||||
The following picture shows the pinout of MH-ET LIVE MiniKit for ESP32 board
|
||||
as defined by the default board configuration. The light green GPIOs are not
|
||||
used by configured on-board hardware components and can be used for any
|
||||
purpose. However, if optional off-board hardware modules are used, these
|
||||
GPIOs may also be occupied, see section
|
||||
\ref esp32_mh_et_live_minikit_board_configuration for more information.
|
||||
|
||||
\anchor esp32_mh-et-live-minikit
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/MH-ET_LIVE_D1_mini_ESP32_pinout.png?inline=false" "MH-ET LIVE MiniKit for ESP32 pinout"
|
||||
The corresponding board schematic can be found
|
||||
[here](https://i.imgur.com/EpE4dGj.jpg)
|
||||
|
||||
## <a name="flashing"> Flashing the Device </a> [[TOC](#toc)]
|
||||
\anchor esp32_mh_et_live_minikit_pinout_img
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/MH-ET_LIVE_D1_mini_ESP32_pinout.png" "MH-ET LIVE MiniKit for ESP32 pinout"
|
||||
|
||||
Flashing RIOT is quite easy. The board has a Micro-USB connector with a reset/boot/flash logic. Just connect the board to your host computer using the programming port and type:
|
||||
```
|
||||
[Back to table of contents](#esp32_mh_et_live_minikit_toc)
|
||||
|
||||
## Flashing the Device {#esp32_mh_et_live_minikit_flashing}
|
||||
|
||||
Flashing RIOT is quite easy. The board has a Micro-USB connector with a
|
||||
reset/boot/flash logic. Just connect the board to your host computer using
|
||||
the programming port and type:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make flash BOARD=esp32-mh-et-live-minikit ...
|
||||
```
|
||||
For detailed information about ESP32 as well as configuring and compiling RIOT for ESP32 boards, see \ref esp32_riot.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For detailed information about ESP32 as well as configuring and compiling
|
||||
RIOT for ESP32 boards, see \ref esp32_riot.
|
||||
|
||||
[Back to table of contents](#esp32_mh_et_live_minikit_toc)
|
||||
*/
|
||||
|
@ -12,77 +12,96 @@
|
||||
* @brief Support for Olimex ESP32-EVB and ESP32-GATEWAY
|
||||
* @author Gunar Schorcht <gunar@schorcht.net>
|
||||
|
||||
## <a name="toc"> Table of Contents </a>
|
||||
\section esp32_olimex-esp32-evb Olimex ESP32-EVB and ESP32-GATEWAY
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Hardware](#hardware)
|
||||
1. [MCU](#mcu)
|
||||
2. [Board Configuration](#board_configuration)
|
||||
3. [Board Pinout](#pinout)
|
||||
4. [Optional Hardware Configurations](#optional_hardware)
|
||||
3. [Flashing the Device](#flashing)
|
||||
## Table of Contents {#esp32_olimex_esp32_evb_toc}
|
||||
|
||||
## <a name="overview"> Overview </a> [[TOC](#toc)]
|
||||
1. [Overview](#esp32_olimex_esp32_evb_overview)
|
||||
2. [Hardware](#esp32_olimex_esp32_evb_hardware)
|
||||
1. [MCU](#esp32_olimex_esp32_evb_mcu)
|
||||
2. [Board Configuration](#esp32_olimex_esp32_evb_board_configuration)
|
||||
3. [Board Pinout](#esp32_olimex_esp32_evb_pinout)
|
||||
4. [Optional Hardware Configurations](#esp32_olimex_esp32_evb_optional_hardware)
|
||||
3. [Flashing the Device](#esp32_olimex_esp32_evb_flashing)
|
||||
|
||||
[Olimex ESP32-EVB](https://github.com/OLIMEX/ESP32-EVB) and [Olimex ESP32-GATEWAY](https://github.com/OLIMEX/ESP32-GATEWAY) are open source hardware boards which use the ESP32-WROOM module. The key features of the boards are:
|
||||
## Overview {#esp32_olimex_esp32_evb_overview}
|
||||
|
||||
[Olimex ESP32-EVB](https://github.com/OLIMEX/ESP32-EVB) and
|
||||
[Olimex ESP32-GATEWAY](https://github.com/OLIMEX/ESP32-GATEWAY) are
|
||||
open source hardware boards which use the ESP32-WROOM module. The key
|
||||
features of the boards are:
|
||||
|
||||
- Ethernet LAN interface
|
||||
- MicroSD card interface
|
||||
- IR interface (Olimex ESP32-EVB only)
|
||||
- CAN interface (Olimex ESP32-EVB only)
|
||||
- two Relais (Olimex ESP32-EVB only)
|
||||
- [UEXT](https://www.olimex.com/Products/Modules/UEXT/) connector with I2C, SPI and UART interfaces (Olimex ESP32-EVB only)
|
||||
- [UEXT](https://www.olimex.com/Products/Modules/UEXT/) connector with
|
||||
I2C, SPI and UART interfaces (Olimex ESP32-EVB only)
|
||||
|
||||
Using the UEXT connector, a lot of [off-board hardware modules](https://www.olimex.com/Products/Modules/) can be connected to Olimex ESP32-EVB to extend the hardware without the need for soldering iron or breadboards.
|
||||
Using the UEXT connector, a lot of [off-board hardware modules](https://www.olimex.com/Products/Modules/) can be connected to Olimex ESP32-EVB to extend the hardware without the need
|
||||
for soldering iron or breadboards.
|
||||
|
||||
Because of the differences in the on-board hardware, it is necessary to add the following line to the makefile of the application to use the according configuration for Olimex ESP32-GATEWAY:
|
||||
```
|
||||
Because of the differences in the on-board hardware, it is necessary to
|
||||
add the following line to the makefile of the application to use the
|
||||
according configuration for Olimex ESP32-GATEWAY:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE += olimex_esp32_gateway
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/Olimex_ESP32-EVB_GATEWAY.png?inline=false" "Olimex ESP32-EVB (left) and Olimex ESP32-GATEWAY (right)"
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/Olimex_ESP32-EVB_GATEWAY.png" "Olimex ESP32-EVB (left) and Olimex ESP32-GATEWAY (right)"
|
||||
|
||||
## <a name="hardware"> Hardware </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_olimex_esp32_evb_toc)
|
||||
|
||||
## Hardware {#esp32_olimex_esp32_evb_hardware}
|
||||
|
||||
This section describes
|
||||
|
||||
- the [MCU](#mcu),
|
||||
- the default [board configuration](#board_configuration),
|
||||
- [optional hardware configurations](#optional_hardware),
|
||||
- the [board pinout](#pinout).
|
||||
- the [MCU](#esp32_olimex_esp32_evb_mcu),
|
||||
- the default [board configuration](#esp32_olimex_esp32_evb_board_configuration),
|
||||
- [optional hardware configurations](#esp32_olimex_esp32_evb_optional_hardware),
|
||||
- the [board pinout](#esp32_olimex_esp32_evb_pinout).
|
||||
|
||||
### <a name="mcu"> MCU </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_olimex_esp32_evb_toc)
|
||||
|
||||
### MCU {#esp32_olimex_esp32_evb_mcu}
|
||||
|
||||
Most features of the board are provided by the ESP32 SoC. For detailed
|
||||
information about the ESP32, see section \ref esp32_mcu_esp32 "MCU ESP32".
|
||||
|
||||
### <a name="board_configuration"> Board Configuration </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_olimex_esp32_evb_toc)
|
||||
|
||||
Olimex ESP32-EVB and Olimex ESP32-GATEWAY have the following on-board components:
|
||||
### Board Configuration {#esp32_olimex_esp32_evb_board_configuration}
|
||||
|
||||
Olimex ESP32-EVB and Olimex ESP32-GATEWAY have the following on-board
|
||||
components:
|
||||
|
||||
- Ethernet LAN interface
|
||||
- MicroSD card interface
|
||||
- IR interface (Olimex ESP32-EVB only)
|
||||
- CAN interface (Olimex ESP32-EVB only)
|
||||
- two Relais (Olimex ESP32-EVB only)
|
||||
- [UEXT](https://www.olimex.com/Products/Modules/UEXT/) connector with I2C, SPI and UART interfaces (Olimex ESP32-EVB only)
|
||||
- [UEXT](https://www.olimex.com/Products/Modules/UEXT/) connector with
|
||||
I2C, SPI and UART interfaces (Olimex ESP32-EVB only)
|
||||
|
||||
The following table shows the default board configuration, which is sorted according to the defined functionality of GPIOs. This configuration can be overridden by \ref esp32_application_specific_configurations "application-specific configurations".
|
||||
The following table shows the default board configuration, which is sorted
|
||||
according to the defined functionality of GPIOs. This configuration can be
|
||||
overridden by \ref esp32_application_specific_configurations
|
||||
"application-specific configurations".
|
||||
|
||||
<center>
|
||||
\anchor esp32_olimex-esp32-evb_table_board_configuration
|
||||
Pin | Configuration<b>*</b><br>ESP32-EVB | Configuration<b>*</b><br>ESP32-GATEWAY | Remarks / Prerequisites | Configuration
|
||||
Pin | Configuration\n ESP32-EVB | Configuration\n ESP32-GATEWAY | Remarks / Prerequisites | Configuration
|
||||
:------|:------------------|:-----------------|-|-|
|
||||
GPIO13 | I2C_DEV(0):SDA | SDCARD_CS | on ESP32-EVB available at [[UEXT1](https://www.olimex.com/Products/Modules/UEXT)] | \ref esp32_i2c_interfaces "I2C Interfaces"
|
||||
GPIO16 | I2C_DEV(0):SCL | I2C_DEV(0):SCL | on ESP32-EVB available at [[UEXT1](https://www.olimex.com/Products/Modules/UEXT)] | \ref esp32_i2c_interfaces "I2C Interfaces"
|
||||
GPIO14 | SPI_DEV(0):CLK | SDCARD_CLK | on ESP32-EVB available at [[UEXT1](https://www.olimex.com/Products/Modules/UEXT)] | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO2 | SPI_DEV(0):MISO | SDCARD_MISO | on ESP32-EVB available at [[UEXT1](https://www.olimex.com/Products/Modules/UEXT)] | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO15 | SPI_DEV(0):MOSI | SDCARD_MOSI | on ESP32-EVB available at [[UEXT1](https://www.olimex.com/Products/Modules/UEXT)] | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO17 | SPI_DEV(0):CS0 | I2C_DEV(0):SDA | on ESP32-EVB available at [[UEXT1](https://www.olimex.com/Products/Modules/UEXT)] | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO13 | I2C_DEV(0):SDA | SDCARD_CS | on ESP32-EVB available at [UEXT1](https://www.olimex.com/Products/Modules/UEXT) | \ref esp32_i2c_interfaces "I2C Interfaces"
|
||||
GPIO16 | I2C_DEV(0):SCL | I2C_DEV(0):SCL | on ESP32-EVB available at [UEXT1](https://www.olimex.com/Products/Modules/UEXT) | \ref esp32_i2c_interfaces "I2C Interfaces"
|
||||
GPIO14 | SPI_DEV(0):CLK | SDCARD_CLK | on ESP32-EVB available at [UEXT1](https://www.olimex.com/Products/Modules/UEXT) | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO2 | SPI_DEV(0):MISO | SDCARD_MISO | on ESP32-EVB available at [UEXT1](https://www.olimex.com/Products/Modules/UEXT) | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO15 | SPI_DEV(0):MOSI | SDCARD_MOSI | on ESP32-EVB available at [UEXT1](https://www.olimex.com/Products/Modules/UEXT) | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO17 | SPI_DEV(0):CS0 | I2C_DEV(0):SDA | on ESP32-EVB available at [UEXT1](https://www.olimex.com/Products/Modules/UEXT) | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO1 | UART_DEV(0):TxD | UART_DEV(0):TxD | Console (cannot be changed) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
GPIO3 | UART_DEV(0):RxD | UART_DEV(0):RxD | Console (cannot be changed) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
GPIO4 | UART_DEV(1):TxD | N/A | ESP32-EVB [[UEXT1](https://www.olimex.com/Products/Modules/UEXT)] | \ref esp32_uart_interfaces "UART interfaces"
|
||||
GPIO36 | UART_DEV(1):RxD | ADC_LINE(2) | on ESP32-EVB available at [[UEXT1](https://www.olimex.com/Products/Modules/UEXT)] | \ref esp32_uart_interfaces "UART interfaces"
|
||||
GPIO4 | UART_DEV(1):TxD | N/A | on ESP32-EVB available at [UEXT1](https://www.olimex.com/Products/Modules/UEXT) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
GPIO36 | UART_DEV(1):RxD | ADC_LINE(2) | on ESP32-EVB available at [UEXT1](https://www.olimex.com/Products/Modules/UEXT) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
GPIO32 | Relais 1 | ADC_LINE(0) | | \ref esp32_adc_channels "ADC Channels"
|
||||
GPIO33 | Relais 2 | LED0 | | |
|
||||
GPIO34 | BUTTON0 | BUTTON0 | | |
|
||||
@ -102,22 +121,35 @@ GPIO25 | EMAC_RMII:RXD0 | EMAC_RMII:RXD0 | LAN interface | \ref esp32_ether
|
||||
GPIO26 | EMAC_RMII:RXD1 | EMAC_RMII:RXD1 | LAN interface | \ref esp32_ethernet_network_interface "Ethernet MAC"
|
||||
GPIO27 | EMAC_RMII:RX_DV | EMAC_RMII:RX_DV | LAN interface | \ref esp32_ethernet_network_interface "Ethernet MAC"
|
||||
</center>
|
||||
\n
|
||||
|
||||
@note
|
||||
- To use the board configuration for Olimex-ESP32-GATEWAY, it is necessary to add the following line to makefile of the application:<br><br>
|
||||
```
|
||||
To use the board configuration for Olimex-ESP32-GATEWAY, it is necessary
|
||||
to add the following line to makefile of the application:
|
||||
\n
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE += olimex_esp32_gateway
|
||||
```
|
||||
- GPIO9 and GIOP10 can only be used in **dout** and **dio** \ref esp32_flash_modes "flash modes".
|
||||
- It might be necessary to remove the SD card or the peripheral hardware attached to the SPI_DEV(0) interface for flashing RIOT. Reason is that the **SPI_DEV(0)** interface uses the HSPI interface with the GPIO2 pin as the MISO signal, which has bootstrapping functionality.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
- GPIO9 and GIOP10 can only be used in **dout** and **dio**
|
||||
\ref esp32_flash_modes "flash modes".
|
||||
- It might be necessary to remove the SD card or the peripheral hardware
|
||||
attached to the SPI_DEV(0) interface for flashing RIOT. Reason is that
|
||||
the **SPI_DEV(0)** interface uses the HSPI interface with the GPIO2 pin
|
||||
as the MISO signal, which has bootstrapping functionality.
|
||||
|
||||
For detailed information about the configuration of ESP32 boards, see section \ref esp32_peripherals "Common Peripherals".
|
||||
For detailed information about the configuration of ESP32 boards, see
|
||||
section \ref esp32_peripherals "Common Peripherals".
|
||||
|
||||
### <a name="optional_hardware"> Optional Hardware Configurations </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_olimex_esp32_evb_toc)
|
||||
|
||||
MRF24J40-based IEEE 802.15.4 radio modules have been tested with the board. You could use the following code in your \ref esp32_application_specific_configurations "application-specific configuration" to use such modules:
|
||||
### Optional Hardware Configurations {#esp32_olimex_esp32_evb_optional_hardware}
|
||||
|
||||
```
|
||||
MRF24J40-based IEEE 802.15.4 radio modules have been tested with the board.
|
||||
You could use the following code in your
|
||||
\ref esp32_application_specific_configurations
|
||||
"application-specific configuration" to use such modules:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#ifdef BOARD_ESP32_OLIMEX_EVB && !MODULE_ESP32_OLIMEX_GATEWAY
|
||||
|
||||
#if MODULE_MRF24J40
|
||||
@ -127,29 +159,50 @@ MRF24J40-based IEEE 802.15.4 radio modules have been tested with the board. You
|
||||
#endif
|
||||
|
||||
#endif
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For other parameters, the default values defined by the drivers can be used.
|
||||
|
||||
@note
|
||||
- Since the Olimex-ESP32-GATEWAY does not break out the GPIO of the HSPI interface SPI_DEV(0), it is not possible to connect such module to Olimex-ESP32-GATEWAY.
|
||||
- Since the Olimex-ESP32-EVB has a lot of on-board hardware, only a few GPIOs are available for external hardware.
|
||||
- The **RESET** signal of MRF24J40 based modules can also be connected to the **RST** pin of the board (see \ref esp32_olimex-esp32-evb_pinout "pinout") to keep the configured GPIO free for other purposes.
|
||||
- Since the Olimex-ESP32-GATEWAY does not break out the GPIO of the HSPI
|
||||
interface SPI_DEV(0), it is not possible to connect such module to
|
||||
Olimex-ESP32-GATEWAY.
|
||||
- Since the Olimex-ESP32-EVB has a lot of on-board hardware, only a few
|
||||
GPIOs are available for external hardware.
|
||||
- The **RESET** signal of MRF24J40 based modules can also be connected
|
||||
to the **RST** pin of the board (see \ref esp32_olimex_esp32_evb_pinout_img
|
||||
"pinout") to keep the configured GPIO free for other purposes.
|
||||
|
||||
### <a name="pinout"> Board Pinout </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_olimex_esp32_evb_toc)
|
||||
|
||||
The following pictures shows the pinout of Olimex ESP32-EVB and Olimex ESP32-GATEWAY boards as defined by the default board configuration. The light green GPIOs are not used by configured on-board hardware components and can be used for any purpose. However, if optional off-board hardware modules are used, these GPIOs may also be occupied, see \ref esp32_olimex-esp32-evb_table_board_configuration "optional functions" in table board configuration.
|
||||
### Board Pinout {#esp32_olimex_esp32_evb_pinout}
|
||||
|
||||
The corresponding board schematics can be found on GitHub for [Olimex ESP32-EVB board](https://github.com/OLIMEX/ESP32-EVB/raw/master/HARDWARE/REV-D/ESP32-EVB_Rev_D.pdf) and for [Olimex ESP32-GATEWAY](https://github.com/OLIMEX/ESP32-GATEWAY/raw/master/HARDWARE/Hardware%20revision%20C/ESP32-GATEWAY_Rev_C.pdf).
|
||||
The following pictures shows the pinout of Olimex ESP32-EVB and
|
||||
Olimex ESP32-GATEWAY boards as defined by the default board configuration.
|
||||
The light green GPIOs are not used by configured on-board hardware components
|
||||
and can be used for any purpose. However, if optional off-board hardware
|
||||
modules are used, these GPIOs may also be occupied, see section
|
||||
\ref esp32_olimex_esp32_evb_board_configuration for more information.
|
||||
|
||||
\anchor esp32_olimex-esp32-evb_pinout
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/Olimex_ESP32-EVB_pinout.png?inline=false" "Olimex ESP32-EVB pinout"
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/Olimex_ESP32-GATEWAY_pinout.png?inline=false" "Olimex ESP32-GATEWAY pinout"
|
||||
The corresponding board schematics can be found on GitHub for
|
||||
[Olimex ESP32-EVB board](https://github.com/OLIMEX/ESP32-EVB/raw/master/HARDWARE/REV-D/ESP32-EVB_Rev_D.pdf) and for
|
||||
[Olimex ESP32-GATEWAY](https://github.com/OLIMEX/ESP32-GATEWAY/raw/master/HARDWARE/Hardware%20revision%20C/ESP32-GATEWAY_Rev_C.pdf).
|
||||
|
||||
## <a name="flashing"> Flashing the Device </a> [[TOC](#toc)]
|
||||
\anchor esp32_olimex_esp32_evb_pinout_img
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/Olimex_ESP32-EVB_pinout.png" "Olimex ESP32-EVB pinout"
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/Olimex_ESP32-GATEWAY_pinout.png" "Olimex ESP32-GATEWAY pinout"
|
||||
|
||||
Flashing RIOT is quite easy. The board has a Micro-USB connector with reset/boot/flash logic. Just connect the board to your host computer and type using the programming port:
|
||||
```
|
||||
[Back to table of contents](#esp32_olimex_esp32_evb_toc)
|
||||
|
||||
## Flashing the Device {#esp32_olimex_esp32_evb_flashing}
|
||||
|
||||
Flashing RIOT is quite easy. The board has a Micro-USB connector with
|
||||
reset/boot/flash logic. Just connect the board to your host computer and
|
||||
type using the programming port:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make flash BOARD=esp32-olimex-evb ...
|
||||
```
|
||||
For detailed information about ESP32 as well as configuring and compiling RIOT for ESP32 boards, see \ref esp32_riot.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For detailed information about ESP32 as well as configuring and compiling
|
||||
RIOT for ESP32 boards, see \ref esp32_riot.
|
||||
|
||||
[Back to table of contents](#esp32_olimex_esp32_evb_toc)
|
||||
*/
|
||||
|
@ -12,17 +12,19 @@
|
||||
* @brief Support for TTGO T-Beam boards
|
||||
* @author Yegor Yefremov <yegorslists@googlemail.com>
|
||||
|
||||
## <a name="toc"> Table of Contents </a>
|
||||
\section esp32_ttgo_t_beam TTGO T-Beam
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Hardware](#hardware)
|
||||
1. [MCU](#mcu)
|
||||
2. [Board Configuration](#board_configuration)
|
||||
3. [Board Pinout](#pinout)
|
||||
4. [Optional Hardware Configurations](#optional_hardware)
|
||||
3. [Flashing the Device](#flashing)
|
||||
## Table of Contents {#esp32_ttgo_t_beam_toc}
|
||||
|
||||
## <a name="overview"> Overview </a> [[TOC](#toc)]
|
||||
1. [Overview](#esp32_ttgo_t_beam_overview)
|
||||
2. [Hardware](#esp32_ttgo_t_beam_hardware)
|
||||
1. [MCU](#esp32_ttgo_t_beam_mcu)
|
||||
2. [Board Configuration](#esp32_ttgo_t_beam_board_configuration)
|
||||
3. [Board Pinout](#esp32_ttgo_t_beam_pinout)
|
||||
4. [Optional Hardware Configurations](#esp32_ttgo_t_beam_optional_hardware)
|
||||
3. [Flashing the Device](#esp32_ttgo_t_beam_flashing)
|
||||
|
||||
## Overview {#esp32_ttgo_t_beam_overview}
|
||||
|
||||
TTGO T-Beam is an ESP32 development board with 4 MB Flash that uses
|
||||
the EPS32 chip directly. It integrates:
|
||||
@ -35,25 +37,31 @@ rev0 and rev1 are very similar, the only difference is that rev1 has
|
||||
an additional LED connected to GPIO14. The pinout of V1.0 has more
|
||||
changes thus it is necessary to add the following line to the makefile
|
||||
of the application to use the according configuration for TTGO T-Beam V1.0:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE += esp32_ttgo_t_beam_v1_0
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
## <a name="hardware"> Hardware </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ttgo_t_beam_toc)
|
||||
|
||||
## Hardware {#esp32_ttgo_t_beam_hardware}
|
||||
|
||||
This section describes
|
||||
|
||||
- the [MCU](#mcu),
|
||||
- the default [board configuration](#board_configuration),
|
||||
- [optional hardware configurations](#optional_hardware),
|
||||
- the [board pinout](#pinout).
|
||||
- the [MCU](#esp32_ttgo_t_beam_mcu),
|
||||
- the default [board configuration](#esp32_ttgo_t_beam_board_configuration),
|
||||
- [optional hardware configurations](#esp32_ttgo_t_beam_optional_hardware),
|
||||
- the [board pinout](#esp32_ttgo_t_beam_pinout).
|
||||
|
||||
### <a name="mcu"> MCU </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ttgo_t_beam_toc)
|
||||
|
||||
### MCU {#esp32_ttgo_t_beam_mcu}
|
||||
|
||||
Most features of the board are provided by the ESP32 SoC. For detailed
|
||||
information about the ESP32, see section \ref esp32_mcu_esp32 "MCU ESP32".
|
||||
|
||||
### <a name="board_configuration"> Board Configuration </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ttgo_t_beam_toc)
|
||||
|
||||
### Board Configuration {#esp32_ttgo_t_beam_board_configuration}
|
||||
|
||||
TTGO T-Beam has the following on-board components:
|
||||
|
||||
@ -68,7 +76,8 @@ There are two hardware versions of the board:
|
||||
Since many GPIOs are broken out, they can be used for different purposes
|
||||
in different applications. For flexibility, some GPIOs might be listed in
|
||||
various peripheral configurations. For example, GPIO0 is used in the ADC
|
||||
channel definition \ref ADC_GPIOS and the PWM channel definition \ref PWM0_GPIOS.
|
||||
channel definition \ref ADC_GPIOS and the PWM channel definition
|
||||
\ref PWM0_GPIOS.
|
||||
|
||||
This is possible because GPIOs are only used for a specific peripheral
|
||||
interface when
|
||||
@ -88,17 +97,17 @@ unless you exactly know what you are doing.
|
||||
|
||||
The following table shows the default board configuration, which is sorted
|
||||
according to the defined functionality of GPIOs. This configuration can be
|
||||
overridden by \ref esp32_application_specific_configurations "application-specific configurations".
|
||||
overridden by \ref esp32_application_specific_configurations
|
||||
"application-specific configurations".
|
||||
|
||||
TTGO- T-Beam rev1
|
||||
|
||||
<center>
|
||||
\anchor esp32_ttgo_t_beam_rev1_table_board_configuration
|
||||
Function | GPIOs | Remarks |Configuration
|
||||
:---------------|:-------|:--------|:----------------------------------
|
||||
BUTTON0 | GPIO39 | low active | |
|
||||
LED0 | GPIO14 | high active | |
|
||||
ADC | GPIO0, GPIO2, GPIO4, GPIO13,<br>GPIO25, GPIO32, GPIO33, GPIO34,<br>GPIO35 | | \ref esp32_adc_channels "ADC Channels"
|
||||
ADC | GPIO0, GPIO2, GPIO4, GPIO13,\n GPIO25, GPIO32, GPIO33, GPIO34,\n GPIO35 | | \ref esp32_adc_channels "ADC Channels"
|
||||
DAC | GPIO25 | | \ref esp32_dac_channels "DAC Channels"
|
||||
PWM_DEV(0) | GPIO0, GPIO2, GPIO25 | | \ref esp32_pwm_channels "PWM Channels"
|
||||
I2C_DEV(0):SDA | GPIO21 | | \ref esp32_i2c_interfaces "I2C Interfaces"
|
||||
@ -116,11 +125,10 @@ UART_DEV(1):RxD | GPIO12 | GPS (configuration is fixed) | \ref esp32_uart_interf
|
||||
TTGO- T-Beam V1.0
|
||||
|
||||
<center>
|
||||
\anchor esp32_ttgo_t_beam_v1_0_table_board_configuration
|
||||
Function | GPIOs | Remarks |Configuration
|
||||
:---------------|:-------|:--------|:----------------------------------
|
||||
BUTTON0 | GPIO38 | low active | |
|
||||
ADC | GPIO0, GPIO2, GPIO4, GPIO13,<br>GPIO25, GPIO32, GPIO33, GPIO35 | | \ref esp32_adc_channels "ADC Channels"
|
||||
ADC | GPIO0, GPIO2, GPIO4, GPIO13,\n GPIO25, GPIO32, GPIO33, GPIO35 | | \ref esp32_adc_channels "ADC Channels"
|
||||
DAC | GPIO25 | | \ref esp32_dac_channels "DAC Channels"
|
||||
PWM_DEV(0) | GPIO0, GPIO2, GPIO25 | | \ref esp32_pwm_channels "PWM Channels"
|
||||
I2C_DEV(0):SDA | GPIO21 | | \ref esp32_i2c_interfaces "I2C Interfaces"
|
||||
@ -134,8 +142,8 @@ UART_DEV(0):RxD | GPIO3 | Console (configuration is fixed) | \ref esp32_uart_in
|
||||
UART_DEV(1):TxD | GPIO34 | GPS (configuration is fixed) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
UART_DEV(1):RxD | GPIO12 | GPS (configuration is fixed) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
</center>
|
||||
\n
|
||||
|
||||
<br>
|
||||
@note
|
||||
- The configuration of ADC channels contains all ESP32 GPIOs that can be used
|
||||
as ADC channels.
|
||||
@ -143,23 +151,34 @@ UART_DEV(1):RxD | GPIO12 | GPS (configuration is fixed) | \ref esp32_uart_interf
|
||||
For detailed information about the configuration of ESP32 boards, see
|
||||
section \ref esp32_peripherals "Common Peripherals".
|
||||
|
||||
### <a name="pinout"> Board Pinout </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ttgo_t_beam_toc)
|
||||
|
||||
The following figures show the pinout of the defined default configurations for TTGO T-Beam boards.
|
||||
### Board Pinout {#esp32_ttgo_t_beam_pinout}
|
||||
|
||||
The following figures show the pinout of the defined default configurations
|
||||
for TTGO T-Beam boards.
|
||||
|
||||
\anchor esp32_ttgo_t_beam_rev1_pinout
|
||||
@image html "https://ae01.alicdn.com/kf/HTB1OhPmXtzvK1RkSnfoq6zMwVXah.jpg" "TTGO T-Beam rev1 Pintout Diagram"
|
||||
|
||||
\anchor esp32_ttgo_t_beam_v1_0_pinout
|
||||
@image html "https://ae01.alicdn.com/kf/Hee7e9a85bb294351952a073325e6b2f96.jpg" "TTGO T-Beam V1.0 Pintout Diagram"
|
||||
|
||||
The corresponding board schematics can be found on TinyMicros.com for [TTGO T-Beam rev0](http://tinymicros.com/mediawiki/images/b/b9/TTGO_T-Beam_Schematic.pdf) and GitHub for [TTGO T-Beam V1.0](https://github.com/Xinyuan-LilyGO/TTGO-T-Beam/raw/master/schematic/T_BeamV1.0.pdf)
|
||||
The corresponding board schematics can be found on TinyMicros.com for
|
||||
[TTGO T-Beam rev0](http://tinymicros.com/mediawiki/images/b/b9/TTGO_T-Beam_Schematic.pdf)
|
||||
and GitHub for
|
||||
[TTGO T-Beam V1.0](https://github.com/Xinyuan-LilyGO/LilyGo-LoRa-Series/blob/master/schematic/LilyGo_TBeam_V1.0.pdf)
|
||||
|
||||
## <a name="flashing"> Flashing the Device </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_ttgo_t_beam_toc)
|
||||
|
||||
Flashing RIOT is quite easy. The board has a Micro-USB connector with reset/boot/flash logic. Just connect the board to your host computer and type using the programming port:
|
||||
```
|
||||
## Flashing the Device {#esp32_ttgo_t_beam_flashing}
|
||||
|
||||
Flashing RIOT is quite easy. The board has a Micro-USB connector with
|
||||
reset/boot/flash logic. Just connect the board to your host computer and type
|
||||
using the programming port:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make flash BOARD=esp32-ttgo-t-beam ...
|
||||
```
|
||||
For detailed information about ESP32 as well as configuring and compiling RIOT for ESP32 boards, see \ref esp32_riot.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For detailed information about ESP32 as well as configuring and compiling
|
||||
RIOT for ESP32 boards, see \ref esp32_riot.
|
||||
|
||||
[Back to table of contents](#esp32_ttgo_t_beam_toc)
|
||||
*/
|
||||
|
@ -12,47 +12,55 @@
|
||||
* @brief Support for Wemos LOLIN D32 Pro
|
||||
* @author Gunar Schorcht <gunar@schorcht.net>
|
||||
|
||||
## <a name="toc"> Table of Contents </a>
|
||||
\section esp32_wemos_lolin_d32_pro Wemos LOLIN D32 Pro
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Hardware](#hardware)
|
||||
1. [MCU](#mcu)
|
||||
2. [Board Configuration](#board_configuration)
|
||||
3. [Board Pinout](#pinout)
|
||||
4. [Optional Hardware Configurations](#optional_hardware)
|
||||
3. [Flashing the Device](#flashing)
|
||||
## Table of Contents {#esp32_wemos_lolin_d32_pro_toc}
|
||||
|
||||
## <a name="overview"> Overview </a> [[TOC](#toc)]
|
||||
1. [Overview](#esp32_wemos_lolin_d32_pro_overview)
|
||||
2. [Hardware](#esp32_wemos_lolin_d32_pro_hardware)
|
||||
1. [MCU](#esp32_wemos_lolin_d32_pro_mcu)
|
||||
2. [Board Configuration](#esp32_wemos_lolin_d32_pro_board_configuration)
|
||||
3. [Board Pinout](#esp32_wemos_lolin_d32_pro_pinout)
|
||||
4. [Optional Hardware Configurations]
|
||||
(#esp32_wemos_lolin_d32_pro_optional_hardware)
|
||||
3. [Flashing the Device](#esp32_wemos_lolin_d32_pro_flashing)
|
||||
|
||||
Wemos LOLIN D32 Pro is a development board that uses the ESP32-WROVER module which has a built-in 4 MByte SPI RAM. Most important features of the board are
|
||||
## Overview {#esp32_wemos_lolin_d32_pro_overview}
|
||||
|
||||
Wemos LOLIN D32 Pro is a development board that uses the ESP32-WROVER module
|
||||
which has a built-in 4 MByte SPI RAM. Most important features of the board are
|
||||
|
||||
- Micro-SD card interface
|
||||
- TFT display interface
|
||||
- SPI RAM 4 MByte
|
||||
|
||||
Wemos LOLIN D32 Pro belongs to the class of general purpose boards where most ESP32 pins are broken out for easier access.
|
||||
Wemos LOLIN D32 Pro belongs to the class of general purpose boards where most
|
||||
ESP32 pins are broken out for easier access.
|
||||
|
||||
\htmlonly<style>div.image
|
||||
img[src="https://docs.wemos.cc/en/latest/_static/boards/d32_pro_v2.0.0_1_16x16.jpg"]
|
||||
{width:400px;}</style>\endhtmlonly
|
||||
@image html
|
||||
"https://docs.wemos.cc/en/latest/_static/boards/d32_pro_v2.0.0_1_16x16.jpg" "Wemos LOLIN D32 PRO"
|
||||
"https://docs.wemos.cc/en/latest/_static/boards/d32_pro_v2.0.0_1_16x16.jpg" "Wemos LOLIN D32 PRO" width=400px
|
||||
|
||||
## <a name="hardware"> Hardware </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_wemos_lolin_d32_pro_toc)
|
||||
|
||||
## Hardware {#esp32_wemos_lolin_d32_pro_hardware}
|
||||
|
||||
This section describes
|
||||
|
||||
- the [MCU](#mcu),
|
||||
- the default [board configuration](#board_configuration),
|
||||
- [optional hardware configurations](#optional_hardware),
|
||||
- the [board pinout](#pinout).
|
||||
- the [MCU](#esp32_wemos_lolin_d32_pro_mcu),
|
||||
- the default [board configuration](#esp32_wemos_lolin_d32_pro_board_configuration),
|
||||
- [optional hardware configurations](#esp32_wemos_lolin_d32_pro_optional_hardware),
|
||||
- the [board pinout](#esp32_wemos_lolin_d32_pro_pinout).
|
||||
|
||||
### <a name="mcu"> MCU </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_wemos_lolin_d32_pro_toc)
|
||||
|
||||
### MCU {#esp32_wemos_lolin_d32_pro_mcu}
|
||||
|
||||
Most features of the board are provided by the ESP32 SoC. For detailed
|
||||
information about the ESP32, see section \ref esp32_mcu_esp32 "MCU ESP32".
|
||||
|
||||
### <a name="board_configuration"> Board Configuration </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_wemos_lolin_d32_pro_toc)
|
||||
|
||||
### Board Configuration {#esp32_wemos_lolin_d32_pro_board_configuration}
|
||||
|
||||
The board for the Wemos LOLIN D32 Pro has the following on-board components:
|
||||
|
||||
@ -60,11 +68,13 @@ The board for the Wemos LOLIN D32 Pro has the following on-board components:
|
||||
- 1 x Micro SD card interface
|
||||
- 1 x TFT display connector
|
||||
|
||||
The following table shows the default board configuration, which is sorted according to the defined functionality of GPIOs. This configuration can be overridden by an \ref esp32_application_specific_configurations "application-specific configuration".
|
||||
The following table shows the default board configuration, which is sorted
|
||||
according to the defined functionality of GPIOs. This configuration can be
|
||||
overridden by an \ref esp32_application_specific_configurations
|
||||
"application-specific configuration".
|
||||
|
||||
<center>
|
||||
\anchor esp32_wemos-lolin-d32-pro_table_board_configuration
|
||||
Pin | Default Configuration<b>*</b> | Optional Configuration<b>*</b> | Remarks / Prerequisites | Configuration
|
||||
Pin | Default Configuration* | Optional Configuration | Remarks / Prerequisites | Configuration
|
||||
:------|:-----------------|:--------------------|:--------------|:-------------
|
||||
GPIO22 | I2C_DEV(0):SCL | | | \ref esp32_i2c_interfaces "I2C Interfaces"
|
||||
GPIO21 | I2C_DEV(0):SDA | | | \ref esp32_i2c_interfaces "I2C Interfaces"
|
||||
@ -72,7 +82,7 @@ GPIO18 | SPI_DEV(0):SCK | | | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO19 | SPI_DEV(0):MISO | | | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO23 | SPI_DEV(0):MOSI | | | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO5 | SPI_DEV(0):CS0 / LED0 | | | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO4 | SPI_DEV(0):CS1 | SD Card CS | when module [sdcard_spi](https://riot-os.org/api/group__drivers__sdcard__spi.html) is used | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO4 | SPI_DEV(0):CS1 | SD Card CS | when module \ref drivers_sdcard_spi "sdcard_spi" is used | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||
GPIO1 | UART_DEV(0):TxD | | Console (configuration is fixed) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
GPIO3 | UART_DEV(0):RxD | | Console (configuration is fixed) | \ref esp32_uart_interfaces "UART interfaces"
|
||||
GPIO36 | ADC_LINE(0) | | | \ref esp32_adc_channels "ADC Channels"
|
||||
@ -83,29 +93,39 @@ GPIO32 | ADC_LINE(4) | TFT_LED | when TFT is connected | \ref esp32_adc_channel
|
||||
GPIO33 | ADC_LINE(5) | TFT_RESET| when TFT is connected | \ref esp32_adc_channels "ADC Channels"
|
||||
GPIO25 | DAC_LINE(0) | | | \ref esp32_dac_channels "DAC Channels"
|
||||
GPIO26 | DAC_LINE(1) | | | \ref esp32_dac_channels "DAC Channels"
|
||||
GPIO0 | PWM_DEV(0):0| MRF24J40/ENC28J60 RESET | when module [mrf24j40](https://riot-os.org/api/group__drivers__mrf24j40.html)/[enc2860](https://riot-os.org/api/group__drivers__enc28j60.html) is used | \ref esp32_pwm_channels "PWM Channels"
|
||||
GPIO2 | PWM_DEV(0):1| MRF24J40/ENC28J60 CS | when module [mrf24j40](https://riot-os.org/api/group__drivers__mrf24j40.html)/[enc2860](https://riot-os.org/api/group__drivers__enc28j60.html) is used | \ref esp32_pwm_channels "PWM Channels"
|
||||
GPIO13 | - | MRF24J40/ENC28J60 INT | when module [mrf24j40](https://riot-os.org/api/group__drivers__mrf24j40.html)/[enc2860](https://riot-os.org/api/group__drivers__enc28j60.html) is used | |
|
||||
GPIO0 | PWM_DEV(0):0| MRF24J40/ENC28J60 RESET | when module \ref drivers_mrf24j40 "mrf24j40"/\ref drivers_enc28j60 "enc28j60" is used | \ref esp32_pwm_channels "PWM Channels"
|
||||
GPIO2 | PWM_DEV(0):1| MRF24J40/ENC28J60 CS | when module \ref drivers_mrf24j40 "mrf24j40"/\ref drivers_enc28j60 "enc28j60" is used | \ref esp32_pwm_channels "PWM Channels"
|
||||
GPIO13 | - | MRF24J40/ENC28J60 INT | when module \ref drivers_mrf24j40 "mrf24j40"/\ref drivers_enc28j60 "enc28j60" is used | |
|
||||
GPIO15 | - | | | |
|
||||
GPIO12 | - | TS_CS | when TFT is connected | |
|
||||
GPIO14 | - | TFT_CS | when TFT is connected | |
|
||||
GPIO27 | - | TFT_DC | when TFT is connected | |
|
||||
</center>
|
||||
|
||||
<b>*</b> Default configuration cannot be used or is not available at all when optional configuration is used. For example, when the TFT is connected, GPIO32 is used as **TFT_LED** signal and ADC_LINE(4) is not available.
|
||||
\b * Default configuration cannot be used or is not available at all when
|
||||
optional configuration is used. For example, when the TFT is connected,
|
||||
GPIO32 is used as **TFT_LED** signal and ADC_LINE(4) is not available.
|
||||
|
||||
@note When the TFT display is connected, add the following line to the makefile of the application to enable the according default board and peripheral configuration:<br>
|
||||
```
|
||||
@note When the TFT display is connected, add the following line to the
|
||||
makefile of the application to enable the according default board and
|
||||
peripheral configuration:
|
||||
\n
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE += esp_lolin_tft
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
For detailed information about the configuration of ESP32 boards, see section \ref esp32_peripherals "Common Peripherals".
|
||||
|
||||
### <a name="optional_hardware"> Optional Hardware Configurations </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_wemos_lolin_d32_pro_toc)
|
||||
|
||||
MRF24J40-based IEEE 802.15.4 radio modules and ENC28J60-based Ethernet network interface modules have been tested with the board. You could use the following code in your \ref esp32_application_specific_configurations "application-specific configuration" to use such modules:
|
||||
### Optional Hardware Configurations {#esp32_wemos_lolin_d32_pro_optional_hardware}
|
||||
|
||||
```
|
||||
MRF24J40-based IEEE 802.15.4 radio modules and ENC28J60-based Ethernet
|
||||
network interface modules have been tested with the board. You could use
|
||||
the following code in your \ref esp32_application_specific_configurations
|
||||
"application-specific configuration" to use such modules:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#ifdef BOARD_ESP32_WEMOS_LOLIN_D32_PRO
|
||||
|
||||
#if MODULE_MRF24J40
|
||||
@ -121,29 +141,47 @@ MRF24J40-based IEEE 802.15.4 radio modules and ENC28J60-based Ethernet network i
|
||||
#endif
|
||||
|
||||
#endif
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For other parameters, the default values defined by the drivers can be used.
|
||||
|
||||
@note
|
||||
- Only a few GPIOs are available for external hardware on the Wemos LOLIN D32 PRO. Therefore, MRF24J40 and ENC28J60 based modules use the same GPIOs and only one of these modules can be used simultaneously.
|
||||
- The **RESET** signal of MRF24J40 and ENC28J60 based modules can also be connected to the **RST** pin of the board (see \ref esp32_wemos-lolin-d32-pro_pinout "pinout") to keep the configured GPIO free for other purposes.
|
||||
- Only a few GPIOs are available for external hardware on the
|
||||
Wemos LOLIN D32 PRO. Therefore, MRF24J40 and ENC28J60 based modules use
|
||||
the same GPIOs and only one of these modules can be used simultaneously.
|
||||
- The **RESET** signal of MRF24J40 and ENC28J60 based modules can also be
|
||||
connected to the **RST** pin of the board (see
|
||||
\ref esp32_wemos_lolin_d32_pro_pinout_img "pinout") to keep the configured
|
||||
GPIO free for other purposes.
|
||||
|
||||
### <a name="pinout"> Board Pinout </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_wemos_lolin_d32_pro_toc)
|
||||
|
||||
The following picture shows the pinout of WEMOS LOLIN D32 PRO board as defined by the default board configuration. The light green GPIOs are not used by configured on-board hardware components and can be used for any purpose. However, if optional off-board hardware modules are used, these GPIOs may also be occupied, see \ref esp32_wemos-lolin-d32-pro_table_board_configuration "optional functions" in table board configuration.
|
||||
### Board Pinout {#esp32_wemos_lolin_d32_pro_pinout}
|
||||
|
||||
The following picture shows the pinout of WEMOS LOLIN D32 PRO board as
|
||||
defined by the default board configuration. The light green GPIOs are
|
||||
not used by configured on-board hardware components and can be used for
|
||||
any purpose. However, if optional off-board hardware modules are used,
|
||||
these GPIOs may also be occupied, see section
|
||||
\ref esp32_wemos_lolin_d32_pro_board_configuration for more information.
|
||||
|
||||
The corresponding board schematic can be found [here]
|
||||
(https://docs.wemos.cc/en/latest/_static/files/sch_d32_pro_v2.0.0.pdf).
|
||||
|
||||
\anchor esp32_wemos-lolin-d32-pro_pinout
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/Wemos_LOLIN_D32_PRO_pinout.png?inline=false" "Wemos LOLIN D32 PRO pinout"
|
||||
\anchor esp32_wemos_lolin_d32_pro_pinout_img
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/Wemos_LOLIN_D32_PRO_pinout.png" "Wemos LOLIN D32 PRO pinout"
|
||||
|
||||
## <a name="flashing"> Flashing the Device </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_wemos_lolin_d32_pro_toc)
|
||||
|
||||
Flashing RIOT is quite easy. The board has a Micro-USB connector with reset/boot/flash logic. Just connect the board to your host computer using the programming port and type:
|
||||
```
|
||||
## Flashing the Device {#esp32_wemos_lolin_d32_pro_flashing}
|
||||
|
||||
Flashing RIOT is quite easy. The board has a Micro-USB connector with
|
||||
reset/boot/flash logic. Just connect the board to your host computer
|
||||
using the programming port and type:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make flash BOARD=esp32-wemos-lolin-d32-pro ...
|
||||
```
|
||||
For detailed information about ESP32 as well as configuring and compiling RIOT for ESP32 boards, see \ref esp32_riot.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For detailed information about ESP32 as well as configuring and compiling
|
||||
RIOT for ESP32 boards, see \ref esp32_riot.
|
||||
|
||||
[Back to table of contents](#esp32_wemos_lolin_d32_pro_toc)
|
||||
*/
|
||||
|
@ -12,40 +12,53 @@
|
||||
* @brief Support for generic ESP32-WROOM-32 boards
|
||||
* @author Gunar Schorcht <gunar@schorcht.net>
|
||||
|
||||
## <a name="toc"> Table of Contents </a>
|
||||
\section esp32_wroom_32 ESP32-WROOM-32 based boards
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Hardware](#hardware)
|
||||
1. [MCU](#mcu)
|
||||
2. [Board Configuration](#board_configuration)
|
||||
3. [Board Pinout](#pinout)
|
||||
4. [Optional Hardware Configurations](#optional_hardware)
|
||||
3. [Flashing the Device](#flashing)
|
||||
## Table of Contents {#esp32_wroom_32_toc}
|
||||
|
||||
## <a name="overview"> Overview </a> [[TOC](#toc)]
|
||||
1. [Overview](#esp32_wroom_32_overview)
|
||||
2. [Hardware](#esp32_wroom_32_hardware)
|
||||
1. [MCU](#esp32_wroom_32_mcu)
|
||||
2. [Board Configuration](#esp32_wroom_32_board_configuration)
|
||||
3. [Board Pinout](#esp32_wroom_32_pinout)
|
||||
4. [Optional Hardware Configurations](#esp32_wroom_32_optional_hardware)
|
||||
3. [Flashing the Device](#esp32_wroom_32_flashing)
|
||||
|
||||
This board definition covers not just a single board, but rather a large set of generic boards that use an ESP32-WROOM-32 module and simply break out all GPIOs to external pads without having any special hardware or interfaces on-board. Examples are Espressif's ESP32-DevKitC or NodeMCU-ESP32S and a large number of clones.
|
||||
## Overview {#esp32_wroom_32_overview}
|
||||
|
||||
\htmlonly<style>div.image img[src="https://dl.espressif.com/dl/schematics/pictures/esp32-devkitc-v4-front.jpg"]{width:400px;}</style>\endhtmlonly
|
||||
\image html "https://dl.espressif.com/dl/schematics/pictures/esp32-devkitc-v4-front.jpg" "Espressif ESP32-DevKitC V4"
|
||||
This board definition covers not just a single board, but rather a large set
|
||||
of generic boards that use an ESP32-WROOM-32 module and simply break out all
|
||||
GPIOs to external pads without having any special hardware or interfaces
|
||||
on-board. Examples are Espressif's ESP32-DevKitC or NodeMCU-ESP32S and a
|
||||
large number of clones.
|
||||
|
||||
## <a name="hardware"> Hardware </a> [[TOC](#toc)]
|
||||
\image html "https://dl.espressif.com/dl/schematics/pictures/esp32-devkitc-v4-front.jpg" "Espressif ESP32-DevKitC V4" width=400px
|
||||
|
||||
[Back to table of contents](#esp32_wroom_32_toc)
|
||||
|
||||
## Hardware {#esp32_wroom_32_hardware}
|
||||
|
||||
This section describes
|
||||
|
||||
- the [MCU](#mcu),
|
||||
- the default [board configuration](#board_configuration),
|
||||
- [optional hardware configurations](#optional_hardware),
|
||||
- the [board pinout](#pinout).
|
||||
- the [MCU](#esp32_wroom_32_mcu),
|
||||
- the default [board configuration](#esp32_wroom_32_board_configuration),
|
||||
- [optional hardware configurations](#esp32_wroom_32_optional_hardware),
|
||||
- the [board pinout](#esp32_wroom_32_pinout).
|
||||
|
||||
### <a name="mcu"> MCU </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_wroom_32_toc)
|
||||
|
||||
### MCU {#esp32_wroom_32_mcu}
|
||||
|
||||
Most features of the board are provided by the ESP32 SoC. For detailed
|
||||
information about the ESP32, see section \ref esp32_mcu_esp32 "MCU ESP32".
|
||||
|
||||
### <a name="board_configuration"> Board Configuration </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_wroom_32_toc)
|
||||
|
||||
Generic ESP32-WROOM-32 boards do not have special hardware on board and all GPIOs are simply broken out for flexibility. Therefore, the board configuration is the most flexible one with provides:
|
||||
### Board Configuration {#esp32_wroom_32_board_configuration}
|
||||
|
||||
Generic ESP32-WROOM-32 boards do not have special hardware on board and all
|
||||
GPIOs are simply broken out for flexibility. Therefore, the board
|
||||
configuration is the most flexible one with provides:
|
||||
|
||||
18 x ADC channels at maximum
|
||||
2 x DAC channels at maximum
|
||||
@ -53,26 +66,36 @@ Generic ESP32-WROOM-32 boards do not have special hardware on board and all GPIO
|
||||
1 x I2C at maximum
|
||||
2 x UART
|
||||
|
||||
Since all GPIOs have broken out, GPIOs can be used for different purposes in different applications. For flexibility, GPIOs can be listed in various peripheral configurations. For example, GPIO13 is used in the ADC channel definition and the definition of the MOSI signal of SPI_DEV(0).
|
||||
Since all GPIOs have broken out, GPIOs can be used for different purposes
|
||||
in different applications. For flexibility, GPIOs can be listed in various
|
||||
peripheral configurations. For example, GPIO13 is used in the ADC channel
|
||||
definition and the definition of the MOSI signal of SPI_DEV(0).
|
||||
|
||||
This is possible because GPIOs are only used for a specific peripheral interface when
|
||||
This is possible because GPIOs are only used for a specific peripheral
|
||||
interface when
|
||||
|
||||
- the corresponding peripheral module is used, eg. periph_i2c, or
|
||||
- a corresponding init function is called z. adc_init, dac_init and pwm_init or
|
||||
- The corresponding peripheral interface is used for the first time, eg. spi_aqcuire.
|
||||
- the corresponding peripheral module is used, e.g. `periph_i2c`, or
|
||||
- a corresponding init function is called z. `adc_init`, `dac_init` and
|
||||
`pwm_init` or
|
||||
- The corresponding peripheral interface is used for the first time,
|
||||
e.g. `spi_aqcuire.
|
||||
|
||||
That is, the purpose for which a GPIO is used depends on which module or function is used first.
|
||||
That is, the purpose for which a GPIO is used depends on which module
|
||||
or function is used first.
|
||||
|
||||
For example, if module periph_i2c is not used, the GPIOs listed in I2C configuration can be used for the other purposes.
|
||||
For example, if module periph_i2c is not used, the GPIOs listed in I2C
|
||||
configuration can be used for the other purposes.
|
||||
|
||||
The following table shows the default board configuration, which is sorted according to the defined functionality of GPIOs. This configuration can be overridden by \ref esp32_application_specific_configurations "application-specific configurations".
|
||||
The following table shows the default board configuration, which is sorted
|
||||
according to the defined functionality of GPIOs. This configuration can be
|
||||
overridden by \ref esp32_application_specific_configurations
|
||||
"application-specific configurations".
|
||||
|
||||
<center>
|
||||
\anchor esp32_wroom_32_table_board_configuration
|
||||
Function | GPIOs | Remarks |Configuration
|
||||
:---------------|:-------|:--------|:----------------------------------
|
||||
BUTTON0 | GPIO0 | | |
|
||||
ADC | GPIO0, GPIO2, GPIO4, GPIO12, GPIO13, <br> GPIO14, GPIO15, GPIO25, GPIO26, GPIO27, <br> GPIO32, GPIO33, GPIO34, GPIO35, GPIO36, <br> GPIO39 | | see \ref esp32_adc_channels "ADC Channels"
|
||||
ADC | GPIO0, GPIO2, GPIO4, GPIO12, GPIO13,\n GPIO14, GPIO15, GPIO25, GPIO26, GPIO27,\n GPIO32, GPIO33, GPIO34, GPIO35, GPIO36,\n GPIO39 | | see \ref esp32_adc_channels "ADC Channels"
|
||||
DAC | GPIO25, GPIO26 | | \ref esp32_dac_channels "refer"
|
||||
PWM_DEV(0) | GPIO0, GPIO2, GPIO4, GPIO16, GPIO17 | - | \ref esp32_pwm_channels "DAC Channels"
|
||||
PWM_DEV(1) | GPIO27, GPIO32, GPIO33 | - | \ref esp32_pwm_channels "PWM Channels"
|
||||
@ -91,19 +114,28 @@ UART_DEV(0):RxD | GPIO3 | Console (configuration is fixed) | \ref esp32_uart_in
|
||||
UART_DEV(1):TxD | GPIO10 | not available in **qout** and **qio** flash mode | \ref esp32_uart_interfaces "UART interfaces"
|
||||
UART_DEV(1):RxD | GPIO9 | not available in **qout** and **qio** flash mode | \ref esp32_uart_interfaces "UART interfaces"
|
||||
</center>
|
||||
|
||||
\n
|
||||
@note
|
||||
- The configuration of ADC channels contains all ESP32 GPIOs that can be used as ADC channels.
|
||||
- The configuration of DAC channels contains all ESP32 GPIOs that can be used as DAC channels.
|
||||
- GPIO9 and GIOP10 can only be used in **dout** and **dio** \ref esp32_flash_modes "flash modes".
|
||||
- The configuration of ADC channels contains all ESP32 GPIOs that can be
|
||||
used as ADC channels.
|
||||
- The configuration of DAC channels contains all ESP32 GPIOs that can be used
|
||||
as DAC channels.
|
||||
- GPIO9 and GIOP10 can only be used in **dout** and **dio**
|
||||
\ref esp32_flash_modes "flash modes".
|
||||
|
||||
For detailed information about the configuration of ESP32 boards, see section \ref esp32_peripherals "Common Peripherals".
|
||||
For detailed information about the configuration of ESP32 boards, see
|
||||
section \ref esp32_peripherals "Common Peripherals".
|
||||
|
||||
### <a name="optional_hardware"> Optional Hardware Configurations </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_wroom_32_toc)
|
||||
|
||||
MRF24J40-based IEEE 802.15.4 radio modules and ENC28J60-based Ethernet network interface modules have been tested with the board. You could use the following code in your \ref esp32_application_specific_configurations "application-specific configuration" to use such modules:
|
||||
### Optional Hardware Configurations {#esp32_wroom_32_optional_hardware}
|
||||
|
||||
```
|
||||
MRF24J40-based IEEE 802.15.4 radio modules and ENC28J60-based Ethernet
|
||||
network interface modules have been tested with the board. You could use
|
||||
the following code in your \ref esp32_application_specific_configurations
|
||||
"application-specific configuration" to use such modules:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#ifdef BOARD_ESP32_WROOM-32
|
||||
|
||||
#if MODULE_MRF24J40
|
||||
@ -120,26 +152,41 @@ MRF24J40-based IEEE 802.15.4 radio modules and ENC28J60-based Ethernet network i
|
||||
#endif
|
||||
|
||||
#endif
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For other parameters, the default values defined by the drivers can be used.
|
||||
|
||||
@note The **RESET** signal of MRF24J40 and ENC28J60 based modules can also be connected to the **RST** pin of the board (see \ref esp32_wroom_32_pinout "pinout") to keep the configured GPIO free for other purposes.
|
||||
@note The **RESET** signal of MRF24J40 and ENC28J60 based modules can also
|
||||
be connected to the **RST** pin of the board (see \ref esp32_wroom_32_pinout
|
||||
"pinout") to keep the configured GPIO free for other purposes.
|
||||
|
||||
### <a name="pinout"> Board Pinout </a> [[TOC](#toc)]
|
||||
[Back to table of contents](#esp32_wroom_32_toc)
|
||||
|
||||
The following figure shows the pinout of the defined default configuration for the EPS32-DevKitC board as an example of generic ESP32-WROOM-32 boards. The light green GPIOs are not used by configured on-board hardware components and can be used for any purpose. However, if optional off-board hardware modules are used, these GPIOs may also be occupied, see \ref esp32_wroom_32_table_board_configuration "optional functions" in table board configuration.
|
||||
### Board Pinout {#esp32_wroom_32_pinout}
|
||||
|
||||
The corresponding board schematics can be found her [here](https://dl.espressif.com/dl/schematics/esp32_devkitc_v4-sch-20180607a.pdf)
|
||||
The following figure shows the pinout of the defined default configuration
|
||||
for the EPS32-DevKitC board as an example of generic ESP32-WROOM-32 boards.
|
||||
The light green GPIOs are not used by configured on-board hardware components
|
||||
and can be used for any purpose. However, if optional off-board hardware
|
||||
modules are used, these GPIOs may also be occupied, see
|
||||
section \ref esp32_wroom_32_board_configuration for more information.
|
||||
|
||||
\anchor esp32_wroom_32_pinout
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/ESP32-WROOM-32_pinouts.png?inline=false" "EPS32-DevKitC V4 Pinout"
|
||||
The corresponding board schematics can be found her [here]
|
||||
(https://dl.espressif.com/dl/schematics/esp32_devkitc_v4-sch-20180607a.pdf)
|
||||
|
||||
## <a name="flashing"> Flashing the Device </a> [[TOC](#toc)]
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/ESP32-WROOM-32_pinouts.png" "EPS32-DevKitC V4 Pinout"
|
||||
|
||||
Flashing RIOT is quite easy. The board has a Micro-USB connector with reset/boot/flash logic. Just connect the board to your host computer and type using the programming port:
|
||||
```
|
||||
[Back to table of contents](#esp32_wroom_32_toc)
|
||||
|
||||
## Flashing the Device {#esp32_wroom_32_flashing}
|
||||
|
||||
Flashing RIOT is quite easy. The board has a Micro-USB connector with
|
||||
reset/boot/flash logic. Just connect the board to your host computer
|
||||
and type using the programming port:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make flash BOARD=esp32-wroom-32 ...
|
||||
```
|
||||
For detailed information about ESP32 as well as configuring and compiling RIOT for ESP32 boards, see \ref esp32_riot.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For detailed information about ESP32 as well as configuring and compiling
|
||||
RIOT for ESP32 boards, see \ref esp32_riot.
|
||||
|
||||
[Back to table of contents](#esp32_wroom_32_toc)
|
||||
*/
|
||||
|
@ -43,7 +43,9 @@ Furthermore, many GPIOs are broken out for extension. The USB bridge based on
|
||||
FDI FT2232HL provides a JTAG interface for OCD debugging through the USB
|
||||
interface.
|
||||
|
||||
@image html "https://dl.espressif.com/dl/schematics/pictures/esp-wrover-kit-v3.jpg" "ESP-WROVER-KIT V3"
|
||||
@image html "https://dl.espressif.com/dl/schematics/pictures/esp-wrover-kit-v3.jpg" "ESP-WROVER-KIT V3" width=500px
|
||||
|
||||
[Back to table of contents](#esp32_wrover_kit_toc)
|
||||
|
||||
## Hardware {#esp32_wrover_kit_hardware}
|
||||
|
||||
@ -54,11 +56,15 @@ This section describes
|
||||
- [optional hardware configurations](#esp32_wrover_kit_optional_hardware),
|
||||
- the [board pinout](#esp32_wrover_kit_pinout).
|
||||
|
||||
[Back to table of contents](#esp32_wrover_kit_toc)
|
||||
|
||||
### MCU {#esp32_wrover_kit_mcu}
|
||||
|
||||
Most features of the board are provided by the ESP32 SoC. For detailed
|
||||
information about the ESP32, see section \ref esp32_mcu_esp32 "MCU ESP32".
|
||||
|
||||
[Back to table of contents](#esp32_wrover_kit_toc)
|
||||
|
||||
### Board Configuration {#esp32_wrover_kit_board_configuration}
|
||||
|
||||
ESP-WROVER-KIT has the following on-board components
|
||||
@ -72,11 +78,12 @@ ESP-WROVER-KIT has the following on-board components
|
||||
|
||||
The following table shows the default board configuration sorted according to
|
||||
the defined functionality of GPIOs for different hardware options. This
|
||||
configuration can be overridden by \ref esp32_application_specific_configurations .
|
||||
configuration can be overridden by
|
||||
\ref esp32_application_specific_configurations .
|
||||
|
||||
These abbreviations are used in subsequent tables:
|
||||
|
||||
*SDC* = SD-Card interface is used (module **sdcard_spi** is enabled)<br>
|
||||
*SDC* = SD-Card interface is used (module **sdcard_spi** is enabled)\n
|
||||
*CAM* = Camera is plugged in/used
|
||||
|
||||
<center>
|
||||
@ -164,6 +171,7 @@ Following table shows the default board configuration sorted by GPIOs.
|
||||
| GPIO35 | ADC_LINE(1) | ADC_LINE(1) | ADC_LINE(1) | CAMERA_D7 | |
|
||||
| GPIO36 | ADC_LINE(2) | ADC_LINE(2) | ADC_LINE(2) | CAMERA_D4 | |
|
||||
| GPIO39 | ADC_LINE(3) | ADC_LINE(3) | ADC_LINE(3) | CAMERA_D5 | |
|
||||
\n
|
||||
|
||||
</center>
|
||||
|
||||
@ -192,7 +200,7 @@ Following table shows the default board configuration sorted by GPIOs.
|
||||
For detailed information about the configuration of ESP32 boards, see
|
||||
section Peripherals in \ref esp32_riot.
|
||||
|
||||
https://docs.espressif.com/projects/esp-idf/en/latest/get-started/get-started-wrover-kit.html
|
||||
[Back to table of contents](#esp32_wrover_kit_toc)
|
||||
|
||||
### Optional Hardware Configurations {#esp32_wrover_kit_optional_hardware}
|
||||
|
||||
@ -201,7 +209,7 @@ interface modules have been tested with the board. You could use the following
|
||||
code in your \ref esp32_application_specific_configurations
|
||||
"application-specific configuration" to use such modules:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#ifdef BOARD_ESP32_WROVER_KIT
|
||||
|
||||
#if MODULE_MRF24J40
|
||||
@ -217,7 +225,7 @@ code in your \ref esp32_application_specific_configurations
|
||||
#endif
|
||||
|
||||
#endif
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For other parameters, the default values defined by the drivers can be used.
|
||||
|
||||
@note
|
||||
@ -228,18 +236,21 @@ For other parameters, the default values defined by the drivers can be used.
|
||||
connected to the **RST** pin of the board (see \ref esp32_wrover_kit_pinout
|
||||
"pinout") to keep the configured GPIO free for other purposes.
|
||||
|
||||
[Back to table of contents](#esp32_wrover_kit_toc)
|
||||
|
||||
### Board Pinout {#esp32_wrover_kit_pinout}
|
||||
|
||||
The following picture shows the pinout of the ESP-WROVER-KIT V3 boards as
|
||||
defined by the default board configuration. The light green GPIOs are not used
|
||||
by configured on-board hardware components and can be used for any purpose.
|
||||
However, if optional off-board hardware modules are used, these GPIOs may also
|
||||
be occupied, see \ref esp32_wrover_kit_board_configuration in table board configuration.
|
||||
be occupied, see section \ref esp32_wrover_kit_board_configuration for
|
||||
more information.
|
||||
|
||||
The corresponding board schematic can be found
|
||||
[here](https://dl.espressif.com/dl/schematics/ESP-WROVER-KIT_SCH-3.pdf).
|
||||
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/ESP-WROVER-KIT_V3_pinout.png?inline=false" "ESP32-WROVER-KIT V3 Pinout"
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/ESP-WROVER-KIT_V3_pinout.png" "ESP32-WROVER-KIT V3 Pinout"
|
||||
|
||||
## Flashing the Device {#esp32_wrover_kit_flashing}
|
||||
|
||||
@ -247,26 +258,29 @@ Flashing RIOT is quite straight forward. The board has a Micro-USB connector
|
||||
with reset/boot/flash logic. Just connect the board using the programming port
|
||||
to your host computer and type:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make flash BOARD=esp32-wrover-kit ...
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The USB bridge is based on FDI FT2232HL and offers two USB interfaces:
|
||||
|
||||
- the first interface is the JTAG interface for [On-Chip debugging](#esp32_wrover_kit_debugging)
|
||||
- the first interface is the JTAG interface for
|
||||
[On-Chip debugging](#esp32_wrover_kit_debugging)
|
||||
- the second interface is the console interface, which is also used for flashing
|
||||
|
||||
Therefore, you have to declare the USB interface in the make command. For
|
||||
example, if the ESP32-WROVER-KIT is connected to the host computer through the
|
||||
USB interfaces `/dev/ttyUSB0` and `/dev/ttyUSB1`, the make command would be
|
||||
used as following:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make flash BOARD=esp32-wrover-kit PORT=/dev/ttyUSB1 ...
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
For detailed information about ESP32 as well as configuring and compiling RIOT
|
||||
for ESP32 boards, see \ref esp32_riot.
|
||||
|
||||
[Back to table of contents](#esp32_wrover_kit_toc)
|
||||
|
||||
## On-Chip Debugging with the Device {#esp32_wrover_kit_debugging}
|
||||
|
||||
Since the USB bridge based on FDI FT2232HL provides a JTAG interface for
|
||||
@ -275,9 +289,12 @@ convenient way for On-Chip debugging. Please refer the
|
||||
[ESP-IDF Programming Guide](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/jtag-debugging/index.html)
|
||||
for details on how to setup and how to use ESP-WROVER-KIT and OpenOCD.
|
||||
|
||||
[Back to table of contents](#esp32_wrover_kit_toc)
|
||||
|
||||
## Other Documentation Resources {#esp32_wrover_kit_other-resources}
|
||||
|
||||
There is a comprehensive
|
||||
[Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/get-started-wrover-kit-v3.html)
|
||||
[Getting Started Guide]
|
||||
(https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-wrover-kit-v3.html)
|
||||
for the ESP-WROVER-KIT with a lot information about hardware configuration.
|
||||
*/
|
||||
|
@ -4,16 +4,27 @@
|
||||
@ingroup boards_esp8266
|
||||
@brief Support for boards that use ESP-12x modules.
|
||||
|
||||
\section esp8266_esp-12x ESP-12x based boards
|
||||
|
||||
## Overview
|
||||
|
||||
This board definition covers not just a single board, but rather a large set of generic boards that either use one of the AI-Tinker ESP-12x AI-Thinker ESP8266 modules or are compatible with them. ESP-12x stands for different versions of the ESP-12 module: ESP-12, ESP-12E, ESP-12E and ESP-12S.
|
||||
This board definition covers not just a single board, but rather a large
|
||||
set of generic boards that either use one of the AI-Tinker ESP-12x ESP8266
|
||||
modules or are compatible with them. ESP-12x stands for different versions
|
||||
of the ESP-12 module: ESP-12, ESP-12E, ESP-12E and ESP-12S.
|
||||
|
||||
\htmlonly<style>div.image img[src="https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/ESP-12F_Module.png"]{width:200px;}</style>\endhtmlonly
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/ESP-12F_Module.png" "ESP8266 ESP-12F module"<br>
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/ESP-12F_Module.png" "ESP8266 ESP-12F module" width=250px
|
||||
\n
|
||||
|
||||
Common examples for this type of boards are the [WEMOS LOLIN D1 mini V2](#wemos_lolin_d1_mini), the [NodeMCU DEVKIT](#nodemcu_devkit_esp8266) and the [Adafruit Feather HUZZAH ESP8266](#adafruit_feather_huzzah_esp8266). All these boards are characterized by using any of the ESP-12x module and breaking out all GPIO pins.
|
||||
Common examples for this type of boards are the
|
||||
[WEMOS LOLIN D1 mini V2](#esp8266_wemos_lolin_d1_mini), the
|
||||
[NodeMCU DEVKIT](#esp8266_nodemcu_devkit_esp8266) and the
|
||||
[Adafruit Feather HUZZAH ESP8266](#esp8266_adafruit_feather_huzzah_esp8266).
|
||||
All these boards are characterized by using any of the ESP-12x module and
|
||||
breaking out all GPIO pins.
|
||||
|
||||
@note This board definition is the most generic one and might also be used for other ESP8266 and ESP8285 boards.
|
||||
@note This board definition is the most generic one and might also be used
|
||||
for other ESP8266 and ESP8285 boards.
|
||||
|
||||
## MCU
|
||||
|
||||
@ -39,18 +50,18 @@ 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)
|
||||
</center>
|
||||
<br>
|
||||
|
||||
## Flashing the Device
|
||||
|
||||
Flashing RIOT is quite straight forward, just connect the board using the programming port to your host computer and type:
|
||||
```
|
||||
Flashing RIOT is quite straight forward, just connect the board using the
|
||||
programming port to your host computer and type:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make flash BOARD=esp8266-esp-12x ...
|
||||
```
|
||||
For detailed information about ESP8266 as well as configuring and compiling RIOT for ESP8266 boards, see \ref esp8266_riot.
|
||||
|
||||
## <a name="wemos_lolin_d1_mini"> WEMOS LOLIN D1 mini </a>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For detailed information about ESP8266 as well as configuring and compiling
|
||||
RIOT for ESP8266 boards, see \ref esp8266_riot.
|
||||
|
||||
## WEMOS LOLIN D1 mini {#esp8266_wemos_lolin_d1_mini}
|
||||
|
||||
[WEMOS LOLIN D1 mini]
|
||||
(https://www.wemos.cc/en/latest/d1/d1_mini.html)
|
||||
@ -58,23 +69,24 @@ is a very interesting board series as it offers a stackable ESP8266 platform.
|
||||
This board can be easily extended with a large number of compatible peripheral
|
||||
shields, e.g. a micro SD card shield, an IR controller shield, a battery
|
||||
shield, and various sensor and actuator shields, see [D1 mini shields]
|
||||
(https://docs.wemos.cc/en/latest/d1_mini_shiled/index.html) for more
|
||||
(https://docs.wemos.cc/en/latest/d1_mini_shield/index.html) for more
|
||||
information. This makes it possible to create different hardware configurations
|
||||
without the need for a soldering iron or a breadboard.
|
||||
|
||||
\htmlonly
|
||||
<style>div.image img[src="https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Wemos_D1_mini_Stack.png?inline=false"]{width:400px;}</style>
|
||||
\endhtmlonly
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Wemos_D1_mini_Stack.png?inline=false" "WEMOS LOLIN D1 mini stack example"<br>
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Wemos_D1_mini_Stack.png" "WEMOS LOLIN D1 mini stack example" width=400px
|
||||
\n
|
||||
|
||||
There is also a MRF24J40 shield that can be used to extend the board with an IEEE 802.15.4 radio module, the standard networking technology in RIOT.
|
||||
There is also a MRF24J40 shield that can be used to extend the board with
|
||||
an IEEE 802.15.4 radio module, the standard networking technology in RIOT.
|
||||
|
||||
\htmlonly
|
||||
<style>div.image img[src="https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Wemos_MRF24J40_Shield.png?inline=false"]{width:280px;}</style>
|
||||
\endhtmlonly
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Wemos_MRF24J40_Shield.png?inline=false" "MRF24J40 shield for WEMOS LOLIN D1 mini"<br>
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Wemos_MRF24J40_Shield.png" "MRF24J40 shield for WEMOS LOLIN D1 mini" width=280px
|
||||
\n
|
||||
|
||||
There are several versions of WEMOS LOLIN D1 mini, which only differ in the size of the flash memory and the MCU version used. All versions have a microUSB port with flash / boot / reset logic that makes flashing much easier. Their peripherals are equal and work with the default ESP8266 ESP-12x board definition.
|
||||
There are several versions of WEMOS LOLIN D1 mini, which only differ in the
|
||||
size of the flash memory and the MCU version used. All versions have a
|
||||
microUSB port with flash / boot / reset logic that makes flashing much
|
||||
easier. Their peripherals are equal and work with the default ESP8266 ESP-12x
|
||||
board definition.
|
||||
|
||||
For more information, see [D1 Boards]
|
||||
(https://docs.wemos.cc/en/latest/d1/d1_mini.html).
|
||||
@ -87,37 +99,47 @@ D1 mini V3 | ESP8266EX | 4 MByte | PCB | |
|
||||
D1 mini Lite | ESP8285 | 1 MByte | PCB | |
|
||||
D1 mini Pro | ESP8266EX | 16 MByte | ceramic | |
|
||||
</center>
|
||||
<br>
|
||||
\n
|
||||
|
||||
Following image shows the pinout of all WEMOS LOLIN D1 mini boards. It is compatible with the WEMOS LOLIN D32 Pro ESP32 board.
|
||||
Following image shows the pinout of all WEMOS LOLIN D1 mini boards. It is
|
||||
compatible with the WEMOS LOLIN D32 Pro ESP32 board.
|
||||
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Wemos_D1_mini_pinout.png?inline=false" "WEMOS LOLIN D1 mini pinout"<br>
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Wemos_D1_mini_pinout.png" "WEMOS LOLIN D1 mini pinout"
|
||||
|
||||
## <a name="nodemcu_devkit_esp8266"> NodeMCU DEVKIT </a>
|
||||
## NodeMCU DEVKIT {#esp8266_nodemcu_devkit_esp8266}
|
||||
|
||||
NodeMCU DEVKIT is an open-source hardware project hosted on [GitHub](https://github.com/nodemcu/nodemcu-devkit-v1.0). Therefore, there are a lot of clones available. The board was originally designed for NodeMCU firmware development.
|
||||
NodeMCU DEVKIT is an open-source hardware project hosted on
|
||||
[GitHub](https://github.com/nodemcu/nodemcu-devkit-v1.0). Therefore,
|
||||
there are a lot of clones available. The board was originally designed
|
||||
for NodeMCU firmware development.
|
||||
|
||||
As the other boards described here, NodeMCU ESP12 is generic board that uses ESP-12E module and breaks out all available GPIO pins. It has a Micro-USB port including a flash/boot/reset logic which makes flashing much easier.
|
||||
As the other boards described here, NodeMCU ESP12 is generic board that
|
||||
uses ESP-12E module and breaks out all available GPIO pins. It has a
|
||||
Micro-USB port including a flash/boot/reset logic which makes flashing
|
||||
much easier.
|
||||
|
||||
\htmlonly
|
||||
<style>div.image img[src="https://raw.githubusercontent.com/nodemcu/nodemcu-devkit-v1.0/master/Documents/NodeMCU_DEVKIT_1.0.jpg"]{width:400px;}</style>
|
||||
\endhtmlonly
|
||||
@image html "https://raw.githubusercontent.com/nodemcu/nodemcu-devkit-v1.0/master/Documents/NodeMCU_DEVKIT_1.0.jpg" "NodeMCE DEVKIT V1.0"<br>
|
||||
@image html "https://raw.githubusercontent.com/nodemcu/nodemcu-devkit-v1.0/master/Documents/NodeMCU_DEVKIT_1.0.jpg" "NodeMCE DEVKIT V1.0" width=500px
|
||||
\n
|
||||
|
||||
Following image shows the pinout of NodeMCU DEVKIT boards.
|
||||
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/NodeMCU_pinout.png?inline=false" "NodeMCE DEVKIT V1.0 pinout".
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/NodeMCU_pinout.png" "NodeMCE DEVKIT V1.0 pinout"
|
||||
|
||||
## <a name="adafruit_feather_huzzah_esp8266"> Adafruit Feather HUZZAH ESP8266 </a>
|
||||
## Adafruit Feather HUZZAH ESP8266 {#esp8266_adafruit_feather_huzzah_esp8266}
|
||||
|
||||
Feather is the new series of development boards from Adafruit. [Adafruit Feather HUZZAH ESP8266](https://www.adafruit.com/product/2821) is a ESP8266 based development board with built in WiFi, USB and battery charging. As the other boards described here, Adafruit Feather HUZZAH ESP8266 is a generic board that uses an ESP-12x module and breaks out most of the available GPIO pins. It has one additional LED connected to GPIO0 and a Micro-USB port including a flash/boot/reset logic which makes flashing much easier.
|
||||
Feather is the new series of development boards from Adafruit.
|
||||
[Adafruit Feather HUZZAH ESP8266](https://www.adafruit.com/product/2821)
|
||||
is a ESP8266 based development board with built in WiFi, USB and battery
|
||||
charging. As the other boards described here, Adafruit Feather HUZZAH ESP8266
|
||||
is a generic board that uses an ESP-12x module and breaks out most of the
|
||||
available GPIO pins. It has one additional LED connected to GPIO0 and a
|
||||
Micro-USB port including a flash/boot/reset logic which makes flashing much
|
||||
easier.
|
||||
|
||||
\htmlonly
|
||||
<style>div.image img[src="https://cdn-shop.adafruit.com/1200x900/2821-05.jpg"]{width:400px;}</style>
|
||||
\endhtmlonly
|
||||
@image html "https://cdn-shop.adafruit.com/1200x900/2821-05.jpg" "Adafruit Feather HUZZAH ESP8266"<br>
|
||||
@image html "https://cdn-shop.adafruit.com/640x480/2821-04.jpg" "Adafruit Feather HUZZAH ESP8266" width=500px
|
||||
\n
|
||||
|
||||
Following image shows the pinout of Adafruit Feather HUZZAH ESP8266.
|
||||
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Adafruit_Huzzah_ESP8266_pinout.png?inline=false" "Adafruit Feather HUZZAH ESP8266 pinout"
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Adafruit_Huzzah_ESP8266_pinout.png" "Adafruit Feather HUZZAH ESP8266 pinout"
|
||||
*/
|
||||
|
@ -6,15 +6,28 @@
|
||||
|
||||
## 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 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.
|
||||
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>
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Olimex-MOD-DEV.png" "Olimex MOD-WIFI-ESP8266-DEV"
|
||||
\n
|
||||
|
||||
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).
|
||||
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.
|
||||
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"
|
||||
|
||||
@ -49,24 +62,39 @@ Board Schematic | [Board Schematic](https://github.com/OLIMEX/ESP8266/blob/maste
|
||||
|
||||
### 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.
|
||||
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>
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Olimex-MOD-DEV_pins.png" "Olimex MOD-WIFI-ESP8266-DEV pin mapping"
|
||||
\n
|
||||
|
||||
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.
|
||||
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) ,
|
||||
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.
|
||||
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.
|
||||
For detailed information about ESP8266 as well as configuring and compiling
|
||||
RIOT for ESP8266 boards, see \ref esp8266_riot.
|
||||
*/
|
||||
|
@ -55,6 +55,7 @@
|
||||
#ifndef PWM0_GPIOS
|
||||
#define PWM0_GPIOS { GPIO0, GPIO5, GPIO16 }
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end extern "C" */
|
||||
|
@ -6,9 +6,13 @@
|
||||
|
||||
## Overview
|
||||
|
||||
The [SparkFun ESP8266 Thing](https://www.sparkfun.com/products/13231) and [SparkFun ESP8266 Thing DEV](https://www.sparkfun.com/products/13711) are low-cost and easy to use breakout and development boards for the ESP8266. Both SparkFun ESP8266 Thing boards are relatively simple boards. The pins are simply broken out to two parallel, breadboard-compatible rows.
|
||||
The [SparkFun ESP8266 Thing](https://www.sparkfun.com/products/13231) and
|
||||
[SparkFun ESP8266 Thing DEV](https://www.sparkfun.com/products/13711) are
|
||||
low-cost and easy to use breakout and development boards for the ESP8266.
|
||||
Both SparkFun ESP8266 Thing boards are relatively simple boards. The pins
|
||||
are simply broken out to two parallel, breadboard-compatible rows.
|
||||
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Sparkfun_Thing_x.png?inline=false" "SparkFun ESP8266 Thing (left) / SparkFun ESP8266 Thing DEV (right)"
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Sparkfun_Thing_x.png" "SparkFun ESP8266 Thing (left) / SparkFun ESP8266 Thing DEV (right)"
|
||||
|
||||
## Hardware
|
||||
|
||||
@ -36,13 +40,14 @@ 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 | [ESP8266 Thing](https://cdn.sparkfun.com/datasheets/Wireless/WiFi/SparkFun_ESP8266_Thing.pdf) <br> [ESP8266 Thing Dev](https://cdn.sparkfun.com/datasheets/Wireless/WiFi/ESP8266-Thing-Dev-v10.pdf)
|
||||
Board Schematic | [ESP8266 Thing](https://cdn.sparkfun.com/datasheets/Wireless/WiFi/SparkFun_ESP8266_Thing.pdf)\n [ESP8266 Thing Dev](https://cdn.sparkfun.com/datasheets/Wireless/WiFi/ESP8266-Thing-Dev-v10.pdf)
|
||||
|
||||
</center>
|
||||
|
||||
### Board Versions
|
||||
|
||||
Although the board definition works with both boards, it's important to know that they differ slightly in some features:
|
||||
Although the board definition works with both boards, it's important
|
||||
to know that they differ slightly in some features:
|
||||
|
||||
<center>
|
||||
|
||||
@ -60,31 +65,45 @@ CHIP_EN broken out | yes | no
|
||||
|
||||
</center>
|
||||
|
||||
[1] Although the SparkFun ESP8266 Thing Dev has no on-board I2C pull-up resistors, the I2C interface can be used because the ESP8266 SoC has built-in pull-up resistors that are activated by the I2C peripheral driver.
|
||||
[1] Although the SparkFun ESP8266 Thing Dev has no on-board I2C pull-up
|
||||
resistors, the I2C interface can be used because the ESP8266 SoC has
|
||||
built-in pull-up resistors that are activated by the I2C peripheral driver.
|
||||
|
||||
[2] The board configuration defines high-active LEDs. If the SparkFun ESP8266 Thing Dev is used with this board configuration, the LED outputs must be inverted by the application.
|
||||
[2] The board configuration defines high-active LEDs. If the
|
||||
SparkFun ESP8266 Thing Dev is used with this board configuration,
|
||||
the LED outputs must be inverted by the application.
|
||||
|
||||
### RIOT Pin Mapping
|
||||
|
||||
The following figures show the mapping of these pin holes to RIOT pins.
|
||||
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Sparkfun_Thing_pinout.png?inline=false" "SparkFun Thin Pinout"
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Sparkfun_Thing_pinout.png" "SparkFun Thin Pinout"
|
||||
\n
|
||||
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Sparkfun_Thing_Dev_pinout.png?inline=false" "SparkFun Thin Dev Pinout"
|
||||
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp8266/Sparkfun_Thing_Dev_pinout.png" "SparkFun Thin Dev Pinout"
|
||||
\n
|
||||
|
||||
Flash SPI pins including GPIO9 and GPIO10 are not broken out. The SparkFun Thing board has solder pads for these pins at the bottom layer.
|
||||
Flash SPI pins including GPIO9 and GPIO10 are not broken out. The
|
||||
SparkFun Thing board has solder pads for these pins at the bottom layer.
|
||||
|
||||
## Flashing the Device
|
||||
|
||||
To flash the RIOT image, the device has to be connected to the host computer. Since the SparkFun Thing Dev board has an USB to Serial adapter on board, this can done directly using the Micro USB. SparkFun Thin board has to be connected to the host computer using the FTDI interface and a FTDI USB to Serial adapter/cable. For more information on how to program the SparkFun Thing board, please refer the [ESP8266 Thing Hookup Guide](https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/programming-the-thing).
|
||||
To flash the RIOT image, the device has to be connected to the host computer.
|
||||
Since the SparkFun Thing Dev board has an USB to Serial adapter on board,
|
||||
this can done directly using the Micro USB. SparkFun Thin board has to be
|
||||
connected to the host computer using the FTDI interface and a FTDI USB to
|
||||
Serial adapter/cable. For more information on how to program the
|
||||
SparkFun Thing board, please refer the [ESP8266 Thing Hookup Guide]
|
||||
(https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/programming-the-thing).
|
||||
|
||||
@note Please make sure the FTDI USB to Serial adapter/cable uses 3.3 V.
|
||||
|
||||
Both boards have a reset/flash/boot logic on-board so that flashing is quite simple. To flash the RIOT image just type:
|
||||
```
|
||||
Both boards have a reset/flash/boot logic on-board so that flashing is
|
||||
quite simple. To flash the RIOT image just type:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make flash BOARD=esp8266-sparkfun-thing ...
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
For detailed information about ESP8266 as well as configuring and compiling RIOT for ESP8266 boards, see \ref esp8266_riot.
|
||||
For detailed information about ESP8266 as well as configuring and compiling
|
||||
RIOT for ESP8266 boards, see \ref esp8266_riot.
|
||||
*/
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
\section esp8266_riot RIOT-OS on ESP8266 and ESP8285 boards
|
||||
|
||||
## <a name="esp8266_toc"> Table of Contents </a>
|
||||
## Table of Contents {#esp8266_toc}
|
||||
|
||||
1. [Overview](#esp8266_overview)
|
||||
2. [Short Configuration Reference](#esp8266_short_configuration_reference)
|
||||
@ -44,7 +44,7 @@
|
||||
1. [QEMU Mode and GDB](#esp8266_qemu_mode_and_gdb)
|
||||
2. [Module esp_gdbstub](#esp8266_esp_gdbstub)
|
||||
|
||||
# <a name="esp8266_overview"> Overview </a> [[TOC](#esp8266_toc)]
|
||||
# Overview {#esp8266_overview}
|
||||
|
||||
<b>RIOT-Xtensa-ESP</b> is a bare metal implementation of <b>RIOT-OS</b> for
|
||||
<b>ESP8266 / ESP8285</b> SOCs which supports most features of RIOT-OS. The
|
||||
@ -58,9 +58,9 @@ the [ESP8266 RTOS SDK v3.x](https://github.com/gschorcht/RIOT-Xtensa-ESP8266-RTO
|
||||
To build a RIOT application, simply use the `make` command and specify an
|
||||
existing ESP8266 board, for example:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make flash BOARD=esp8266-esp-12x -C tests/shell ...
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
For more information about the `make` command variables and specific compile
|
||||
options, see section [Compile Options](#esp8266_compile_options).
|
||||
@ -71,14 +71,18 @@ the <b>ESP8266 SOC definitions</b> provided by SDK header files. In addition,
|
||||
it needs the hardware abstraction library (libhal), and <b>ESP8266 WiFi stack
|
||||
binary</b> libraries which are part of the SDK.
|
||||
|
||||
# <a name=esp8266_mcu_esp8266> MCU ESP8266 </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
# MCU ESP8266 {#esp8266_mcu_esp8266}
|
||||
|
||||
ESP8266 is a low-cost, ultra-low-power, single-core SoCs with an integrated
|
||||
WiFi module from Espressif Systems. The processor core is based on the
|
||||
Tensilica Xtensa Diamond Standard 106Micro 32-bit Controller Processor Core,
|
||||
which Espressif calls L106. The key features of ESP8266 are:
|
||||
|
||||
# <a name="esp8266_short_configuration_reference"> Short Configuration Reference </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
# Short Configuration Reference {#esp8266_short_configuration_reference}
|
||||
|
||||
The following table gives a short reference of all board configuration
|
||||
parameters used by the ESP8266 port in alphabetical order.
|
||||
@ -145,7 +149,9 @@ Technical Reference | [Technical Reference](https://www.espressif.com/sites/defa
|
||||
documentation also applies to the SoC ESP8285, even if only the ESP8266 SoC is
|
||||
described below.
|
||||
|
||||
# <a name="esp8266_toolchain"> Toolchain <a>
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
# Toolchain {#esp8266_toolchain}
|
||||
|
||||
The following software components are required for compilation:
|
||||
|
||||
@ -163,7 +169,9 @@ There are two options to install the toolchain:
|
||||
In both cases, the ESP flash programmer tool `esptool.py` is required,
|
||||
see section [Installation of `esptool.py`](#esp8266_installation_of_esptool).
|
||||
|
||||
## <a name="esp8266_riot_docker_toolchain"> RIOT Docker Toolchain (riotdocker) </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## RIOT Docker Toolchain (riotdocker) {#esp8266_riot_docker_toolchain}
|
||||
|
||||
The easiest way to install the toolchain is to use RIOT Docker
|
||||
`riotdocker`. The compilation process using RIOT Docker consists of two steps
|
||||
@ -176,11 +184,13 @@ where step 2 requires that the ESP flash programmer tool `esptool.py` is
|
||||
installed. Both steps can also be performed with a single command on the host
|
||||
system using the `BUILD_IN_DOCKER` variable:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
BUILD_IN_DOCKER=1 make BOARD=... flash
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
### <a name="esp8266_preparing_the_environment"> Preparing the Environment </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
### Preparing the Environment {#esp8266_preparing_the_environment}
|
||||
|
||||
Using RIOT Docker requires at least the following software components:
|
||||
|
||||
@ -192,34 +202,38 @@ For information about installing Docker on your host, refer to the appropriate
|
||||
manuals for your operating system. The easiest way to install Docker on an
|
||||
Ubuntu/Debian system is for example:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
sudo apt-get install docker.io
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
For information on how to install `esptool.py`, see section
|
||||
[Installation of `esptool.py`](#esp8266_installation_of_esptool).
|
||||
[Installation of esptool.py](#esp8266_installation_of_esptool).
|
||||
|
||||
### <a name="esp8266_using_existing_docker_image"> Using an Existing RIOT Docker Image </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
### Using an Existing RIOT Docker Image {#esp8266_using_existing_docker_image}
|
||||
|
||||
The easiest way to use RIOT Docker is to use an existing `riotdocker` image.
|
||||
You can either pull and start the
|
||||
[schorcht/riotbuild_esp8266_rtos](https://hub.docker.com/r/schorcht/riotbuild_esp8266_rtos)
|
||||
Docker image which only contains the toolchain for ESP8266 RTOS SDK using
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
cd /path/to/RIOT
|
||||
docker run -i -t -u $UID -v $(pwd):/data/riotbuild schorcht/riotbuild_esp8266_rtos_sdk
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
or the [riot/riotbuild](https://hub.docker.com/r/riot/riotbuild/) Docker image
|
||||
(size is about 1.5 GB) which contains the toolchains for all platforms using
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
cd /path/to/RIOT
|
||||
docker run -i -t -u $UID -v $(pwd):/data/riotbuild riot/riotbuild
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
### <a name="esp8266_generating_docker_image"> Generating a riotdocker Image </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
### Generating a riotdocker Image {#esp8266_generating_docker_image}
|
||||
|
||||
Alternatively, you can generate the `riotdocker` image by yourself.
|
||||
A `riotdocker` fork that only installs the toolchain for ESP8266 RTOS SDK is
|
||||
@ -227,13 +241,13 @@ available at [GitHub](https://github.com/gschorcht/riotdocker-Xtensa-ESP.git).
|
||||
After cloning this repository, checkout branch `esp8266_only_rtos_sdk` to
|
||||
generate a Docker image with a size of "only" 890 MByte:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
cd $HOME/esp
|
||||
git clone https://github.com/gschorcht/riotdocker-Xtensa-ESP.git
|
||||
cd riotdocker-Xtensa-ESP
|
||||
git checkout esp8266_only_rtos_sdk
|
||||
docker build -t riotbuild .
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
A `riotdocker` version that contains toolchains for all platforms supported
|
||||
by RIOT can be found at [GitHub](https://github.com/RIOT-OS/riotdocker).
|
||||
@ -243,10 +257,10 @@ about 1.5 GByte.
|
||||
Once the Docker image has been created, it can be started with the following
|
||||
commands while in the RIOT root directory:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
cd /path/to/RIOT
|
||||
docker run -i -t -u $UID -v $(pwd):/data/riotbuild riotbuild
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@note RIOT's root directory `/path/to/RIOT` becomes visible as the home
|
||||
directory of the `riotbuild` user in the Docker. That is, the output
|
||||
@ -255,7 +269,9 @@ of compilations in RIOT Docker are also accessible on the host system.
|
||||
Please refer the [RIOT wiki](https://github.com/RIOT-OS/RIOT/wiki/Use-Docker-to-build-RIOT)
|
||||
on how to use the Docker image to compile RIOT OS.
|
||||
|
||||
### <a name="esp8266_flashing_using_docker"> Make Process with RIOT Docker</a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
### Make Process with RIOT Docker {#esp8266_flashing_using_docker}
|
||||
|
||||
Using RIOT Docker, the make process consists of the following two steps:
|
||||
|
||||
@ -266,9 +282,9 @@ Once the according RIOT Docker image has been started from RIOT's root
|
||||
directory, a RIOT application can be compiled inside RIOT Docker using the
|
||||
make command as usual, for example:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make BOARD=esp8266-esp-12x -C tests/shell ...
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
This will generate a RIOT binary in ELF format.
|
||||
|
||||
@note You can't use the `flash` target inside RIOT Docker.
|
||||
@ -278,17 +294,19 @@ the RIOT Docker image was started while in RIOT's root directory, the output
|
||||
of the compilations is also accessible on the host system. On the host system,
|
||||
the `flash-only` target can then be used to flash the binary.
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
make flash-only BOARD=esp8266-esp-12x -C tests/shell
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@note Both steps can also be performed with a single command on the host
|
||||
system using the `BUILD_IN_DOCKER` variable:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
`BUILD_IN_DOCKER=1 make BOARD=... flash
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
## <a name="esp8266_manual_toolchain_installation"> Manual Toolchain Installation </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## Manual Toolchain Installation {#esp8266_manual_toolchain_installation}
|
||||
|
||||
A more difficult way to install the toolchain is the manual installation of
|
||||
all required components as described below.
|
||||
@ -299,37 +317,41 @@ Furthermore, the following packages (Debian/Ubuntu) have to be installed:<br>
|
||||
`graphviz`, `make`, `pcregrep`, `python`, `python-serial`, `python3`,
|
||||
`python3-flake8`, `unzip`, `wget`
|
||||
|
||||
### <a name="esp8266_installation_of_xtensa_gcc"> Installation of Xtensa GCC compiler suite </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
### Installation of Xtensa GCC compiler suite {#esp8266_installation_of_xtensa_gcc}
|
||||
|
||||
The Xtensa GCC compiler for ESP8266 configured for use with RIOT-OS can
|
||||
be downloaded and installed as precompiled binary archive from
|
||||
[GitHub](https://github.com/gschorcht/xtensa-esp8266-elf):
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
mkdir -p $HOME/esp
|
||||
cd $HOME/esp
|
||||
git clone https://github.com/gschorcht/xtensa-esp8266-elf
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Once the compiler is installed, you have to expand your `PATH` variable by
|
||||
the directory with Xtensa GCC binaries:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export PATH=$HOME/esp/xtensa-esp8266-elf/bin:$PATH
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
### <a name="esp8266_installation_of_esp_idf"> Installation of the ESP8266 RTOS SDK</a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
### Installation of the ESP8266 RTOS SDK{#esp8266_installation_of_esp_idf}
|
||||
|
||||
To compile RIOT-OS with the ESP8266 RTOS SDK, a modified version of the SDK is
|
||||
required. This modified version can also be downloaded as
|
||||
[GIT](https://github.com/gschorcht/RIOT-Xtensa-ESP8266-RTOS-SDK.git) repository.
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
cd $HOME/esp
|
||||
git clone https://github.com/gschorcht/RIOT-Xtensa-ESP8266-RTOS-SDK.git ESP8266_RTOS_SDK
|
||||
cd ESP8266_RTOS_SDK/
|
||||
git checkout release/v3.1-for-riot-os-v2
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@note
|
||||
- Please be sure to checkout the correct branch that was used for the
|
||||
RIOT-OS port. Other versions will not work because they do not have the
|
||||
@ -340,12 +362,13 @@ SDK does not need to be compiled in any way.
|
||||
To use the installed ESP8266 RTOS SDK, set the environment variable
|
||||
`ESP8266_RTOS_SDK_DIR`.
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export ESP8266_RTOS_SDK_DIR=$HOME/esp/ESP8266_RTOS_SDK
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
### <a name="esp8266_installation_of_esptool"> Installation of `esptool.py` (ESP flash programmer tool) </a> [[TOC](#esp8266_toc)]
|
||||
### Installation of `esptool.py` (ESP flash programmer tool) {#esp8266_installation_of_esptool}
|
||||
|
||||
The RIOT port does not work with the `esptool.py` ESP flasher program
|
||||
available on [GitHub](https://github.com/espressif/esptool) or
|
||||
@ -362,37 +385,41 @@ Therefore, it is **not necessary to install** `esptool.py` explicitly. However
|
||||
`esptool.py` depends on `pySerial` which can be installed either
|
||||
using `pip`
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
sudo pip install pyserial
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
or the package manager of your OS, for example on Debian/Ubuntu systems:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
apt install python-pyserial
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For more information on `esptool.py`, please refer the
|
||||
[git repository](https://github.com/espressif/esptool).
|
||||
|
||||
# <a name="esp8266_flashing_the_device"> Flashing the Device </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## <a name="esp8266_toolchain_usage"> Toolchain Usage </a> [[TOC](#esp8266_toc)]
|
||||
# Flashing the Device {#esp8266_flashing_the_device}
|
||||
|
||||
## Toolchain Usage {#esp8266_toolchain_usage}
|
||||
|
||||
Once you have installed all required components, you should have the following
|
||||
directories.
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/path/to/esp/xtensa-esp8266-elf
|
||||
/path/to/esp/ESP8266_RTOS_SDK
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To use the toolchain, please ensure that your environment variables are set
|
||||
correctly to
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export PATH=/path/to/esp/xtensa-esp8266-elf/bin:$PATH
|
||||
export ESP8266_RTOS_SDK_DIR=/path/to/esp/ESP8266_RTOS_SDK
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
## <a name="esp8266_compile_options"> Compile Options </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## Compile Options {#esp8266_compile_options}
|
||||
|
||||
The compilation process can be controlled by following make variables:
|
||||
|
||||
@ -428,18 +455,20 @@ For example, to activate the SPIFFS drive in on-board flash memory, the
|
||||
makefile of application has simply to add the `esp_spiffs` module to
|
||||
`USEMODULE` make variable:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE += esp_spiffs
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Modules can also be activated temporarily at the command line when calling
|
||||
the make command:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE="esp_spiffs" make BOARD=...
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
## <a name="esp8266_flash_modes"> Flash Modes </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## Flash Modes {#esp8266_flash_modes}
|
||||
|
||||
The `FLASH_MODE` make command variable determines the mode that is used for
|
||||
flash access in normal operation.
|
||||
@ -460,16 +489,20 @@ For more information about these flash modes, refer the documentation of
|
||||
`dout`, ESP8285 modules have to be always flashed in `dout` mode. The
|
||||
default flash mode is `dout`.
|
||||
|
||||
## <a name="esp8266_erasing"> Erasing the Device </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## Erasing the Device {#esp8266_erasing}
|
||||
|
||||
The flash memory of ESP8266 can be erased completely with following command:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
esptool.py erase_flash
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# <a name="esp8266_peripherals"> Peripherals </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## <a name="esp8266_gpio_pins"> GPIO pins </a> [[TOC](#esp8266_toc)]
|
||||
# Peripherals {#esp8266_peripherals}
|
||||
|
||||
## GPIO pins {#esp8266_gpio_pins}
|
||||
|
||||
ESP8266 has 17 GPIO pins, which are all digital pins. Some of them can not be
|
||||
used at all or have bootstrapping capabilities and are therefore not available on all boards.
|
||||
@ -511,7 +544,9 @@ GPIO0 | GPIO2 | GPIO15 (MTDO) | Mode
|
||||
|
||||
</center>
|
||||
|
||||
## <a name="esp8266_adc_channels"> ADC Channels </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## ADC Channels {#esp8266_adc_channels}
|
||||
|
||||
ESP8266 has **one dedicated ADC** pin with a resolution of 10 bits. This ADC
|
||||
pin can measure voltages in the range of **0 V ... 1.1 V**.
|
||||
@ -519,7 +554,9 @@ pin can measure voltages in the range of **0 V ... 1.1 V**.
|
||||
@note Some boards have voltage dividers to scale this range to a maximum of
|
||||
3.3 V. For more information, see the hardware manual for the board.
|
||||
|
||||
## <a name="esp8266_spi_interfaces"> SPI Interfaces </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## SPI Interfaces {#esp8266_spi_interfaces}
|
||||
|
||||
ESP8266 has two SPI controllers:
|
||||
|
||||
@ -550,7 +587,9 @@ signal. In `dio` and `dout` flash modes (see section
|
||||
[Flash Modes](#esp8266_flash_modes)), GPIOs 9 and 10 can also be used as
|
||||
CS signal.
|
||||
|
||||
## <a name="esp8266_i2c_interfaces"> I2C Interfaces </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## I2C Interfaces {#esp8266_i2c_interfaces}
|
||||
|
||||
Since the ESP8266 does not or only partially support the I2C in hardware,
|
||||
I2C interfaces are realized as **bit-banging protocol in software**. The
|
||||
@ -566,14 +605,14 @@ from these definitions.
|
||||
|
||||
In the following example, only one I2C bus is defined:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#define I2C0_SPEED I2C_SPEED_FAST
|
||||
#define I2C0_SDA GPIO4
|
||||
#define I2C0_SCL GPIO5
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
A configuration with two I2C buses would look like the following:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#define I2C0_SPEED I2C_SPEED_FAST
|
||||
#define I2C0_SDA GPIO4
|
||||
#define I2C0_SCL GPIO5
|
||||
@ -581,12 +620,14 @@ A configuration with two I2C buses would look like the following:
|
||||
#define I2C1_SPEED I2C_SPEED_NORMAL
|
||||
#define I2C1_SDA GPIO2
|
||||
#define I2C1_SCL GPIO14
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
All these configurations can be overridden by an
|
||||
[application-specific board configuration](#esp8266_application_specific_board_configuration).
|
||||
|
||||
## <a name="esp8266_pwm_channels"> PWM Channels </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## PWM Channels {#esp8266_pwm_channels}
|
||||
|
||||
The hardware implementation of ESP8266 PWM supports only frequencies as power
|
||||
of two. Therefore, a **software implementation** of **one PWM device**
|
||||
@ -610,11 +651,13 @@ To define other GPIOs as PWM channels, just overwrite the definition of
|
||||
#PWM0_GPIOS in an
|
||||
[application-specific board configuration](#esp8266_application_specific_board_configuration)
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#define PWM0_GPIOS { GPIO12, GPIO13, GPIO14, GPIO15 }
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
## <a name="esp8266_timers"> Timers </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## Timers {#esp8266_timers}
|
||||
|
||||
There are two timer implementations:
|
||||
|
||||
@ -629,7 +672,9 @@ Although these SDK timers usually have a precision of a few microseconds, they
|
||||
can deviate up to 500 microseconds. So if you need a timer with high accuracy,
|
||||
you'll need to use the hardware timer with only one timer channel.
|
||||
|
||||
## <a name="esp8266_spiffs_device"> SPIFFS Device </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## SPIFFS Device {#esp8266_spiffs_device}
|
||||
|
||||
If SPIFFS module is enabled (`USEMODULE += esp_spiffs`), the implemented
|
||||
MTD system drive #mtd0 for the on-board SPI flash memory is used together
|
||||
@ -641,15 +686,17 @@ address `0x80000` (512 kByte) on first boot. All sectors up to the last
|
||||
fixed sector size of 4096 bytes, the top address of the SPIFF is
|
||||
`flash_size - 5 * 4096`, e.g., `0xfb000` for a flash memory of 1 MByte.
|
||||
The size of the SPIFF then results from:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
flash_size - 5 * 4096 - 512 kByte
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Please refer file `$RIOTBASE/tests/unittests/test-spiffs/tests-spiffs.c`
|
||||
for more information on how to use SPIFFS and VFS together with a MTD
|
||||
device #mtd0 alias `MTD_0`.
|
||||
|
||||
## <a name="esp8266_other_peripherals"> Other Peripherals </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## Other Peripherals {#esp8266_other_peripherals}
|
||||
|
||||
The ESP8266 port of RIOT also supports
|
||||
|
||||
@ -660,7 +707,9 @@ The ESP8266 port of RIOT also supports
|
||||
|
||||
RTC is not yet implemented.
|
||||
|
||||
# <a name="esp8266_network_interfaces"> Network Interfaces </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
# Network Interfaces {#esp8266_network_interfaces}
|
||||
|
||||
ESP8266 provides different built-in possibilities to realize network devices:
|
||||
|
||||
@ -668,8 +717,9 @@ ESP8266 provides different built-in possibilities to realize network devices:
|
||||
- <b>ESP-NOW</b>, a WiFi based AP-less and connectionless peer to
|
||||
peer communication protocol
|
||||
|
||||
\anchor esp8266_wifi_network_interface
|
||||
## <a name="esp8266_wifi_network_interface"> WiFi Network Interface </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## WiFi Network Interface {#esp8266_wifi_network_interface}
|
||||
|
||||
The RIOT port for ESP8266 implements in module `esp_wifi` a `netdev`
|
||||
driver for
|
||||
@ -679,9 +729,9 @@ the built-in WiFi interface.
|
||||
`netdev_default` is used. Instead, if necessary, the application has to add
|
||||
the module `esp_wifi` in the Makefile.
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE += esp_wifi
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Furthermore, the following configuration parameters have to be defined:
|
||||
|
||||
@ -699,16 +749,16 @@ These configuration parameter definitions, as well as enabling the `esp_wifi`
|
||||
module, can be done either in the makefile of the project or at make command
|
||||
line, e.g.:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE=esp_wifi \
|
||||
CFLAGS='-DESP_WIFI_SSID=\"MySSID\" -DESP_WIFI_PASS=\"MyPassphrase\"' \
|
||||
make -C examples/gnrc_networking BOARD=...
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@note
|
||||
- Module `esp_wifi` is not enabled automatically when module
|
||||
`netdev_default` is used.
|
||||
- Leave 'ESP_WIFI_PASS' undefined to connect to an open WiFi access point.
|
||||
- Leave `ESP_WIFI_PASS` undefined to connect to an open WiFi access point.
|
||||
- The Wifi network interface (module `esp_wifi`) and the
|
||||
[ESP-NOW network interface](#esp8266_esp_now_network_interface)
|
||||
(module `esp_now`) can be used simultaneously, for example, to realize a
|
||||
@ -717,8 +767,9 @@ In this case the ESP-NOW interface must use the same channel as the AP of the
|
||||
infrastructure WiFi network. All ESP-NOW nodes must therefore be compiled with
|
||||
the channel of the AP asvalue for the parameter 'ESP_NOW_CHANNEL'.
|
||||
|
||||
\anchor esp8266_wifi_ap_network_interface
|
||||
## <a name="esp8266_wifi_ap_network_interface"> WiFi SoftAP Network Interface </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## WiFi SoftAP Network Interface {#esp8266_wifi_ap_network_interface}
|
||||
|
||||
The RIOT port for the ESP8266 supports a `netdev` interface for the ESP32 WiFi
|
||||
SoftAP mode. Module `esp_wifi_ap` has to be enabled to use it.
|
||||
@ -743,11 +794,11 @@ These configuration parameter definitions, as well as enabling the `esp_wifi_ap`
|
||||
module, can be done either in the makefile of the project or at make command
|
||||
line, for example:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE=esp_wifi_ap \
|
||||
CFLAGS='-DESP_WIFI_SSID=\"MySSID\" -DESP_WIFI_PASS=\"MyPassphrase\" -DESP_WIFI_MAX_CONN=1 \
|
||||
make -C examples/gnrc_networking BOARD=...
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@note
|
||||
- The `esp_wifi_ap` module is not used by default when `netdev_default` is used.
|
||||
@ -764,8 +815,9 @@ they may experience multicast packet loss. This affects RIOT, because
|
||||
NDP relies on multicast packets to work correctly.
|
||||
Refer to the SDK documentation from Espressif on [AP Sleep](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/wifi.html#ap-sleep) for more information.
|
||||
|
||||
\anchor esp8266_esp_now_network_interface
|
||||
## <a name="esp8266_esp_now_network_interface"> ESP-NOW Network Interface </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## ESP-NOW Network Interface {#esp8266_esp_now_network_interface}
|
||||
|
||||
With ESP-NOW, the ESP8266 provides a connectionless communication technology,
|
||||
featuring short packet transmission. It applies the IEEE802.11 Action Vendor
|
||||
@ -781,9 +833,9 @@ ESP8266 nodes. In this network, each node can send short packets with up to
|
||||
@note Module `esp_now` is not enabled automatically if the `netdev_default`
|
||||
module is used. Instead, the application has to add the `esp_now` module in
|
||||
its makefile when needed.<br>
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE += esp_now
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
For ESP-NOW, ESP8266 nodes are used in WiFi SoftAP + Station mode to advertise
|
||||
their SSID and become visible to other ESP8266 nodes. The SSID of an ESP8266
|
||||
@ -813,31 +865,37 @@ In this case the ESP-NOW interface must use the same channel as the AP of the
|
||||
infrastructure WiFi network. All ESP-NOW nodes must therefore be compiled with
|
||||
the channel of the AP asvalue for the parameter 'ESP_NOW_CHANNEL'.
|
||||
|
||||
# <a name="esp8266_preconfigured_devices"> Preconfigured Devices </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
# Preconfigured Devices {#esp8266_preconfigured_devices}
|
||||
|
||||
The ESP8266 port of RIOT has been tested with several common external
|
||||
devices that can be connected to ESP8266 boards and are preconfigured
|
||||
accordingly.
|
||||
|
||||
## <a name="esp8266_network_devices"> Network Devices </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## Network Devices {#esp8266_network_devices}
|
||||
|
||||
RIOT provides a number of driver modules for different types of network
|
||||
devices, e.g., IEEE 802.15.4 radio modules and Ethernet modules. The RIOT
|
||||
port for ESP8266 has been tested with the following network devices:
|
||||
|
||||
- [mrf24j40](https://riot-os.org/api/group__drivers__mrf24j40.html)
|
||||
(driver for Microchip MRF24j40 based IEEE 802.15.4
|
||||
- [enc28j60](https://riot-os.org/api/group__drivers__enc28j60.html)
|
||||
- \ref drivers_mrf24j40 "mrf24j40"
|
||||
(driver for Microchip MRF24j40 based IEEE 802.15.4)
|
||||
- \ref drivers_enc28j60 "enc28j60"
|
||||
(driver for Microchip ENC28J60 based Ethernet modules)
|
||||
|
||||
### <a name="esp8266_using_mrf24j40"> Using MRF24J40 (module `mrf24j40`) </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
### Using MRF24J40 (module mrf24j40) {#esp8266_using_mrf24j40}
|
||||
|
||||
To use MRF24J40 based IEEE 802.15.4 modules as network device, the
|
||||
`mrf24j40` driver module has to be added to the makefile of the application:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE += mrf24j40
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The `mrf24j40` driver module uses the following preconfigured interface
|
||||
parameters for ESP8266 boards:
|
||||
@ -857,14 +915,16 @@ Parameter | Default | Remarks
|
||||
The GPIOs in this configuration can be overridden by
|
||||
[application-specific board configurations](#esp8266_application_specific_board_configuration).
|
||||
|
||||
### <a name="esp8266_using_enc28j60"> Using ENC28J60 (module `enc28j60`) </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
### Using ENC28J60 (module enc28j60) {#esp8266_using_enc28j60}
|
||||
|
||||
To use ENC28J60 Ethernet modules as network device, the `enc28j60` driver
|
||||
module has to be added to the makefile of the application:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE += enc28j60
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The `enc28j60` driver module uses the following preconfigured interface parameters for ESP8266 boards:
|
||||
|
||||
@ -882,16 +942,18 @@ Parameter | Default | Remarks
|
||||
The GPIOs in this configuration can be overridden by
|
||||
[application-specific board configurations](#esp8266_application_specific_board_configuration).
|
||||
|
||||
## <a name="esp8266_sd_card_device"> SD-Card Device </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## SD-Card Device {#esp8266_sd_card_device}
|
||||
|
||||
ESP8266 port of RIOT is preconfigured for RIOT applications that use the
|
||||
[SPI SD-Card driver](https://riot-os.org/api/group__drivers__sdcard__spi.html).
|
||||
\ref drivers_sdcard_spi "SPI SD-Card driver.
|
||||
To use SPI SD-Card driver, the `sdcard_spi` module has to be added to
|
||||
a makefile:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE += sdcard_spi
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The `sdcard_spi` driver module uses the following preconfigured interface
|
||||
parameters for ESP8266 boards:
|
||||
@ -908,9 +970,9 @@ Parameter | Default | Remarks
|
||||
The GPIO used as CS signal can be overridden by
|
||||
[application-specific board configurations](#esp8266_application_specific_board_configuration).
|
||||
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
\anchor esp8266_app_spec_conf
|
||||
# <a name="esp8266_application_specific_configurations"> Application-Specific Configurations </a> [[TOC](#esp8266_toc)]
|
||||
# Application-Specific Configurations {#esp8266_application_specific_configurations}
|
||||
|
||||
The board-specific configuration files `board.h` and `periph_conf.h` as
|
||||
well as the driver parameter configuration files `<driver>_params.h`
|
||||
@ -925,7 +987,9 @@ configurations for individual applications. For example, while many
|
||||
PWM channels are needed in one application, another application does
|
||||
not need PWM channels, but many ADC channels.
|
||||
|
||||
## <a name="esp8266_application_specific_board_configuration"> Application-Specific Board Configuration </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## Application-Specific Board Configuration {#esp8266_application_specific_board_configuration}
|
||||
|
||||
To override default board configurations, simply create an
|
||||
application-specific board configuration file `$APPDIR/board.h` in
|
||||
@ -937,25 +1001,25 @@ preprocessor directive as the <b>last</b> line.
|
||||
For example to override the default definition of the GPIOs that are
|
||||
used as PWM channels, the application-specific board configuration
|
||||
file `$APPDIR/board.h` could look like the following:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#ifdef CPU_ESP8266
|
||||
#define PWM0_GPIOS { GPIO12, GPIO13, GPIO14, GPIO15 }
|
||||
#endif
|
||||
|
||||
#include_next "board.h"
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
It is important to ensure that the application-specific board
|
||||
configuration `$APPDIR/board.h` is included first. Insert the following
|
||||
line as the <b>first</b> line to the application makefile `$APPDIR/Makefile`.
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
INCLUDES += -I$(APPDIR)
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@note To make such application-specific board configurations dependent
|
||||
on the ESP8266 MCU or a particular ESP8266 board, you should always
|
||||
enclose these definitions in the following constructs
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#ifdef CPU_ESP8266
|
||||
...
|
||||
#endif
|
||||
@ -963,9 +1027,11 @@ enclose these definitions in the following constructs
|
||||
#ifdef BOARD_ESP8266_ESP-12X
|
||||
...
|
||||
#endif
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
## <a name="esp8266_application_specific_driver_configuration"> Application-Specific Driver Configuration </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## Application-Specific Driver Configuration {#esp8266_application_specific_driver_configuration}
|
||||
|
||||
Using the approach for overriding board configurations, the parameters
|
||||
of drivers that are typically defined in
|
||||
@ -979,25 +1045,25 @@ that, add the `include_next` preprocessor directive as the <b>last</b> line.
|
||||
For example, to override a GPIO used for LIS3DH sensor, the
|
||||
application-specific driver parameter file `$APPDIR/<device>_params.h`
|
||||
could look like the following:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#ifdef CPU_ESP8266
|
||||
#define LIS3DH_PARAM_INT2 (GPIO_PIN(0, 4))
|
||||
#endif
|
||||
|
||||
#include_next "lis3dh_params.h"
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
It is important to ensure that the application-specific driver parameter
|
||||
file `$APPDIR/<device>_params.h` is included first. Insert the following
|
||||
line as the <b>first</b> line to the application makefile `$APPDIR/Makefile`.
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
INCLUDES += -I$(APPDIR)
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
**Please note:** To make such application-specific board configurations
|
||||
@note To make such application-specific board configurations
|
||||
dependent on the ESP8266 MCU or a particular ESP8266 board, you should
|
||||
always enclose these definitions in the following constructs:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#ifdef CPU_ESP8266
|
||||
...
|
||||
#endif
|
||||
@ -1005,26 +1071,30 @@ always enclose these definitions in the following constructs:
|
||||
#ifdef BOARD_ESP8266_ESP-12X
|
||||
...
|
||||
#endif
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# <a name="esp8266_sdk_specifics"> SDK Specific Information </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## <a name="esp8266_sdk_tasks"> SDK Tasks </a> [[TOC](#esp8266_toc)]
|
||||
# SDK Specific Information {#esp8266_sdk_specifics}
|
||||
|
||||
## SDK Tasks {#esp8266_sdk_tasks}
|
||||
|
||||
ESP8266 RTOS SDK libraries create a number of high-priority threads, see the
|
||||
listing below, which handle high priority interrupts from SoC and WiFi
|
||||
hardware. These threads are also created, if the WiFi hardware is not used.
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
pid | name | state Q | pri | stack ( used) | base addr | current
|
||||
- | isr_stack | - - | - | 2048 ( 832) | 0x3ffe8420 | 0x3ffe8c20
|
||||
1 | ppT | bl rx _ | 2 | 3632 ( 1296) | 0x3fff5df0 | 0x3fff6ac0
|
||||
2 | pmT | bl rx _ | 4 | 1072 ( 320) | 0x3fff6c70 | 0x3fff6f70
|
||||
3 | rtT | bl rx _ | 3 | 2096 ( 1376) | 0x3fff70b0 | 0x3fff77b0
|
||||
4 | esp_events | bl rx _ | 5 | 2096 ( 864) | 0x3fff7f20 | 0x3fff8600
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
## <a name="esp8266_esp_idf_heap_implementation"> SDK Heap Implementation </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## SDK Heap Implementation {#esp8266_esp_idf_heap_implementation}
|
||||
|
||||
Using module `esp_idf_heap` enables the compilation of SDK heap handling
|
||||
instead of memory management provided by `newlibc`.
|
||||
@ -1037,10 +1107,10 @@ ESP8266 IRAM (Command RAM) as the additional heap memory region.
|
||||
|
||||
The following example shows the heap when the `esp_idf_heap` is used:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Heap region 0 @40107690: 18800 (used 8, free 18792) [bytes]
|
||||
Heap region 1 @3fff1760: 59552 (used 8520, free 51032) [bytes]
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In this example, heap region 0 at address `0x401xxxxx` is located in IRAM and
|
||||
heap region 1 at address `0x3fffxxxx` in DRAM. While memory management
|
||||
@ -1048,14 +1118,16 @@ functions of `newlibc` use always heap region 1 in DRAM, functions of
|
||||
binary SDK libraries like the WiFi stack can also also heap region 0
|
||||
for 32-bit aligned data.
|
||||
|
||||
# <a name="esp8266_debugging"> Debugging </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
# Debugging {#esp8266_debugging}
|
||||
|
||||
There are two options to debug your RIOT application for ESP8266 either
|
||||
|
||||
- using `QEMU` and module `esp_gdb`, see [QEMU Mode andB](#esp8266_qemu_mode_and_gdb) or
|
||||
- using module `esp_gdbstub`, see [Module esp_gdbstub](#esp8266_esp_gdbstub).
|
||||
|
||||
## <a name="esp8266_qemu_mode_and_gdb"> QEMU Mode and GDB </a> [[TOC](#esp8266_toc)]
|
||||
## QEMU Mode and GDB {#esp8266_qemu_mode_and_gdb}
|
||||
|
||||
### Compilation for `QEMU`
|
||||
|
||||
@ -1069,16 +1141,18 @@ application.
|
||||
For debugging purposes, the application should be compiled with debugging
|
||||
information. This can either be done by using the `esp_gdb` module, for example:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE=esp_gdb make flash BOARD=esp8266-esp-12x -C tests/shell
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
### Installation of `QEMU`
|
||||
|
||||
To use `QEMU`, you have to install `QEMU` for Xtensa with ESP8266 machine
|
||||
implementation first as following.
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
cd /my/source/dir
|
||||
git clone https://github.com/gschorcht/qemu-xtensa
|
||||
cd qemu-xtensa/
|
||||
@ -1087,7 +1161,9 @@ export QEMU=/path/to/esp/qemu
|
||||
./configure --prefix=$QEMU --target-list=xtensa-softmmu --disable-werror
|
||||
make
|
||||
make install
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
### Start Debugging with `QEMU`
|
||||
|
||||
@ -1095,31 +1171,33 @@ Once the compilation has been finished, `QEMU` for Xtensa with ESP8266
|
||||
machine implementation should be available in `/path/to/esp/qemu/bin` and
|
||||
you can start it in first terminal with
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
term1> $QEMU/bin/qemu-system-xtensa -M esp8266 -nographic -serial stdio -monitor none -s -S \
|
||||
-kernel /path/to/build/dir/esp8266flash.bin
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
where `/path/to/build/dir` is the path to the application build directory
|
||||
`$(BINDIR)` where `$ELFFILE.bin` is generated by the `make` command, for example
|
||||
`$(RIOTBASE)/tests/shell/bin/esp8266-esp-12x`. After that you can
|
||||
start `GDB` in second terminal window using command:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
term2> xtensa-esp8266-elf-gdb /path/to/build/dir/image.elf
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To start debugging, you have to connect to `QEMU` from `GDB` with command:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
(gdb) target remote :1234
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@note: `QEMU` does not support the emulation of hardware interrupts or
|
||||
@note `QEMU` does not support the emulation of hardware interrupts or
|
||||
special hardware modules like the WiFi module. Applications that rely on
|
||||
interrupts or the WiFi interface can only be debugged with restrictions
|
||||
with `QEMU` and `GDB`.
|
||||
|
||||
## <a name="esp8266_esp_gdbstub"> Module `esp_gdbstub` </a> [[TOC](#esp8266_toc)]
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
## Module esp_gdbstub {#esp8266_esp_gdbstub}
|
||||
|
||||
### Compilation with `esp_gdbstub`
|
||||
|
||||
@ -1133,38 +1211,40 @@ with RIOT it had to be changed a lot.
|
||||
@note Enabling the `gdbstub` interface automatically enables the compilation
|
||||
with debug information (module `esp_gdb`) `gdbstub`.
|
||||
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
### Start Debugging with `esp_gdbstub`
|
||||
|
||||
To start debugging, the application has to be compiled using
|
||||
module `esp_gdbstub`, for example:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
USEMODULE=esp_gdbstub make flash BOARD=esp8266-esp-12x -C tests/shell
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Once, the application is flashed to ESP82666, debugging can be started as
|
||||
following.
|
||||
|
||||
1. Start in first terminal window a terminal program which connects to the
|
||||
port of the ESP8266 module as console window:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
term1> python -m serial.tools.miniterm <port> 115200
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
where `<port>` is the serial interface to which the ESP8266 module is connected,
|
||||
e.g., `/dev/ttyUSB0`.
|
||||
|
||||
2. Start GDB with the application in a second terminal window:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
term2> xtensa-esp8266-elf-gdb /path/to/the/build/dir/image.elf
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
where `/path/to/build/dir` is the path to the application build directory
|
||||
`$(BINDIR)` where `$ELFFILE.bin` is generated by the `make` command, for example
|
||||
`$(RIOTBASE)/tests/shell/bin/esp8266-esp-12x`.
|
||||
|
||||
3. Connect from `GDB` to the ESP8266 module with command:
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
(gdb) target remote <port>
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
where `<port>` is the serial interface to which the ESP8266 module is connected,
|
||||
e.g., `/dev/ttyUSB0`.
|
||||
|
||||
@ -1172,7 +1252,7 @@ By default, `gdbstub` stops the execution automatically using function
|
||||
`gdbstub_do_break` after the board initialization and before the kernel
|
||||
is initialized.
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
(gdb) tar rem /dev/ttyUSB0
|
||||
Remote debugging using /dev/ttyUSB0
|
||||
gdbstub_do_break_breakpoint_addr () at cpu/esp8266/vendor/esp-gdbstub/gdbstub-entry.S:400
|
||||
@ -1180,7 +1260,7 @@ gdbstub_do_break_breakpoint_addr () at cpu/esp8266/vendor/esp-gdbstub/gdbstub-en
|
||||
(gdb) bt
|
||||
#0 gdbstub_do_break_breakpoint_addr () at cpu/esp8266/vendor/esp-gdbstub/gdbstub-entry.S:400
|
||||
#1 0x40100f89 in gdbstub_init () at cpu/esp8266/vendor/esp-gdbstub/gdbstub.c:985
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
At this time, you can set breakpoints, execute
|
||||
the application stepwise or just continue the execution using the `continue`
|
||||
command. Please note the limitations below. Once you have started the execution
|
||||
@ -1195,13 +1275,15 @@ typed characters can be lost sporadically.
|
||||
|
||||
When you reset the ESP8266 module, you will observe a message such as the
|
||||
following after boot messages in the console window.
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
$T05#b9
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
This is simply the first GDB Remote Protocol packet that is generated as a
|
||||
result of the automatic break during the initialization when the GDB is not
|
||||
yet connected to the ESP8266 module.
|
||||
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
### Limitations of `esp_gdbstub`
|
||||
|
||||
Due to hardware limitations of the Xtensa architecture, `esp_gdbstub`
|
||||
@ -1221,14 +1303,14 @@ source code level, you have to ensure that the function you want to debug is
|
||||
located in RAM. For that purpose, add the `IRAM` attribute to that function,
|
||||
for example:
|
||||
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
|
||||
#include "esp/common_macros.h"
|
||||
...
|
||||
void IRAM my_func(void)
|
||||
{
|
||||
...
|
||||
}
|
||||
```
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Then you should be able to set a breakpoint to this function using command `bp`
|
||||
and to execute it stepwise after break.
|
||||
@ -1237,4 +1319,6 @@ Another option is to use `gdbstub_do_break()` wherever you want to break the
|
||||
execution. If you know where you want to break before downloading the program
|
||||
to the target, you can use `gdbstub_do_break()` as much as you want.
|
||||
|
||||
[Back to table of contents](#esp8266_toc)
|
||||
|
||||
*/
|
||||
|
@ -14,6 +14,7 @@
|
||||
*
|
||||
* @file
|
||||
* @brief Interface definition for the ENC28J60 driver
|
||||
* @anchor drivers_enc28j60
|
||||
*
|
||||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||
*/
|
||||
|
@ -54,6 +54,7 @@
|
||||
*
|
||||
* @file
|
||||
* @brief Interface definition for MRF24J40 based drivers
|
||||
* @anchor drivers_mrf24j40
|
||||
*
|
||||
* @author Neo Nenaco <neo@nenaco.de>
|
||||
* @author Koen Zandberg <koen@bergzand.net>
|
||||
|
@ -10,6 +10,7 @@
|
||||
* @defgroup drivers_sdcard_spi SPI SD-Card driver
|
||||
* @ingroup drivers_storage
|
||||
* @brief Driver for reading and writing sd-cards via spi interface.
|
||||
* @anchor drivers_sdcard_spi
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
|
Loading…
Reference in New Issue
Block a user