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

SysTick System Timer

SysTick System Timer

Chapter 16 SysTick – System Timer References for this Chapter “DEFINITIVE GUIDE TO ARM CORTEX-M23 AND CORTEX-M33 PROCESSORS” – Section 11.2 SysTick Timer, “Cortex-M3 Kernel Programming Manual” – Section 4.5 SysTick Timer (STK), and Section 4.48 SHPRx, which provides an introduction to SysTick and detailed descriptions of its registers. Since SysTick is a peripheral of … Read more

Is Code Running in RAM Faster Than in Flash on STM32?

Is Code Running in RAM Faster Than in Flash on STM32?

Click the above “Chuangxue Electronics” to follow easily and learn electronic knowledge. Chuangxue Electronics Subscription Account Daily updates on technical articles in the electronics industry and the latest news on microcontrollers, learn easily anytime, anywhere. The testing method is as follows: The main loop continuously increments a variable (sum1++), ensuring no overflow. Using the Systick … Read more

Cortex-M0 Interrupt Control and System Control (Part Five)

Cortex-M0 Interrupt Control and System Control (Part Five)

Click the image to view the details of the conference. The OS can support multitasking, performing context switching periodically and handling tasks in parallel architecture. A crash in a single task does not affect the entire system. Context switching requires a timer to interrupt program execution; the SysTick timer can provide the necessary clock pulses, … Read more

Cortex-M0 Interrupt Control and System Control (Part 5)

Cortex-M0 Interrupt Control and System Control (Part 5)

Click the card below to follow Arm Technology Academy This article is selected from the “灵动MM32MCU” column of Extreme Technology, authorized to be reprinted from the WeChat public account 灵动MM32MCU. Previous articles introduced Cortex-M0 Interrupt Control and System Control (Part 1), Cortex-M0 Interrupt Control and System Control (Part 2), this article will continue to introduce … Read more

Detailed Explanation of STM32 Delay Functions

Detailed Explanation of STM32 Delay Functions

In embedded development, delay operations are one of the most common and fundamental tasks. Whether initializing peripherals, waiting for sensor responses, or handling simple task scheduling, delay functions play a crucial role. This article will provide a detailed explanation of how to use the SysTick timer to achieve microsecond, millisecond, and second-level delays based on … Read more

Cortex Authority Manual – OS Support Features

Cortex Authority Manual - OS Support Features

Shadow Stack Pointer The shadow stack pointer mechanism is crucial for the implementation of operating systems in ARM Cortex-M series processors. The Main Stack Pointer (MSP) and Process Stack Pointer (PSP) are used in different scenarios: Main Stack Pointer (MSP): The default stack pointer used for the operating system kernel and interrupt handling. In handler … Read more

Task Scheduling in FreeRTOS – Context Switching

Task Scheduling in FreeRTOS - Context Switching

The previous article on FreeRTOS task scheduling – startup mentioned that the first task runs in an infinite loop mode. Clearly, having only one task running is not sufficient. So how does the running task yield control of the MCU to allow other tasks to run? One way is for the task to voluntarily yield … Read more

How to Set the RTOS Tick Rate Appropriately?

How to Set the RTOS Tick Rate Appropriately?

Recently, a reader asked the following question: Why is the default configuration for the RTOS system tick (Tick) set to 1000? Can I configure it to 100, 10000, or 2000? Many beginners have this question, including myself when I first learned about RTOS. I was confused about what the different tick configurations meant and their … Read more

Tutorial on Renesas RA8 Series | Description of SysTick Usage in RA8 Microcontroller

Tutorial on Renesas RA8 Series | Description of SysTick Usage in RA8 Microcontroller

Each Cortex-M core integrates a SysTick module, as this module is an essential (timer) function for microcontroller projects.Whether it is the latest Cortex-M85 core or the classic Cortex-M3 microcontroller, the SysTick module is integrated. cm3.h and cm85.h Microcontroller developers are most familiar with the core_cm3.h (core_cm85.h) files, which define most of the content related to … Read more