Wemos LOLIN D32 Pro

Support for Wemos LOLIN D32 Pro.

Overview [TOC]

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.

Hardware [TOC]

This section describes

MCU [TOC]

Most features of the board are provided by the ESP32 SoC. The following table summarizes these features and gives an overview of which of these features are supported by RIOT. For detailed information about the ESP32, see section .

MCU ESP32 Supported by RIOT
Vendor Espressif
Cores 1 or 2 x Tensilica Xtensa LX6 1 core
FPU yes (ULP - Ultra low power co-processor) no
RAM 520 kByte SRAM 16 kByte RTC SRAM yes
ROM 520 kByte yes
Flash 512 kByte … 16 MByte yes
Frequency 240 MHz, 160 MHz, 80 MHz yes
Power Consumption 68 mA @ 240 MHz 44 mA @ 160 MHz 31 mA @ 80 MHz 5 uA in deep sleep mode yes yes yes no
Timers 4 x 64 bit yes
ADCs 2 x SAR-ADC with up to 18 x 12 bit channels total yes
DACs 2 x DAC with 8 bit yes
GPIOs 34 (6 of them are only inputs) yes
I2Cs 2 yes
SPIs 4 yes
UARTs 3 yes
WiFi IEEE 802.11 b/g/n built in yes
Bluetooth v4.2 BR/EDR and BLE no
Ethernet MAC interface with dedicated DMA and IEEE 1588 support yes
CAN version 2.0 no
IR up to 8 channels TX/RX no
Motor PWM 2 devices x 6 channels yes
LED PWM 16 channels no
Crypto Hardware acceleration of AES, SHA-2, RSA, ECC, RNG no
Vcc 2.5 - 3.6 V
Documents Datasheet Technical Reference

Board Configuration [TOC]

The board for the Wemos LOLIN D32 Pro has the following on-board components:

  • 1 x LED
  • 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 .

Pin Default Configuration* Optional Configuration* Remarks / Prerequisites Configuration
GPIO22 i2c.h::I2C_DEV:SCL
GPIO21 i2c.h::I2C_DEV:SDA
GPIO18 spi.h::SPI_DEV:SCK
GPIO19 spi.h::SPI_DEV:MISO
GPIO23 spi.h::SPI_DEV:MOSI
GPIO5 spi.h::SPI_DEV:CS0 / LED0
GPIO4 spi.h::SPI_DEV:CS1 SD Card CS when module sdcard_spi is used
GPIO1 uart.h::UART_DEV:TxD Console (configuration is fixed)
GPIO3 uart.h::UART_DEV:RxD Console (configuration is fixed)
GPIO36 adc.h::ADC_LINE
GPIO39 adc.h::ADC_LINE
GPIO34 adc.h::ADC_LINE
GPIO35 adc.h::ADC_LINE VBat measurement (GPIO is not broken out)
GPIO32 adc.h::ADC_LINE TFT_LED when TFT is connected
GPIO33 adc.h::ADC_LINE TFT_RESET when TFT is connected
GPIO25 dac.h::DAC_LINE
GPIO26 dac.h::DAC_LINE
GPIO0 pwm.h::PWM_DEV:0 MRF24J40/ENC28J60 RESET when module mrf24j40/enc2860 is used
GPIO2 pwm.h::PWM_DEV:1 MRF24J40/ENC28J60 CS when module mrf24j40/enc2860 is used
GPIO13 - MRF24J40/ENC28J60 INT when module mrf24j40/enc2860 is used
GPIO15 -
GPIO12 - TS_CS when TFT is connected
GPIO14 - TFT_CS when TFT is connected
GPIO27 - TFT_DC when TFT is connected

* 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.h::ADC_LINE 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:

1
USEMODULE += esp_lolin_tft

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

Optional Hardware Configurations [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 to use such modules:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#ifdef BOARD_ESP32_WEMOS_LOLIN_D32_PRO

#if MODULE_MRF24J40
#define MRF24J40_PARAM_CS       GPIO15      /* MRF24J40 CS signal    */
#define MRF24J40_PARAM_RESET    GPIO2       /* MRF24J40 RESET signal */
#define MRF24J40_PARAM_INT      GPIO13      /* MRF24J40 INT signal   */
#endif

#if MODULE_ENC28J80
#define ENC28J80_PARAM_CS       GPIO15      /* ENC28J80 CS signal    */
#define ENC28J80_PARAM_RESET    GPIO2       /* ENC28J80 RESET signal */
#define ENC28J80_PARAM_INT      GPIO13      /* ENC28J80 INT signal   */
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 ) to keep the configured GPIO free for other purposes.

