TTGO T-Beam

Support for TTGO T-Beam boards. More...

Detailed Description

Support for TTGO T-Beam boards.

Author
Yegor Yefremov yegor.nosp@m.slis.nosp@m.ts@go.nosp@m.ogle.nosp@m.mail..nosp@m.com

<a name="toc"> Table of Contents </a>

  1. Overview
  2. Hardware
    1. MCU
    2. Board Configuration
    3. Board Pinout
    4. Optional Hardware Configurations
  3. Flashing the Device

<a name="overview"> Overview </a>    [<a href="#toc">TOC</a>]

TTGO T-Beam is an ESP32 development board with 4 MB Flash that uses the EPS32 chip directly. It integrates:

There are at least three board types: rev0, rev1, and V1.0. Versions 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>    [<a href="#toc">TOC</a>]

This section describes

<a name="mcu"> MCU </a>    [<a href="#toc">TOC</a>]

Most features of the board are provided by the ESP32 SoC. For detailed information about the ESP32, see section MCU ESP32.

<a name="board_configuration"> Board Configuration </a>    [<a href="#toc">TOC</a>]

TTGO T-Beam has the following on-board components:

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 ADC_GPIOS and the PWM channel definition PWM0_GPIOS.

This is possible because GPIOs are only used for a specific peripheral interface when

That is, the purpose for which a GPIO is actually used depends on which module or function is used first.

Note
GPIOs 5, 12, 15, 16, 17, 18, 19, 26, and 27 are used for board control functions and should not be used for other purposes 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 application-specific configurations.

TTGO- T-Beam rev1

Function GPIOs Remarks Configuration
BUTTON0 GPIO39 low active
LED0 GPIO14 high active
ADC GPIO0, GPIO2, GPIO4, GPIO13,
GPIO25, GPIO32, GPIO33, GPIO34,
GPIO35
ADC Channels
DAC GPIO25 DAC Channels
PWM_DEV(0) GPIO0, GPIO2, GPIO25 PWM Channels
I2C_DEV(0):SDA GPIO21 I2C Interfaces
I2C_DEV(0):SCL GPIO22 I2C_SPEED_FAST is used I2C Interfaces
SPI_DEV(0):CLK GPIO5 VSPI is used SPI Interfaces
SPI_DEV(0):MISO GPIO19 VSPI is used SPI Interfaces
SPI_DEV(0):MOSI GPIO27 VSPI is used SPI Interfaces
SPI_DEV(0):CS0 GPIO18 VSPI is used SPI Interfaces
UART_DEV(0):TxD GPIO1 Console (configuration is fixed) UART interfaces
UART_DEV(0):RxD GPIO3 Console (configuration is fixed) UART interfaces
UART_DEV(1):TxD GPIO15 GPS (configuration is fixed) UART interfaces
UART_DEV(1):RxD GPIO12 GPS (configuration is fixed) UART interfaces

TTGO- T-Beam V1.0

Function GPIOs Remarks Configuration
BUTTON0 GPIO38 low active
ADC GPIO0, GPIO2, GPIO4, GPIO13,
GPIO25, GPIO32, GPIO33, GPIO35
ADC Channels
DAC GPIO25 DAC Channels
PWM_DEV(0) GPIO0, GPIO2, GPIO25 PWM Channels
I2C_DEV(0):SDA GPIO21 I2C Interfaces
I2C_DEV(0):SCL GPIO22 I2C_SPEED_FAST is used I2C Interfaces
SPI_DEV(0):CLK GPIO5 VSPI is used SPI Interfaces
SPI_DEV(0):MISO GPIO19 VSPI is used SPI Interfaces
SPI_DEV(0):MOSI GPIO27 VSPI is used SPI Interfaces
SPI_DEV(0):CS0 GPIO18 VSPI is used SPI Interfaces
UART_DEV(0):TxD GPIO1 Console (configuration is fixed) UART interfaces
UART_DEV(0):RxD GPIO3 Console (configuration is fixed) UART interfaces
UART_DEV(1):TxD GPIO34 GPS (configuration is fixed) UART interfaces
UART_DEV(1):RxD GPIO12 GPS (configuration is fixed) UART interfaces


Note
  • The configuration of ADC channels contains all ESP32 GPIOs that can be used as ADC channels.

For detailed information about the configuration of ESP32 boards, see section Common Peripherals.

<a name="pinout"> Board Pinout </a>    [<a href="#toc">TOC</a>]

The following figures show the pinout of the defined default configurations for TTGO T-Beam boards.

TTGO T-Beam rev1 Pintout Diagram

TTGO T-Beam V1.0 Pintout Diagram

The corresponding board schematics can be found on TinyMicros.com for TTGO T-Beam rev0 and GitHub for TTGO T-Beam V1.0

<a name="flashing"> Flashing the Device </a>    [<a href="#toc">TOC</a>]

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 RIOT-OS on ESP32 boards.

Files

file  arduino_board.h
 Board specific configuration for the Arduino API.
 
file  arduino_pinmap.h
 Mapping from MCU pins to Arduino pins.
 
file  board.h
 Board specific definitions for TTGO T-Beam board.
 
file  gpio_params.h
 Board specific configuration of direct mapped GPIOs.
 
file  periph_conf.h
 Peripheral MCU configuration for TTGO T-Beam board.