[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

stm32 basic timer

Timer classification stm32f1 series, 8 timers, basic timer (TIM6,7), general timer (TIM2,3,4,5) and advanced timer (TIM1,8). Basic timer: a 16 bit timer that can only count up. It can only be timed without external IO General timer: 16 bit timer that can count up / down, timing, output comparison and input capture. Each timer has 4 external ...

Posted by ilight on Sun, 27 Feb 2022 05:07:14 +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

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

lvgl8.x docking screen driver

1. Screen driver initialization The screen driver initialization function is located in lv_port_disp.c this file. The contents of the full screen driver initialization function in the figure above are: void lv_port_disp_init(void) { /*------------------------- * Initialize your display * -----------------------*/ ...

Posted by s1m0n on Fri, 18 Feb 2022 08:47:40 +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

Introduction and example of timer based on cumbmx

Introduction and example of timer based on cumbmx This paper will introduce the basic functions and application methods of timer, and take ultrasonic sensor as an example to show its application Required materials: stm32 single chip microcomputer, stm32cumbmx software, HC_SR04,CH340 The use of serial communication USART is not discussed her ...

Posted by montana111 on Wed, 16 Feb 2022 03:24:50 +0100

[punctual atom MP157 serial] Chapter 43 experiment of external RTC chip PCF8563 - extracted from [punctual atom] STM32MP1 embedded Linux Driver Development Guide v1 seven

1) Experimental platform: punctual atom STM32MP157 development board 2) Purchase link: https://item.taobao.com/item.htm?&id=629270721801 3) Full set of experimental source code + manual + video download address: http://www.openedv.com/thread-318813-1-1.html 4) Official station B of punctual atom: https://space.bilibili.com/394620890 5) Punc ...

Posted by nike121 on Wed, 16 Feb 2022 03:12:27 +0100

STM32+LWIP protocol stack implements MQTT protocol and mounts it to EMQ_X_CLOUD platform

introduction In the previous articles, I mainly used LWIP protocol stack to implement httpd server and some applications. In this article, we will implement another MQTT protocol which is widely used in the Internet of things. I won't talk about the definition of MQTT protocol. I mainly remember that MQTT protocol is a subscription / publi ...

Posted by flipis on Tue, 15 Feb 2022 09:18:52 +0100

STM32 basic learning

Analysis of one click download principle of P3 serial port circuit Pull up circuit triode b is the base, c is the collector and e is the emitter When used as a switch, NPN triode: when b is connected to low level, the circuit is cut off, and when b is connected to high level, the circuit is saturated and on; PNP triode: if b is connecte ...

Posted by coppercoins on Tue, 15 Feb 2022 05:15:21 +0100