Bare-Metal Programming vs RTOS Programming

Bare-Metal Programming vs RTOS Programming

In embedded development, bare-metal and RTOS programming are two core implementation methods. This article focuses on the STM32F4xx series MCUs, first explaining the concepts and applicable scenarios of both, and then comparing the code implementation differences between bare-metal and FreeRTOS through three examples: multi-LED blinking, sensor data processing, and button-controlled motor. Finally, it provides selection … Read more

Microcontroller Time-Slice Polling Program Architecture

Microcontroller Time-Slice Polling Program Architecture

The time-slice polling method is often mentioned alongside operating systems, meaning it is frequently used in operating systems:RTOS in STM32 microcontroller development. The following will reference others’ code to demonstrate how to establish a time-slice polling architecture program.Timer Reuse Executing other functions while one function is delayed makes full use of CPU time, doesn’t it … Read more

Introduction to FreeRTOS: Basics of Semaphores

Introduction to FreeRTOS: Basics of Semaphores

SemaphoreWe all know about queues, which can be used to transmit different types of data.However, sometimes we only need to convey a state without transmitting specific information.Thus, we introduce semaphores, which do not transmit data but rather convey states, serving as notifications and saving memory. A semaphore cannot transmit data; it only has a count … Read more

How to Digest Knowledge of an Unfamiliar Topic Like RTOS?

How to Digest Knowledge of an Unfamiliar Topic Like RTOS?

Many people, especially students who tend to think in a rigid way, believe that they must thoroughly understand the underlying principles of a technology, such as configuring registers to use a microcontroller, examining task scheduling algorithms, time-slicing, and critical section protection, before they can claim to have learned it. What happens? After much effort, you … Read more

A Quick Start Guide to FreeRTOS

A Quick Start Guide to FreeRTOS

Scan to FollowLearn Embedded Together, learn together, grow together The FreeRTOS introductory series aims to help beginners quickly get started and master the basic principles and usage of FreeRTOS while organizing their own knowledge. For ease of reading, the “Quick Start to FreeRTOS” series of articles has been compiled. The list of articles is as … Read more

Example Scripts for Managing Scheduled Tasks on Linux

Example Scripts for Managing Scheduled Tasks on Linux

Recently, I have been working on modifying and migrating several scheduled task scripts, so I took the opportunity to review my knowledge of cron and systemd timers, summarizing it into a series of articles. Interested readers can click the links below to read the original articles. Thank you for your support. Detailed Explanation of cron … Read more

FreeRTOS Core API Overview

FreeRTOS Core API Overview

FreeRTOS – Core API Overview • Task management is the foundation for building concurrent programs. • Queues, semaphores, and mutexes: are solutions for inter-task communication and synchronization issues. • Event groups and task notifications: provide solutions for handling more complex synchronization scenarios. • Software timers: address the need for low-overhead handling of numerous timed events. … Read more

Overview of Multi-Agent LLMs

Overview of Multi-Agent LLMs

Word Count 3150, Estimated Reading Time 16 Minutes Overview of Multi-Agent LLMs The days of a single model handling everything are long gone. Now, a series of specialized LLM Agents are used, with each agent focusing on its area of expertise. For example, consider this scenario: suppose one agent specializes in gathering all necessary data, … Read more

Mastering Multicore! The Secret Weapon for Core Binding in FreeRTOS: xTaskCreatePinnedToCore

Mastering Multicore! The Secret Weapon for Core Binding in FreeRTOS: xTaskCreatePinnedToCore

In embedded development, when facing multicore processors (such as the popular ESP32 dual-core chip), how can we efficiently allocate tasks and avoid resource contention? Today, we will introduce the <span>xTaskCreatePinnedToCore</span> function, which is FreeRTOS’s “task scheduling magic tool” tailored for multicore scenarios. We will guide you through a complete project example to help you fully … Read more

Introduction to FreeRTOS Tasks

Introduction to FreeRTOS Tasks

FreeRTOS is an open-source real-time operating system kernel, and tasks are its core execution units. Each task has its own stack and execution context, managed by the scheduler based on priority. In embedded systems like the ESP32, tasks can run on different CPU cores, supporting preemptive scheduling (higher priority tasks can interrupt lower priority tasks). … Read more