Queue Function Module for Microcontrollers

Queue Function Module for Microcontrollers

The queue function module implemented based on microcontrollers is mainly used for 8-bit, 16-bit, and 32-bit microcontroller applications that do not run RTOS, compatible with most microcontroller platforms. Open source code: https://github.com/xiaoxinpro/QueueForMcu 1. Features Dynamic creation of queue objects Dynamic setting of queue data buffer Static specification of queue element data length Value passing method … Read more

Memory Management in Embedded Real-Time Systems: Advice from SafeRTOS Experts

Memory Management in Embedded Real-Time Systems: Advice from SafeRTOS Experts

In real-time systems, memory is not just about efficiency, but also about predictability and reliability. Poor memory management can lead to missed deadlines, instability, and even become a barrier to safety certification. Here are some proven best practices: • Prefer static allocation → predictable and controllable. • Correctly size tasks and system stacks → cover … Read more

ESP32-FreeRTOS: A Comprehensive Collection of FreeRTOS Examples on the ESP32 Platform for Reference and Learning

ESP32-FreeRTOS: A Comprehensive Collection of FreeRTOS Examples on the ESP32 Platform for Reference and Learning

ESP32-FreeRTOS, a set of open-source example codes, awakens all the fun features of the ESP32 such as multitasking, timers, events, and semaphores, making it easier and more reliable for you to write IoT applications. What can it help you with? Despite the ESP32’s built-in Wi-Fi/Bluetooth, complex projects can easily become chaotic with bare-metal programming. FreeRTOS … Read more

What Are the Features of the MounRiver Studio Integrated Development Environment for RISC-V Microcontrollers?

What Are the Features of the MounRiver Studio Integrated Development Environment for RISC-V Microcontrollers?

Follow+Star Public Account Number, don’t miss out on exciting contentAuthor | strongerHuangWeChat Public Account | Embedded ColumnIn recent years, major manufacturers have been laying out RISC-V processors, and the number of microcontrollers based on RISC-V is increasing. However, compared to conventional (ARM) microcontrollers, the RISC-V ecosystem, especially the development tools, still has a certain gap.Recently, … Read more

An Overview of Microcontroller Software Development Techniques

An Overview of Microcontroller Software Development Techniques

Microcontroller technology is based on the use of chips and external devices, achieved through software and hardware development, ultimately realizing comprehensive technology for electronic products. First, it is important to confirm that the learning and usage curve for microcontrollers is not steep. Various chip manufacturers are also providing graphical development tools, such as ST’s STM32CubeMX, … Read more

Zero Interrupt Latency RTOS

Zero Interrupt Latency RTOS

Author | Source: gitee Those who have truly worked on projects based on RTOS should know the dangers ofdisabling global interrupts to protect critical sections (loss of response, processing delays). For example, phenomena such as frame loss in high-speed communication reception and pulse loss in high-speed capture due to interrupt response loss. Some RTOS indiscriminately … Read more

Adapting FreeRTOS from Scratch Based on GD32F450 (5) – Task Creation

Adapting FreeRTOS from Scratch Based on GD32F450 (5) - Task Creation

This article is included in the collection: “Adapting FreeRTOS from Scratch Based on GD32F4xx”;01 | IntroductionIn the previous article, we discussed how to trim the kernel and what FreeRTOS tasks are. These were all conceptual topics, so this article will begin with practical operations, creating a FreeRTOS task to control the LED on the development … Read more

STM32 UART DMA Reception

STM32 UART DMA Reception

Introduction When sending data via UART, we clearly know the timing and quantity of the data being sent, making it relatively straightforward to handle. However, the timing and quantity of data received via UART are often unknown, requiring more consideration in handling. There are generally several methods to handle the issue of reception timing: Polling: … Read more

[RTOS] The Night Before Scheduling: Analysis of Interrupt Failure in FreeRTOS

[RTOS] The Night Before Scheduling: Analysis of Interrupt Failure in FreeRTOS

Phenomenon Before FreeRTOS starts scheduling with <span>vTaskStartScheduler()</span>, if FreeRTOS APIs (such as creating semaphores) are called, it will lead to interrupts managed by FreeRTOS being disabled until scheduling begins. Source Code Analysis In the FreeRTOS API, there are critical sections like this: // Common code snippet in FreeRTOS source: entering and exiting critical sections BaseType_t … Read more

Creating Tasks in STM32 FreeRTOS

Creating Tasks in STM32 FreeRTOS

1. Introduction to the xTaskCreate Task Creation Function typedef long BaseType_t; BaseType_t xTaskCreate( TaskFunction_t pvTaskCode, const char * const pcName, configSTACK_DEPTH_TYPE usStackDepth, void *pvParameters, UBaseType_t uxPriority, TaskHandle_t *pxCreatedTask ); Function: Creates a new task and adds it to the list of tasks that are ready to run. Each task requires RAM to store its state … Read more