[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
Divider design
The design idea of the divider is more complex, mainly shift and divide. Put the divisor and the dividend in registers B and A respectively, and then add A shift register R with the same bit width n. 8 'b0 in R is used as the high bit and the data in A is used as the low bit. The operation process requires 2n clock cycles. The process is like t ...
Posted by ThunderLee on Fri, 25 Feb 2022 04:58:31 +0100
Implementation of ch0 CBsp class
Why use C + + to develop MCU program
In the embedded system with microprocessor as the core, most of them use C language for program design, but with the increase of system scale, the program is more and more complex and maintenance is more and more difficult. Using C + + for development has the following advantages (provided that the compiler ...
Posted by JohnnyBlaze on Fri, 25 Feb 2022 01:46:10 +0100
RISC-V MCU development tutorial CH32V307 configuring Flash and RAM
Chitu V307 (CH32V307) is a RISC-V core MCU, which is equipped with qinheng self-developed RISC-V core highland barley V4F, with a maximum dominant frequency of 144MHz and supports single precision floating-point operation (FPU). Generally, the size of Flash is 256 KB and the size of SRAM is 64 KB.
After carefully reading the application manu ...
Posted by Zag0r on Thu, 24 Feb 2022 03:34:32 +0100
[CS344-1](GPU Programming Model)
For example, how can we dig holes from the United States to China faster
Use a shovel to dig from every 2 seconds to every 1 second. There is an upper limit. If it is too fast, the shovel will break
(increasing the clock frequency of the processor will increase the energy consumption, and there is an upper limit on the energy consumptio ...
Posted by pmeasham on Sun, 20 Feb 2022 15:57:44 +0100
#ESP32 MCU learning notes - 02 - Software IIC & hardware SPI
ESP32 MCU learning notes - 02 - Software IIC & hardware SPI
Preface, continue the content of the previous article. In order not to accumulate too much content, write it separately.
1, ESP32 read gyroscope (IIC)
Official routine: github:esp-idf/examples/peripherals/i2c/i2c_self_test/ iic is the official software used by iic before ...
Posted by reyjrar on Fri, 18 Feb 2022 18:11:02 +0100
Misunderstanding of AFIO clock and its usage analysis
Analysis of errors in AFIO clock
AFIO misunderstanding
We generally misunderstand it as "enabling the multiplexing function of the IO port requires enabling the AFIO clock", but let's recall the structure diagram of GPIO and learn more about GPIOx_Pin structure:
In the figure above, the signal from the port pin enters the mult ...
Posted by coja1 on Fri, 18 Feb 2022 16:37:26 +0100
lcd driver using linux kernel
LCD driver under Linux
In linux driver development, it is essential to use lcd for human-computer interaction. Therefore, how can we initialize lcd in the kernel?
1. LCD screen IO configuration
Open dts device tree file, create lcd child nodes in iomuxc
pinctrl_lcdif_dat: lcdifdatgrp {
fsl,pins = <
MX6UL_PAD_LCD_DATA00__LCDIF_DATA00 0 ...
Posted by rubbertoad on Fri, 18 Feb 2022 14:51:27 +0100
can line communication of stm32 common errors
catalogue
preface
Specific manifestations of can line problem:
Software problems:
1. Speed
2. Pin
3. Interrupt callback
summary
preface
After studying stm32 for a period of time, I have summarized some common problems. This article mainly writes about the problems encountered on the can line.
Specific manifestations of ...
Posted by gerrydewar on Thu, 17 Feb 2022 22:42:49 +0100