FreeRTOS Study Notes: Interrupts and Task Switching

FreeRTOS Study Notes: Interrupts and Task Switching

EEWorld Electronic News Sharp Interpretation Technical Insights Updated Daily With FreeRTOS providing memory resources for tasks through stack management mechanisms, it can perform context switching based on task status and priority, and offers communication channels for necessary task synchronization and mutual exclusion, multiple tasks can work together. However, since it is called a Real-Time Operating … Read more

Introduction to Task Notifications in FreeRTOS

Introduction to Task Notifications in FreeRTOS

1. Concept of Task Notifications Task notification functionality was introduced in FreeRTOS starting from version V8.2.0. Each task has a 32-bit notification value, and task notifications can replace binary semaphores, counting semaphores, event groups, and even queues of length 1 (used to pass a 32-bit integer or pointer value). Compared to traditional communication methods, task … Read more

Detailed Explanation of FreeRTOS Task Management Mechanism

Detailed Explanation of FreeRTOS Task Management Mechanism

Detailed Explanation of FreeRTOS Task Management Mechanism 1. Basic Concepts of Tasks In FreeRTOS, a task is the basic unit of execution in the system, similar to an independent small program, with its own execution flow, stack space, local variables, and Task Control Block (TCB). Each task focuses on specific functionality, collaborating to achieve the … Read more

FreeRTOS Operations and Applications – Part One

FreeRTOS Operations and Applications - Part One

In today’s embedded systems development field, the application of Real-Time Operating Systems (RTOS) is becoming increasingly widespread, providing solid support for various complex task scheduling, resource management, and system reliability requirements. As an open-source real-time operating system, FreeRTOS stands out in numerous embedded projects across various industries due to its simplicity, efficiency, ease of portability, … Read more

Common Coding Standards for FreeRTOS

Common Coding Standards for FreeRTOS

According to statistics from a research institution, currently FreeRTOS has the highest market share in the global RTOS market. Of course, we do not know the specific methods of this statistic, but FreeRTOS is indeed very active. Here, I would like to ask everyone, do you have many friends or colleagues around you who use … Read more

How to Determine If Cortex-M Processor Is Executing Interrupt Function?

How to Determine If Cortex-M Processor Is Executing Interrupt Function?

Follow+Star Public Account, don’t miss wonderful content Author | strongerHuang WeChat Official Account | Embedded Column Today, I want to share some knowledge I encountered while debugging code: the usage of __get_CONTROL, and the differences between xQueueSend and xQueueSendFromISR; 1 Source of the Problem I previously ported some code written by others on the FreeRTOS … Read more

Considerations for RTOS Task Stack Allocation

Considerations for RTOS Task Stack Allocation

Follow+Star PublicAccount, don’t miss the wonderful content Author | strongerHuang WeChat Public Account | Embedded Column Some friends asked this question: Do I need to allocate a large stack for a task with a lot of code? Actually, it’s not that the more code there is, the more stack space needs to be allocated. It … Read more

Advantages Of RTOS Over Bare Metal Programming

Advantages Of RTOS Over Bare Metal Programming

Author:Electronic Engineering Magazine, Typesetting by:Xiao Yu WeChat Official Account: Chip Home (ID: chiphome-dy) 1. Concurrency The efficiency of concurrent work in programs is low when writing bare-metal software. Inevitably, there will be a huge while(1) loop in the main program, which contains almost all business logic of the project. Because each piece of business logic … Read more

Porting RTOS to 51 Microcontroller

Porting RTOS to 51 Microcontroller

Previous Articles The official website of STC is a furnace I will never forget. A big shot commented. So, taking this opportunity, let’s take a look at the code he wrote. https://gitee.com/open-ell/freertos The file directory is in my favorite style, and the bsp directory clearly indicates its purpose. Below is an overview of the project. … Read more

Methods for Multithreaded Access to UART in RTOS

Methods for Multithreaded Access to UART in RTOS

Reader *Shi San* asks: Can the blogger introduce methods for multiple tasks to access the same hardware under RTOS? For example, multiple tasks need to use the serial port to print information. My answer is: Both mutexes and queues can solve the access conflict problem. Multithreaded access to the same serial hardware is commonly used … Read more