Jan Beran

View on GitHub

Lecture: ESP-IDF introduction

Info: Compared to the ESP32-C6 version of this workshop, the ESP32-C5 track intentionally skips the dedicated protocols/TLS chapter. If you want to explore that topic in depth, use the ESP-IDF examples, esp-protocols, or the ESP32-C6 workshop.

The ESP-IDF (Espressif IoT Development Framework) is the official operating system and development framework for the ESP32 series of microcontrollers by Espressif Systems. It provides a comprehensive environment for building IoT applications with robust networking, security, and reliability features.

ESP-IDF framework includes FreeRTOS that allows developers to create real-time, multitasking applications. With extensive libraries, components, protocols, tools, and documentation, ESP-IDF simplifies the development process enabling seamless integration with hardware peripherals, such as Wi-Fi, Bluetooth, Thread, ZigBee, and cloud services.

ESP-IDF includes almost 400 examples, covering a wide range of use cases and helping developers quickly get started on their projects.

Architecture

The ESP-IDF platform architecture is mainly divided into 3 layers:

ESP-IDF high-level architecture

All the necessary blocks for building your application will be included on the ESP-IDF platform.

Frameworks

Several other frameworks use ESP-IDF as a base, including:

To see all the supported frameworks, please visit our GitHub organization page.

Current supported versions

Visit the ESP-IDF project on GitHub to get the updated list of supported versions and the maintenance period.

espressif/esp-idf on GitHub

Introduction to the ESP32-C5

The ESP32-C5 is a Ultra-low-power SoC with RISC-V single-core microprocessor, 2.4 GHz Wi-Fi 6 (802.11ax), Bluetooth® 5 (LE), Zigbee and Thread (802.15.4). It has an optional 4 MB flash in the chip’s package, 30 or 22 GPIOs, rich set of peripherals including:

ESP32-C5 block diagram

For more details, please see the product ESP32-C5 Datasheet.

Wi-Fi 6 (IEEE 802.11ax)

Wi-Fi 6, also known as IEEE 802.11ax, represents the latest generation of Wi-Fi technology, designed to improve efficiency, capacity, and performance in various environments. Key features of Wi-Fi 6, as seen in devices like the ESP32-C5, include:

Wi-Fi MAC support for the 802.11ax:

Resources

Introduction to the ESP32-C5-DevKit-C

The ESP32-C5-DevKitC-1 is a beginner-friendly development board featuring the ESP32-C5-WROOM-1(U) module, which includes an 8 MB SPI flash. This board offers comprehensive Wi-Fi, Bluetooth LE, Zigbee, and Thread capabilities.

To facilitate easy interfacing, most of the I/O pins are accessible through pin headers on both sides. Developers can connect peripherals using jumper wires or mount the ESP32-C5-DevKitC-1 on a breadboard.

Features

Here is the development board feature list:

Board description

ESP32-C5-DevKitC-1 annotated photo

ESP32-C5-DevKitC-1 block diagram

Board pin-layout

ESP32-C5-DevKitC-1 pin layout

J1 connector

No. Name Type Function
1 3V3 P 3.3 V power supply
2 RST I High: enables the chip; Low: disables the chip.
3 2 I/O/T MTMS, GPIO2, LP_GPIO2, LP_UART_RTSN, LP_I2C_SDA, ADC1_CH1, FSPIQ
4 3 I/O/T MTDI, GPIO3, LP_GPIO3, LP_UART_CTSN, LP_I2C_SCL, ADC1_CH2
5 0 I/O/T GPIO0, XTAL_32K_P, LP_GPIO0, LP_UART_DTRN
6 1 I/O/T GPIO1, XTAL_32K_N, LP_GPIO1, LP_UART_DSRN, ADC1_CH0
7 6 I/O/T GPIO6, LP_GPIO6, ADC1_CH5, FSPICLK
8 7 I/O/T GPIO7, FSPID, SDIO_DATA1
9 8 I/O/T GPIO8, PAD_COMP0, SDIO_DATA0
10 9 I/O/T GPIO9, PAD_COMP1, SDIO_CLK
11 10 I/O/T GPIO10, FSPICS0, SDIO_CMD
12 26 I/O/T GPIO26
13 25 I/O/T GPIO25
14 5V P 5 V power supply
15 G G Ground
16 NC No connection

J3 connector

No. Name Type Function
1 G G Ground
2 TX I/O/T U0TXD, GPIO11
3 RX I/O/T U0RXD, GPIO12
4 24 I/O/T GPIO24
5 23 I/O/T GPIO23
6 NC/15 I/O/T No connection/GPIO15
7 27 I/O/T GPIO27
8 4 I/O/T MTCK, GPIO4, LP_GPIO4, LP_UART_RXD, ADC1_CH3, FSPIHD
9 5 I/O/T MTDO, GPIO5, LP_GPIO5, LP_UART_TXD, ADC1_CH4, FSPIWP
10 NC No connection
11 28 I/O/T GPIO28
12 G G Ground
13 14 I/O/T GPIO14, USB_D+, SDIO_DATA2
14 13 I/O/T GPIO13, USB_D-, SDIO_DATA3
15 G G Ground
16 NC No connection

Next step

After this introduction, it’s time to get started and install the development environment.

Assignment 1: Install the Espressif-IDE