Complete Guide to FreeRTOS Mutexes: A Deep Dive from Concurrency Crisis to Priority Inheritance

Complete Guide to FreeRTOS Mutexes: A Deep Dive from Concurrency Crisis to Priority Inheritance

In embedded systems, concurrent access to shared resources by multiple tasks is a common challenge. Without proper synchronization mechanisms, issues such as data inconsistency and deadlocks can lead to system crashes.Mutex (Mutual Exclusion) provides an effective way to address this issue, ensuring that only one task can access shared resources at any given time. Today, … Read more

Detailed Explanation of Message Queues in FreeRTOS

Detailed Explanation of Message Queues in FreeRTOS

Scan to FollowLearn Embedded Together, learn and grow together This is a series of introductory articles on FreeRTOS. While organizing my knowledge, I hope to help beginners quickly get started and master the basic principles and usage of FreeRTOS. Quick Start with FreeRTOS – Initial Exploration of the System FreeRTOS Official Chinese Website is Now … Read more

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

Understanding the Task Module in FreeRTOS (Part 2)

Understanding the Task Module in FreeRTOS (Part 2)

The source code of the task function contains the following parts: 1. Priority handling 2. Task creation 3. Starting the first task 4. Task switching 5. Task blocking/waking The previous article focused on the first three points, while this article will start from the scheduler to discuss the task switching (scheduling) mechanism. 1. Scheduling Mechanism … Read more

QP/C: A Tailored, Compact, and Customizable Real-Time Operating System (RTOS) for Resource-Constrained MCUs

QP/C: A Tailored, Compact, and Customizable Real-Time Operating System (RTOS) for Resource-Constrained MCUs

Does embedded development often make you feel like you’re flying solo? With various interrupts, task scheduling, state machines… it can be overwhelming in a moment. Don’t worry, today I want to recommend a powerful tool—QP/C (Real-Time Event Framework), which will help your projects understand event-driven programming instantly, boosting efficiency. What is QP/C?QP/C, short for QP/C … Read more

How to Solve the Priority Inversion Problem in RTOS?

How to Solve the Priority Inversion Problem in RTOS?

Hello everyone, I am the Intelligence Guy~ During the development process of RTOS, you must have encountered the issue of priority inversion, where a low-priority task is preempted by a higher-priority task due to shared resource access, which contradicts the real-time performance of a preemptive kernel. The core of solving the priority inversion problem in … 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

Design Framework for Thread Prioritization in Embedded Systems

Design Framework for Thread Prioritization in Embedded Systems

Abstract Real-Time Operating Systems (RTOS) and Operating Systems (OS) both provide the capability to set thread priorities. We assign a unique priority to each thread based on the software functional architecture, thereby creating a hierarchy of threads within the system. However, this principle of assigning unique priorities can lead to issues, as assigning a unique … Read more

Fundamentals of Real-Time Operating System Programming in C

Fundamentals of Real-Time Operating System Programming in C

In the field of embedded systems and industrial control, the concept of a Real-Time Operating System (RTOS) is very important. They ensure that tasks are completed within a specific time frame, thus meeting strict timing requirements. This article will introduce the fundamentals of RTOS programming in C and provide code examples to help readers understand. … Read more

Introduction to FreeRTOS: Detailed Explanation and Practical Applications of Queues

Introduction to FreeRTOS: Detailed Explanation and Practical Applications of Queues

After publishing “Introduction to FreeRTOS – Queues (1)”, some students reported that they found it difficult to understand. This article builds upon the foundation laid in “Introduction to FreeRTOS – Queues (1)” and provides further explanations and insights into the concept of queues in FreeRTOS, incorporating some personal interpretations and views. Detailed Explanation and Practical … Read more