Detailed Analysis of Interrupt Functions in STM32 HAL Library

Reminder: This article briefly reviews the relevant knowledge points of EXTI and NVIC, analyzing the external interrupt callback mechanism of the STM32F1 series microcontroller. Before we start, let’s review some knowledge related to EXTI and NVIC: External Interrupt/Event Controller (EXTI) For interconnect products (series 105, 107), the external interrupt/event controller consists of 20 edge detectors … Read more

Designing High Load UART Communication with STM32

1 Introduction Direct Memory Access (DMA) is a component used by the CPU to “move” (copy) data from one address space to another without CPU intervention during the data copying process. The CPU is notified once the data copying is complete. As a result, using DMA can free up CPU resources when copying large amounts … Read more

STM32 F103C8T6 System Board Reset Circuit Design Tutorial

1. Reset (1) What is Microcontroller Reset The reset of the STM32 microcontroller refers to the process of resetting the microcontroller to its initial startup state. The reset behavior causes all running programs to terminate and restores the microcontroller’s registers and functions to their initial values. The reset process provides a known starting state for … Read more

Differences Between STM32, GD32, and ESP32

STM32: Released by STMicroelectronics on June 11, 2007, it is a 32-bit microcontroller. GD32: Released by GigaDevice in 2013, it closely imitates STM32 in chip development, configuration, and naming. In fact, the GPIO pins are pin-to-pin compatible with STM32, meaning you can use GD32 without altering the PCB. Sometimes, you can run STM32 source code … Read more

Detailed Explanation of STM32 Microcontroller GPIO Working Principles

Introduction to STM32 GPIO GPIO stands for General Purpose Input/Output ports, which are pins that can be controlled by the STM32. GPIO pins connect to external hardware devices, enabling communication with external devices, controlling external hardware, or collecting data from external hardware. Taking the STM32F103ZET6 chip as an example, this chip has a total of … Read more

Detailed Analysis of Interrupt Functions in STM32 HAL Library – NVIC

Reminder: This article takes external interrupt for lighting as an example, analyzing the usage of interrupt service related functions in the HAL library, their interconnections, and underlying principles. 1. Example Implementation Example Overview: The main function controls LED2 to blink, while the interrupt controls the switch of LED0: First, we use CubeMX to create the … Read more

Is STM32 Based on Harvard or Von Neumann Architecture?

Word Count: 1800 Content Quality Index: ⭐⭐⭐⭐⭐ Modern CPUs are generally categorized into von Neumann architecture (also known as Princeton architecture) and Harvard architecture. The von Neumann architecture refers to the X86 architecture, while the Harvard architecture refers to the ARM architecture. One is widely used in desktop environments (desktops/laptops/servers/workstations, etc.), while the other dominates … Read more

Understanding STM32 Serial Communication

Introduction to Serial Communication Classification Based on Data Transmission Direction Simplex: Data transmission only supports data transfer in one direction. Half-Duplex: Allows data to be transmitted in both directions. However, at any given time, data can only be transmitted in one direction, which is essentially a switched direction simplex communication; it does not require separate … Read more

How STM32 Combines Software and Hardware for Execution

Have you ever wondered why software can control hardware? This article analyzes how the STM32 microcontroller combines software and hardware and how the microcontroller program is compiled and executed. Software and Hardware Integration Beginners often have a question: why can software control hardware? Just like the 51 microcontroller, why can we output high and low … Read more