Mastering Embedded Multithreading with FreeRTOS: Starting from Tasks

Mastering Embedded Multithreading with FreeRTOS: Starting from Tasks

Detailed Explanation of FreeRTOS Tasks and Development Considerations for ESP32 1. Basics of FreeRTOS Tasks 1. What is a Task? In FreeRTOS, a Task is the basic unit of system scheduling, similar to a thread. Each task is an infinite loop function managed by the FreeRTOS scheduler, which controls the execution order. Tasks are scheduled … Read more

Weather Action ESP32: Displaying Weather on LCD

Weather Action ESP32: Displaying Weather on LCD

In the previous chapter, we obtained the weather parameters for the current location by parsing <span><span>JSON</span></span> data. The next step is to display this information on the <span><span>LCD</span></span>. A well-designed display interface can greatly enhance the product’s quality. We can compare the display of a typical microcontroller project with that of a mobile phone or … Read more

ESP32 Hardware Security Mechanisms: Hardware Acceleration of Cryptographic Algorithms

ESP32 Hardware Security Mechanisms: Hardware Acceleration of Cryptographic Algorithms

The hardware security mechanisms of the ESP32 include hardware acceleration of cryptographic algorithms, which is one of its core features. By integrating a dedicated hardware encryption engine, the ESP32 can efficiently perform various cryptographic operations, significantly enhancing security while reducing CPU load and power consumption. Below is a detailed analysis: 1. Role and Advantages of … Read more

Connecting WiFi and BLE to MCU? It’s Never Been Easier with ESP32 and RT-Thread

Connecting WiFi and BLE to MCU? It's Never Been Easier with ESP32 and RT-Thread

1. Introduction Recently, a colleague shared a highly valuable technical article titled “Mastering WiFi with SPI: A Deep Dive into the RT-Thread ESP-Hosted Driver | Technical Collection“. Although its technical stack design is refreshing (providing a complete analysis from low-level protocols to high-level drivers), it has received little attention due to the fast-paced content consumption … Read more

Deep Power Management Development with ESP32: Wake Source Configuration

Deep Power Management Development with ESP32: Wake Source Configuration

The deep sleep mode of the ESP32 allows for ultra-low power consumption (in the microamp range) by configuring wake sources, making it suitable for IoT devices that require long standby times. Below are the methods for configuring wake sources in the ESP32 deep sleep mode along with code examples: 1. Types of Wake Sources The … Read more

ESP32 Multicore Programming Techniques: Interrupt Handling Mechanism

ESP32 Multicore Programming Techniques: Interrupt Handling Mechanism

In the dual-core architecture of the ESP32, the interrupt handling mechanism is key to achieving efficient real-time response. The ESP32 supports multicore interrupt handling (Core 0 and Core 1), but it needs to be combined with FreeRTOS task scheduling and synchronization mechanisms to fully leverage its performance. Below are the core technologies, configuration methods, and … Read more

Comprehensive Guide to Creating and Analyzing ESP32 Project Structures

Comprehensive Guide to Creating and Analyzing ESP32 Project Structures

Comprehensive Guide to Creating and Analyzing ESP32 Project Structures 1. Methods for Creating ESP32 Projects 1. Creating an ESP-IDF Project # Create a new project idf.py create-project my_esp32_project # Project directory structure my_esp32_project/ ├── CMakeLists.txt ├── main/ │ ├── CMakeLists.txt │ └── main.c └── sdkconfig 2. Creating an Arduino IDE Project File > New Save … Read more

Deep Power Consumption Development of ESP32: Data Preservation in Sleep Mode

Deep Power Consumption Development of ESP32: Data Preservation in Sleep Mode

In the Deep Sleep mode of the ESP32, data in ordinary memory is lost because the main CPU and most peripherals are powered off. However, RTC Memory (RTC Slow/Fast Memory) and non-volatile storage (such as Flash/NVS) can be used to preserve data during sleep. Below are detailed methods and considerations for data preservation: 1. Data … Read more

ESP32 Actuator Control: Relay Interface Design

ESP32 Actuator Control: Relay Interface Design

ESP32 Relay Interface Design Guide 1. Basic Principles of Relays Functions and Types of Relays A relay is an electromagnetic switch that controls a high-voltage circuit (110V/220V) through a low-voltage control signal (3.3V/5V). The common types used in the ESP32 system are: Type Control Signal Load Capacity Isolation Method Features Mechanical Relay Low Current Up … Read more

Integration of ESP32 Functional Modules: Real-Time Clock Applications

Integration of ESP32 Functional Modules: Real-Time Clock Applications

In-Depth Guide to ESP32 Real-Time Clock (RTC) Applications 1. ESP32 Clock System Architecture ESP32 Time Management Components The time management system of the ESP32 consists of three core components: Main CPU Clock typically operates at 80MHz or 240MHz for processor core calculations. Built-in RTC Module based on a low-power 32.768kHz crystal oscillator, operates independently. Time … Read more