Board Pinout [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 in table board configuration.

The corresponding board schematic can be found here.

MCU [TOC]

Most features of the board are provided by the ESP32 SoC. The following table summarizes these features and gives an overview of which of these features are supported by RIOT. For detailed information about the ESP32, see section .

MCU ESP32 Supported by RIOT
Vendor Espressif
Cores 1 or 2 x Tensilica Xtensa LX6 1 core
FPU yes (ULP - Ultra low power co-processor) no
RAM 520 kByte SRAM 16 kByte RTC SRAM yes
ROM 520 kByte yes
Flash 512 kByte … 16 MByte yes
Frequency 240 MHz, 160 MHz, 80 MHz yes
Power Consumption 68 mA @ 240 MHz 44 mA @ 160 MHz 31 mA @ 80 MHz 5 uA in deep sleep mode yes yes yes no
Timers 4 x 64 bit yes
ADCs 2 x SAR-ADC with up to 18 x 12 bit channels total yes
DACs 2 x DAC with 8 bit yes
GPIOs 34 (6 of them are only inputs) yes
I2Cs 2 yes
SPIs 4 yes
UARTs 3 yes
WiFi IEEE 802.11 b/g/n built in yes
Bluetooth v4.2 BR/EDR and BLE no
Ethernet MAC interface with dedicated DMA and IEEE 1588 support yes
CAN version 2.0 no
IR up to 8 channels TX/RX no
Motor PWM 2 devices x 6 channels yes
LED PWM 16 channels no
Crypto Hardware acceleration of AES, SHA-2, RSA, ECC, RNG no
Vcc 2.5 - 3.6 V
Documents Datasheet Technical Reference

Board Configuration [TOC]

The board for the Wemos LOLIN D32 Pro has the following on-board components:

  • 1 x LED
  • 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 .

Pin Default Configuration* Optional Configuration* Remarks / Prerequisites Configuration
GPIO22 i2c.h::I2C_DEV:SCL
GPIO21 i2c.h::I2C_DEV:SDA
GPIO18 spi.h::SPI_DEV:SCK
GPIO19 spi.h::SPI_DEV:MISO
GPIO23 spi.h::SPI_DEV:MOSI
GPIO5 spi.h::SPI_DEV:CS0 / LED0
GPIO4 spi.h::SPI_DEV:CS1 SD Card CS when module sdcard_spi is used
GPIO1 uart.h::UART_DEV:TxD Console (configuration is fixed)
GPIO3 uart.h::UART_DEV:RxD Console (configuration is fixed)
GPIO36 adc.h::ADC_LINE
GPIO39 adc.h::ADC_LINE
GPIO34 adc.h::ADC_LINE
GPIO35 adc.h::ADC_LINE VBat measurement (GPIO is not broken out)
GPIO32 adc.h::ADC_LINE TFT_LED when TFT is connected
GPIO33 adc.h::ADC_LINE TFT_RESET when TFT is connected
GPIO25 dac.h::DAC_LINE
GPIO26 dac.h::DAC_LINE
GPIO0 pwm.h::PWM_DEV:0 MRF24J40/ENC28J60 RESET when module mrf24j40/enc2860 is used
GPIO2 pwm.h::PWM_DEV:1 MRF24J40/ENC28J60 CS when module mrf24j40/enc2860 is used
GPIO13 - MRF24J40/ENC28J60 INT when module mrf24j40/enc2860 is used
GPIO15 -
GPIO12 - TS_CS when TFT is connected
GPIO14 - TFT_CS when TFT is connected
GPIO27 - TFT_DC when TFT is connected

* 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.h::ADC_LINE 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:

1
USEMODULE += esp_lolin_tft

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

Optional Hardware Configurations [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 to use such modules:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#ifdef BOARD_ESP32_WEMOS_LOLIN_D32_PRO

#if MODULE_MRF24J40
#define MRF24J40_PARAM_CS       GPIO15      /* MRF24J40 CS signal    */
#define MRF24J40_PARAM_RESET    GPIO2       /* MRF24J40 RESET signal */
#define MRF24J40_PARAM_INT      GPIO13      /* MRF24J40 INT signal   */
#endif

#if MODULE_ENC28J80
#define ENC28J80_PARAM_CS       GPIO15      /* ENC28J80 CS signal    */
#define ENC28J80_PARAM_RESET    GPIO2       /* ENC28J80 RESET signal */
#define ENC28J80_PARAM_INT      GPIO13      /* ENC28J80 INT signal   */
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 ) to keep the configured GPIO free for other purposes.

Board Pinout [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 in table board configuration.

The corresponding board schematic can be found here.

Flashing the Device [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:

1
make flash BOARD=esp32-wemos-lolin-d32-pro ...
For detailed information about ESP32 as well as configuring and compiling RIOT for ESP32 boards, see .