From Task Scheduling to Interrupt Management: The ESP32-FreeRTOS Example Library to Kickstart Your IoT Development

From Task Scheduling to Interrupt Management: The ESP32-FreeRTOS Example Library to Kickstart Your IoT Development

When you are still struggling with the “while(1)” loop in microcontroller programming, the absence of a Real-Time Operating System (RTOS) has become the biggest obstacle to advancing your project. The ESP32-freeRTOS open-source project provides over 20 practical examples, allowing you to easily implement task scheduling, resource synchronization, and interrupt management in C, completely bidding farewell … Read more

ESP32-S3 Practical Project – Project Requirements

ESP32-S3 Practical Project - Project Requirements

Sharing is a positive attitude towards life! Project Requirements ESP32-S3 is an MCU chip that integrates 2.4 GHz Wi-Fi and Bluetooth 5 (LE), supporting Long Range mode. The ESP32-S3 is equipped with a Xtensa® 32-bit LX7 dual-core processor, with a maximum frequency of 240 MHz, 512 KB of built-in SRAM (TCM), 45 programmable GPIO pins, … Read more

Task Analysis in FreeRTOS

Task Analysis in FreeRTOS

1.1 Task StatesApplications can contain multiple tasks, but generally, a microcontroller (MCU) in an application has only one core, meaning that at any given time, only one task is actually executed. This means a task can have one of two states, namelyRunning StateandNon-Running State. However, the non-running state can be further divided into several sub-states. … Read more

Chapter 16 of FreeRTOS: Stream Buffer

Chapter 16 of FreeRTOS: Stream Buffer

Table of Contents 1. Core Concepts of Stream Buffer 1.1 Design Purpose 1.2 Key Features 2. Practical Implementation of Efficient Data Stream Transmission 2.1 Serial Data Transmission and Reception Example 2.2 Performance Optimization Techniques 3. In-depth Comparison with Queues 4. Quick Reference for Key APIs 5. Best Practice Recommendations 1. Core Concepts of Stream Buffer … Read more

Simulink Multi-Task Code Generation and Real-Time Scheduling

Simulink Multi-Task Code Generation and Real-Time Scheduling

In the model-based design (MBD) process, multi-task code generation and real-time scheduling serve as a critical bridge connecting model design to hardware implementation. As the functionality of industrial control systems becomes increasingly complex, issues such as multi-rate sampling, real-time task priority management, and resource conflict avoidance have become significant development challenges. Simulink provides comprehensive support … Read more

Embedded Field: The Ultimate Showdown Between Linux and RTOS!

Embedded Field: The Ultimate Showdown Between Linux and RTOS!

Hello everyone, I am the Mixed Cuisine Master. Currently, many embedded devices run on RTOS and Linux systems. So, what are the differences between the two? 1. Multi-faceted Comparison 1. Real-time Performance Real-time performance ensures that tasks are completed within a specific time frame. An important metric for measuring the robustness of a real-time operating … Read more

Common Issues with STM32-FreeRTOS Adaptation for LVGL

Common Issues with STM32-FreeRTOS Adaptation for LVGL

Introduction If you find reading text tiring, you can directly search for the account name “Embedded Crafter” (same on Bilibili / Douyin / Xiaohongshu), where the video combines explanations with practical operations, making it much more efficient than just reading the documentation. Heartbeat Function If you are using FreeRTOS configured with STM32Cubemx, you need to … Read more

FreeRTOS ‘Phantom Deadlock’! System Randomly Freezes Driving the Entire Team Crazy, Finally Resolved with Priority Inheritance + SystemView

FreeRTOS 'Phantom Deadlock'! System Randomly Freezes Driving the Entire Team Crazy, Finally Resolved with Priority Inheritance + SystemView

Intelligent Terminal Control System, “Mysterious Freeze” After Running for Several Hours We developed an intelligent gateway based on STM32 + FreeRTOS for a client, featuring: Multithreaded tasks: sensor data collection, CAN communication, UI refresh, log writing Using mutexes to protect shared resources (such as LCD, Flash, serial port) Priority design was reasonable (or so we … Read more

Task Scheduling in FreeRTOS – Context Switching

Task Scheduling in FreeRTOS - Context Switching

The previous article on FreeRTOS task scheduling – startup mentioned that the first task runs in an infinite loop mode. Clearly, having only one task running is not sufficient. So how does the running task yield control of the MCU to allow other tasks to run? One way is for the task to voluntarily yield … Read more

The Temptation of the Arduino Nano R4

The Temptation of the Arduino Nano R4

The Arduino Nano R4 was just released a few days ago (July 24), similar to the somewhat useless UNO R4, and it uses a 32-bit Renesas processor. Compared to the older R3 with the ATmega328P, its performance is significantly stronger. However, Arduino gives the impression that they are not very sincere; every upgrade feels like … Read more