Introduction to FreeRTOS on STM32

When working on STM32 or other microcontroller projects, you often hear others say: “This project uses FreeRTOS.” What exactly is FreeRTOS? What benefits does it bring us? This article will provide a brief introduction to FreeRTOS. 1. What is FreeRTOS? Let’s break down the nameπŸ‘‡ Free β†’ Free of charge RTOS β†’ Real-Time Operating System … Read more

Mastering FreeRTOS from Scratch (2): Definition of List Node

Mastering FreeRTOS from Scratch (2): Definition of List Node

In the previous article, we completed the porting of FreeRTOS. In FreeRTOS, all functionalities are divided into tasks, which need to be mounted on a linked list. In this chapter, we will master the various types of nodes in a linked list. Before creating tasks, we need to understand the operating mechanism of FreeRTOS. FreeRTOS … Read more

The Secret Weapon of RTOS Multitasking: A Detailed Explanation of Scheduling Mechanisms

The Secret Weapon of RTOS Multitasking: A Detailed Explanation of Scheduling Mechanisms

Introduction Have you ever wondered how your phone can play music, receive messages, and allow you to browse the web smoothly at the same time? One of the key contributors behind this is the multitasking operating system. In the embedded world, the Real-Time Operating System (RTOS) is the magician that enables this “simultaneous” processing of … Read more

Detailed Explanation of FreeRTOS Multitasking Execution Principles – Part Two

Detailed Explanation of FreeRTOS Multitasking Execution Principles - Part Two

Detailed Explanation of FreeRTOS Multitasking Switching Underlying Principles 6. Task State Transitions 6.1 State Transition Diagram Create Ready Queue CPU Execution [NEW] —–> [READY] —–> [RUNNING] ↑ ↓ ↓ ↑ ↓ [Time Slice Expired] ↑ ↓ ↓ [Waiting for Event] [BLOCKED] [Delay Waiting] [SUSPENDED] 6.2 State Transition Conditions Transition Trigger Condition Description NEW β†’ READY … Read more

In-Depth Explanation of FreeRTOS Multitasking Switching Principles

In-Depth Explanation of FreeRTOS Multitasking Switching Principles

It suddenly dawned on me; I realized that I had a strong feeling for FreeRTOS after seeing a lot of assembly code during Keli’s debugging, running so fast that we didn’t even notice the frequent task switching. 1. The Essence of Multitasking Execution 1.1 Core Concepts On a single-core MCU, multitasking does not truly execute … Read more

Figure AI’s Robot Learns to Wash Dishes and Fold Clothes: Can Our Jobs Still Be Safe?

Figure AI's Robot Learns to Wash Dishes and Fold Clothes: Can Our Jobs Still Be Safe?

Insist on originality and deep thinking. Welcome to follow. De Wen Chen The full text contains502 words, reading it will take approximately2 minutes Recently, the star general artificial intelligence company β€œFigure AI,” which has gathered numerous top global companies and consortiums and has only been established for three years, released a new video showcasing the … Read more

Using State Machine Concepts in Embedded C Programming to Handle Complex Logic

Using State Machine Concepts in Embedded C Programming to Handle Complex Logic

The state machine pattern is a behavioral pattern that effectively implements different state transitions through polymorphism. Unfortunately, in embedded environments, one often has to write pure C code while also considering reentrancy and multitasking request transitions, making the implementation quite challenging. Recently, while reviewing an open-source system, I came across an implementation of a state … Read more

Transform Your Microcontroller into a Multi-Core Processor with TaskScheduler Instead of delay()!

Transform Your Microcontroller into a Multi-Core Processor with TaskScheduler Instead of delay()!

In traditional Arduino programming, using the delay() function causes the entire program to enter a waiting state, making it impossible to handle multiple tasks simultaneously. Want to control LED blinking, motor operation, read sensor data, and handle serial communication at the same time?Traditional blocking programming turns microcontrollers into “single-threaded” processors. The lightweight cooperative multitasking scheduling … Read more

The Use of the ‘volatile’ Keyword in Embedded C Language

The Use of the 'volatile' Keyword in Embedded C Language

In embedded system development, the ‘volatile’ keyword is a very important modifier that tells the compiler that the value of a variable may change outside the control of the program. Correctly using the volatile keyword can prevent errors caused by compiler optimizations, ensuring the correctness and reliability of the code. This article will detail the … Read more

MultiRelay: A Fast Python Library for Multitasking

MultiRelay: A Fast Python Library for Multitasking

In the world of Python, the MultiRelay library is like a versatile assistant that helps you easily implement multitasking. Whether you are dealing with data analysis, web scraping, or game development, MultiRelay can be of great help. Today, we will explore this powerful library and see how it makes Python programming more efficient. 1. Introduction … Read more