Microcontroller Programming Framework: Evolution from Polling to Real-Time Operating Systems

Microcontroller Programming Framework: Evolution from Polling to Real-Time Operating Systems

In embedded system development, the choice of microcontroller programming framework is crucial as it directly affects the system’s efficiency, real-time performance, and maintainability. Below are several common microcontroller programming frameworks and their characteristics: 1. Polling without Interrupt FrameworkCharacteristics: All tasks are executed in a fixed order without an interrupt mechanism.Applicable Scenarios: Simple applications with low … Read more

Essential Knowledge for Embedded Projects – Basics of Operating Systems

Essential Knowledge for Embedded Projects - Basics of Operating Systems

RTOS (Real-Time Operating System) Real-Time Characteristics: The ability to respond to external events and execute tasks within a specified time frame, such as in industrial control, ensuring precise timing for sensor signal acquisition and actuator control operations, thereby maintaining the stable and efficient operation of automated production lines. Task Scheduling Mechanism: Understanding preemptive scheduling (where … Read more

Getting Started with FreeRTOS V11.0 SMP in the Era of Embedded Multicore

Getting Started with FreeRTOS V11.0 SMP in the Era of Embedded Multicore

Hello everyone, welcome to <span>LiXin Embedded</span>. FreeRTOS V11.0 provides support for Symmetric Multi-Processing (SMP) on multicore systems. Previously, multicore development often required using various branch versions of FreeRTOS, which was quite cumbersome. Now, V11.0 integrates SMP directly into the mainline, allowing seamless switching between single-core and multicore. Today, we will discuss how to apply this … Read more

Task Scheduling Algorithms in C: Round Robin and Priority Scheduling

Task Scheduling Algorithms in C: Round Robin and Priority Scheduling

In operating systems, task scheduling is a crucial concept. It determines how multiple processes or threads share CPU resources. In this article, we will introduce two common task scheduling algorithms: Round Robin Scheduling and Priority Scheduling. We will demonstrate the implementation of these two algorithms through C language code examples. 1. Round Robin Scheduling 1.1 … Read more

Understanding Task Scheduling in FreeRTOS

Understanding Task Scheduling in FreeRTOS

1. Task Scheduling FreeRTOS is a lightweight real-time operating system kernel, and one of its core functions is task scheduling. Task scheduling is the core mechanism of FreeRTOS, determining which task runs at any given moment, when to switch tasks, and how to handle task priorities. 1.1. Task Definition Task “Task” is the basic execution … Read more

Interrupt Management and Configuration in FreeRTOS Development

Interrupt Management and Configuration in FreeRTOS Development

1. Interrupt Priority <span>Cortex-M</span> series cores (such as <span>M3/M4/M7</span>) use the <span>NVIC</span> (Nested Vectored Interrupt Controller) to support interrupt nesting and priority management. It employs a grouping mechanism that divides interrupt priority into two parts: Preemption Priority: Determines whether the current interrupt can interrupt other interrupts. Subpriority: Determines the response order when preemption priorities are … Read more

C++ Priority Queue Practical Guide: From Basic Usage to High-Performance Scheduler Analysis

C++ Priority Queue Practical Guide: From Basic Usage to High-Performance Scheduler Analysis

Core Value of Priority Queue The <span>priority_queue</span> container adapter in the C++ Standard Library provides an efficient way to maintain a priority data structure. This article will delve into its core features and demonstrate its applications in system design and algorithm optimization through practical examples. Basic Usage Analysis #include <iostream> #include <queue> int main() { … Read more

Scheduling Commands and Scripts to Run Automatically at Specific Times and Dates Using the ‘at’ Command in Linux

Scheduling Commands and Scripts to Run Automatically at Specific Times and Dates Using the 'at' Command in Linux

<span>at</span> is a command-line tool used to automatically execute various commands or scripts at a specified time and date. Tasks created with <span>at</span> are executed only once, making it an ideal tool for managing one-time tasks at precise time points. This article will introduce how to use <span>at</span> along with its companion tools <span>batch</span>, <span>atq</span>, … Read more

Should You Use RTOS? Here Are the Answers

Should You Use RTOS? Here Are the Answers

Follow andstar our public account to not miss exciting content Readers have been asking various questions about RTOS, such as: Should I learn RTOS now? What are the benefits of learning RTOS? Should my project run on RTOS? …and other questions regarding RTOS. Ultimately, it boils down to your insufficient understanding of RTOS and lack … Read more

MCU in Embedded Development – Task Management in FreeRTOS

MCU in Embedded Development - Task Management in FreeRTOS

Continuing from the previous article, we have already learned about the porting and startup process of FreeRTOS. Today, we will continue to study the task management part of FreeRTOS, starting with understanding what a task is. 1. Task 1.1 Introduction to Tasks (1) In bare-metal systems, we generally use a front-and-back system for development. If … Read more