Step-by-Step Guide to STM32 External Interrupts

Step-by-Step Guide to STM32 External Interrupts

● Interrupts Interrupts play a very important role in microcontrollers. The code executes from top to bottom by default, and when it encounters conditions or other statements, it jumps to specified locations. During the execution of code in a microcontroller, unexpected situations may arise that need to be handled, which will interrupt the current code. … Read more

Detailed Analysis of GPIO Initialization Functions in STM32 HAL Library

Detailed Analysis of GPIO Initialization Functions in STM32 HAL Library

Reminder: This article provides a detailed analysis of the functions related to GPIO configuration in the HAL library, including MX_GPIO_Init(), HAL_GPIO_WritePin(), and HAL_GPIO_Init(). At the end of the article, a description of the f1 series GPIO port registers is attached. MX_GPIO_Init() First, let’s look at the source code: void MX_GPIO_Init(void){ GPIO_InitTypeDef GPIO_InitStruct = {0}; /* … Read more

STM32CubeIDE Tutorial: Configuration Process

STM32CubeIDE Tutorial: Configuration Process

Click the blue text to follow us 0 Preface: Previously, we learned about STM32CubeIDE and provided the official download link for STM32CubeIDE. This time, we will share the basic configuration required for STM32 projects in STM32CubeIDE, including the configuration of the UART peripheral. 1. Download link for STM32CubeIDE: https://www.st.com/zh/development-tools/stm32cubeide.html Note: The image indicates a Windows … Read more

STM32 System Clock and Delay Function Initialization

STM32 System Clock and Delay Function Initialization

STM32 has three different clock sources that can be used to drive the system clock (SYSCLK): 1: HSI oscillator clock (internal clock) 2: HSE oscillator clock (external clock, provided by the crystal) 3: PLL clock (Phase-Locked Loop clock) These devices have the following two secondary clock sources: (1) 40kHz low-speed internal RC, which can be … Read more

Summary of C Language Basics for STM32 Microcontrollers

Summary of C Language Basics for STM32 Microcontrollers

C language is essential foundational knowledge in microcontroller development. This article lists some common C language basics encountered while learning STM32. 1 Bit Manipulation First, we will explain several bitwise operators, followed by tips for using bitwise operations. The C language supports the following six types of bitwise operations: Next, we will focus on some … Read more

Designing High Load UART Communication with STM32

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

Detailed Explanation of STM32 Microcontroller GPIO Working Principles

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

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?

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

How STM32 Combines Software and Hardware for Execution

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