FreeRTOS series | mutually exclusive semaphores

Mutually exclusive semaphore 1. Priority reversal Priority reversal is a common problem when using binary semaphores. It is very common in the deprivable kernel, but it is not allowed in the real-time system, because it will destroy the expected sequence of tasks and may lead to serious consequences. An example of priority reversal is shown ...

Posted by slimboy007 on Fri, 04 Mar 2022 15:49:33 +0100

FreeRTOS -- creation task of task management

catalogue 1. Describe the structure of the task 2. Task creation 2.1,xTaskCreate 2.2,prvInitialiseNewTask 2.3,pxPortInitialiseStack 2.4,prvAddNewTaskToReadyList In< FreeRTOS -- (7) introduction to task management >Article basic analysis After the task related outline is, we know what interface to use to cre ...

Posted by KeeganWolf on Wed, 02 Mar 2022 15:26:43 +0100

[FreeRTOS learning plan] section V Protection of critical sections

What is critical section A critical segment is a piece of code that cannot be interrupted by internal interrupts during execution. In FreeRTOS, the most common critical segment is the operation of global variables. Global variables are like a gun handle. Anyone can shoot him, but when I shoot, you can't shoot, otherwise you don't know who hit ...

Posted by bubblybabs on Sun, 27 Feb 2022 05:32:29 +0100

FreeRTOS startup process

Start process There are two main startup processes for FreeRTOS In the main function, initialize the hardware, RTOS system and create all tasks. Finally, start the RTOS scheduler to start multi task scheduling. (create first, then schedule) int main (void) { /* Hardware initialization */ HardWare_Init(); /* RTOS System initiali ...

Posted by phat_hip_prog on Sat, 26 Feb 2022 17:38:22 +0100

FreeRtos learning notes (10) analysis of task switching principle

FreeRtos learning notes (10) analysis of task switching principle Starting process of STM32 single chip microcomputer SP and PC registers are introduced in, STM32 single chip microcomputer bootloader literacy How to control the program jump from bootloader to APP by controlling SP and PC registers is mentioned in. RTOS task switch ...

Posted by ericorx on Thu, 03 Feb 2022 19:27:07 +0100

FREERTOS learning notes III - message queue

FREERTOS learning notes III - message queue 1. Experimental contents Experiment 2: create two dynamic tasks. Task 1 controls the flashing of LED, and task 2 is used to detect keys. When the key KEY0 is pressed, task 1 is suspended; When key 1 is pressed, task 1 is cancelled and suspended. In Experiment 3, a message queue and two task process ...

Posted by erichar11 on Thu, 03 Feb 2022 10:44:57 +0100

freertos critical section protection

Fundamentals of interruption Nesting: Nested vector interrupt controller NVIC (nested vector interrupt controller) is tightly coupled with the kernel. It provides the following functions: nested interrupt support, vector interrupt support, dynamic priority adjustment support, greatly shortening interrupt delay and shielding interrupt. Al ...

Posted by Pyro4816 on Mon, 31 Jan 2022 05:48:45 +0100

Reentrant and non reentrant

Reentrant and non reentrant Reprint: https://www.cnblogs.com/reality-soul/p/6140932.html It is mainly used in multitasking environment. A reentrant function is simply a function that can be interrupted, that is, it can be interrupted at any time when the function is executed, transferred to OS scheduling to execute another piece of code, and th ...

Posted by Jedi Legend on Sun, 30 Jan 2022 23:45:23 +0100

freertos assembly language basics

Basic knowledge of assembly language Multiple memory access MRS and MSR isb and dsb ldr and str mov bl and bx cps   Multiple memory access exclamatory mark! Indicates the value of the base register Rd to be incremented or decremented. The timing is before or after each access. Increase / decrease in words (4 bytes). Ldr R1,=0x10 ...

Posted by Dj_Lord on Fri, 28 Jan 2022 20:16:16 +0100

Implementation and intuitive understanding of insertion and deletion of freertos bidirectional loop chain table

main.c After debug, look at the observation window, and the results are as follows. The purpose of this experiment is to establish a root node, a chain table of three common nodes, and the three common nodes are sorted in ascending order according to the xitemValue value. Main. Inside C First, look at the type of node: the chain table ...

Posted by allinurl on Thu, 27 Jan 2022 14:47:34 +0100