|
| 1 | +<!-- |
| 2 | +SPDX-FileCopyrightText: 2025 Gunar Schorcht |
| 3 | +SPDX-License-Identifier: LGPL-2.1-only |
| 4 | +--> |
| 5 | + |
| 6 | +@defgroup boards_arduino_nano_esp32 Arduino Nano ESP32 |
| 7 | +@ingroup boards |
| 8 | +@ingroup boards_esp32s3 |
| 9 | +@brief Support for the Arduino Nano ESP32 board |
| 10 | +@author Gunar Schorcht <[email protected]> |
| 11 | + |
| 12 | +\section arduino_nano_esp32 Arduino Nano ESP32 |
| 13 | + |
| 14 | +## Table of Contents {#arduino_nano_esp32_toc} |
| 15 | + |
| 16 | +-# [Overview](#arduino_nano_esp32_overview) |
| 17 | +-# [Hardware](#arduino_nano_esp32_hardware) |
| 18 | + -# [MCU](#arduino_nano_esp32_mcu) |
| 19 | + -# [Board Configuration](#arduino_nano_esp32_board_configuration) |
| 20 | + -# [Board Pinout](#arduino_nano_esp32_pinout) |
| 21 | +-# [Flashing the Device](#arduino_nano_esp32_flashing) |
| 22 | +-# [Using STDIO](#arduino_nano_esp32_stdio) |
| 23 | + |
| 24 | +## Overview {#arduino_nano_esp32_overview} |
| 25 | + |
| 26 | +The [Arduino Nano ESP32](https://docs.arduino.cc/hardware/nano-esp32/) is an |
| 27 | +ESP32-S3 board in Arduino Nano format that uses the u-Blox NORA-W106 module. |
| 28 | +@image html https://store.arduino.cc/cdn/shop/files/ABX00092_00.default_643x483.jpg "Arduino Nano ESP32" width=400px |
| 29 | + |
| 30 | +The main features of the board are: |
| 31 | + |
| 32 | +- ESP32-S3 SoC with 2.4 GHz WiFi 802.11b/g/n and Bluetooth5, BLE |
| 33 | +- 8 MByte embedded QSPI RAM |
| 34 | +- 16 MByte Flash |
| 35 | +- RGB LED with separate colour LEDs |
| 36 | +- Native USB and USB Serial JTAG |
| 37 | + |
| 38 | +[Back to table of contents](#arduino_nano_esp32_toc) |
| 39 | + |
| 40 | +## Hardware {#arduino_nano_esp32_hardware} |
| 41 | + |
| 42 | +This section describes |
| 43 | + |
| 44 | +- the [MCU](#arduino_nano_esp32_mcu), |
| 45 | +- the default [board configuration](#arduino_nano_esp32_board_configuration), |
| 46 | +- the [board pinout](#arduino_nano_esp32_pinout). |
| 47 | + |
| 48 | +[Back to table of contents](#arduino_nano_esp32_toc) |
| 49 | + |
| 50 | +### MCU {#arduino_nano_esp32_mcu} |
| 51 | + |
| 52 | +Most features of the board are provided by the ESP32-S3 SoC. For detailed |
| 53 | +information about the ESP32-S3 SoC variant (family) and ESP32x SoCs, |
| 54 | +see section \ref esp32_mcu_esp32 "ESP32 SoC Series". |
| 55 | + |
| 56 | +[Back to table of contents](#arduino_nano_esp32_toc) |
| 57 | + |
| 58 | +### Board Configuration {#arduino_nano_esp32_board_configuration} |
| 59 | + |
| 60 | +Arduino Nano ESP32 boards have no special hardware on board with the exception |
| 61 | +of an RGB-LED with separate LEDs for each color. |
| 62 | + |
| 63 | +The board configuration provides: |
| 64 | + |
| 65 | +- 8 x ADC channels (4 x ADC channels if module `periph_i2c` is used) |
| 66 | +- 1 x SPI |
| 67 | +- 1 x I2C |
| 68 | +- 1 x UART |
| 69 | +- 2 x PWM (4 channels on PWM_DEV(0), 3 RGB LED channels on PWM_DEV(1)) |
| 70 | + |
| 71 | +The following table shows the default board configuration, which is sorted |
| 72 | +according to the defined functionality of GPIOs. This configuration can be |
| 73 | +overridden by \ref esp32_application_specific_configurations |
| 74 | +"application-specific configurations". |
| 75 | + |
| 76 | +<center> |
| 77 | +Function | GPIOs | Remarks | Configuration |
| 78 | +:---------------|:-------|:--------|:---------------------------------- |
| 79 | +ADC_LINE(0) | GPIO1 | | \ref esp32_adc_channels "ADC Channels" |
| 80 | +ADC_LINE(1) | GPIO2 | | \ref esp32_adc_channels "ADC Channels" |
| 81 | +ADC_LINE(2) | GPIO3 | | \ref esp32_adc_channels "ADC Channels" |
| 82 | +ADC_LINE(3) | GPIO4 | | \ref esp32_adc_channels "ADC Channels" |
| 83 | +ADC_LINE(4) | GPIO11 | N/A if `periph_i2c` is used | \ref esp32_adc_channels "ADC Channels" |
| 84 | +ADC_LINE(5) | GPIO12 | N/A if `periph_i2c` is used | \ref esp32_adc_channels "ADC Channels" |
| 85 | +ADC_LINE(6) | GPIO13 | N/A if `periph_i2c` is used | \ref esp32_adc_channels "ADC Channels" |
| 86 | +ADC_LINE(7) | GPIO14 | N/A if `periph_i2c` is used | \ref esp32_adc_channels "ADC Channels" |
| 87 | +PWM_DEV(0):0 | GPIO6 | | \ref esp32_pwm_channels "PWM Channels" |
| 88 | +PWM_DEV(0):1 | GPIO8 | | \ref esp32_pwm_channels "PWM Channels" |
| 89 | +PWM_DEV(0):2 | GPIO9 | | \ref esp32_pwm_channels "PWM Channels" |
| 90 | +PWM_DEV(0):3 | GPIO18 | | \ref esp32_pwm_channels "PWM Channels" |
| 91 | +PWM_DEV(1):0 | GPIO46 | LED red | \ref esp32_pwm_channels "PWM Channels" |
| 92 | +PWM_DEV(1):1 | GPIO0 | LED green | \ref esp32_pwm_channels "PWM Channels" |
| 93 | +PWM_DEV(1):2 | GPIO45 | LED blue | \ref esp32_pwm_channels "PWM Channels" |
| 94 | +I2C_DEV(0):SCL | GPIO12 | | \ref esp32_i2c_interfaces "I2C Interfaces" |
| 95 | +I2C_DEV(0):SDA | GPIO11 | | \ref esp32_i2c_interfaces "I2C Interfaces" |
| 96 | +SPI_DEV(0):CLK | GPIO48 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces" |
| 97 | +SPI_DEV(0):MISO | GPIO47 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces" |
| 98 | +SPI_DEV(0):MOSI | GPIO38 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces" |
| 99 | +SPI_DEV(0):CS0 | GPIO21 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces" |
| 100 | +UART_DEV(0):TxD | GPIO43 | Console (fixed) | \ref esp32_uart_interfaces "UART interfaces" |
| 101 | +UART_DEV(0):RxD | GPIO44 | Console (fixed) | \ref esp32_uart_interfaces "UART interfaces" |
| 102 | +</center> |
| 103 | +\n |
| 104 | + |
| 105 | +For detailed information about the peripheral configurations of ESP32-S3 |
| 106 | +boards, see section \ref esp32_peripherals "Common Peripherals". |
| 107 | + |
| 108 | +[Back to table of contents](#arduino_nano_esp32_toc) |
| 109 | + |
| 110 | +### Board Pinout {#arduino_nano_esp32_pinout} |
| 111 | + |
| 112 | +The following figure shows the pinout as configured by board definition. |
| 113 | + |
| 114 | +@image html https://edistechlab.com/wp-content/uploads/2023/11/Pinout_arduino_nano_esp32.png "Arduino Nano ESP32 Pinout" width=600px |
| 115 | + |
| 116 | +An advanced pinout version with front view, back view and some additional |
| 117 | +information can be found |
| 118 | +[here](https://docs.arduino.cc/resources/pinouts/ABX00083-full-pinout.pdf). |
| 119 | +The corresponding board schematic can be found |
| 120 | +[here](https://docs.arduino.cc/resources/schematics/ABX00083-schematics.pdf). |
| 121 | + |
| 122 | +[Back to table of contents](#arduino_nano_esp32_toc) |
| 123 | + |
| 124 | +## Flashing the Device {#arduino_nano_esp32_flashing} |
| 125 | + |
| 126 | +Since the board does not have a USB-to-Serial chip, the easiest way to flash |
| 127 | +the board is using the USB Serial/JTAG interface. Just connect the board to |
| 128 | +your host computer and use the following command: |
| 129 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 130 | +BOARD=arduino-nano-esp32 make flash ... |
| 131 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 132 | + |
| 133 | +@note Usually the make system resets the board before flashing to enable the |
| 134 | +USB Serial/JTAG interface. In some special cases this reset does not work so |
| 135 | +that the programmer cannot connect to the board and the flashing is aborted |
| 136 | +with a timeout: |
| 137 | +``` |
| 138 | +Serial port /dev/ttyACM0 |
| 139 | +Connecting... |
| 140 | +... |
| 141 | +serial.serialutil.SerialTimeoutException: Write timeout |
| 142 | +``` |
| 143 | +This can happen for example if the board is not yet flashed with RIOT or the |
| 144 | +USB interface is used for another purpose. In this case, restart the board |
| 145 | +manually in download mode by pressing and releasing the RESET button while |
| 146 | +pulling down the GPIO0 (B1) pin. In download mode, the USB Serial/JTAG |
| 147 | +interface is always available. |
| 148 | + |
| 149 | +Alternatively, an external USB-to-Serial adapter can be used. In this case, |
| 150 | +the USB-to-Serial adapter has to be connected to TxD (GPIO43) and RxD (GPIO44) |
| 151 | +of the UART0 interface. Before RIOT can be flashed, the board has also to be |
| 152 | +switched to download mode. To do this, press and release the RESET button |
| 153 | +while pulling down the GPIO0 (B1) pin. Once the board is in download mode, use |
| 154 | +the following command to flash RIOT: |
| 155 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 156 | +BOARD=arduino-nano-esp32 make flash ... |
| 157 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 158 | + |
| 159 | +For detailed information about ESP32-S3 as well as configuring and compiling |
| 160 | +RIOT for ESP32-S3 boards, see \ref esp32_riot. |
| 161 | + |
| 162 | +[Back to table of contents](#arduino_nano_esp32_toc) |
| 163 | + |
| 164 | +## Using STDIO {#arduino_nano_esp32_stdio} |
| 165 | + |
| 166 | +Since the board does not have a USB-to-Serial chip, the USB Serial/JTAG |
| 167 | +interface is used by default for the STDIO (module `stdio_usb_serial_jtag`) |
| 168 | +which provides an USB CDC ACM interface. |
| 169 | + |
| 170 | +If the USB port is used by the USBUS stack or the tinyUSB stack, implicitly |
| 171 | +the module `stdio_cdc_acm` or `stdio_tinyusb_cdc_acm` is used for the STDIO |
| 172 | +via the USB CDC ACM interface. |
| 173 | + |
| 174 | +Alternatively, the UART interface could be used with an external USB-to-Serial |
| 175 | +adapter. Simply add `stdio_uart` to the list of used modules for this purpose: |
| 176 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 177 | +BOARD=arduino-nano-esp32 USEMODULE=stdio_uart make flash ... |
| 178 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
0 commit comments