Using STM32 HAL Library for GPIO Control

Using STM32 HAL Library for GPIO Control

01 Introduction In the development of embedded systems based on STM32 microcontrollers, GPIO (General Purpose Input/Output) control is one of the most fundamental and common operations. By using the STM32 HAL library, configuring and controlling GPIO can be done easily. This article will demonstrate how to use the STM32 HAL library for GPIO control and … 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

Using UART IDLE Interrupt for Receiving Variable Length Serial Data

Using UART IDLE Interrupt for Receiving Variable Length Serial Data

Introduction In serial communication applications, we often use receive and transmit interrupts, which most of you are familiar with. There is a very useful interrupt that may be overlooked, which is the bus IDLE interrupt. When a frame of data transmission ends, the bus will maintain a high level state, at which point the MCU’s … Read more

Engineer Notes | Receiving Variable Length Data Using UART IDLE Interrupt

Engineer Notes | Receiving Variable Length Data Using UART IDLE Interrupt

Introduction In serial communication, we often use receive and transmit interrupts, which everyone is familiar with. There is another very useful interrupt that may be overlooked, namely the bus idle state IDLE interrupt. When a frame of data transmission ends, the bus remains high idle, which triggers the MCU’s IDLE interrupt. In this article, we … Read more

Unlocking C++ Embedded Development: A Complete Guide to HAL Design

Unlocking C++ Embedded Development: A Complete Guide to HAL Design

I. The “Unsung Hero” in Embedded Development – HAL In the vast realm of embedded development, there is a crucial role that often remains “behind the scenes” – the Hardware Abstraction Layer (HAL). It serves as a bridge connecting upper-level software applications with a diverse range of underlying hardware devices. For C++ embedded developers, a … Read more

Why Are 2 Data Points Lost During SPI Transmission?

Why Are 2 Data Points Lost During SPI Transmission?

Someone used the STM32F4 chip to validate the SPI functionality. When using two on-chip SPI modules for transmission and reception based on interrupts, it was found that there was always a loss of received data, seemingly losing the last 2 data points. The code used the HAL library’s API functions. What could be the reason? … Read more

Developing Embedded Systems with C++: A Comprehensive Guide

Developing Embedded Systems with C++: A Comprehensive Guide

Writing embedded systems is indeed an interesting task. Unlike regular application development, we have to deal directly with the hardware and also worry about memory usage and real-time performance. As a veteran in embedded systems for over a decade, I find that developing embedded systems with C++ is quite cool. It allows us to utilize … Read more

High-Speed I2C Driver for OLED Screen

High-Speed I2C Driver for OLED Screen

Write summaries, discuss careers, and win DJI drones, Redmi tablets, Huawei headphones, and JD cards! This article is from the Breadboard Community’s “Lingdong Mini-F5333 Development Board” free evaluation activity. 【Purpose of Experience】Light up the OLED screen and learn to use I2C peripherals. 【Experimental Equipment】 MIN-F5333 Development Board OLED Display Screen 【Implementation Steps】 1. Copy the … Read more

STM32WLE5 IoT Tutorial for Lanqiao Cup

STM32WLE5 IoT Tutorial for Lanqiao Cup

[Note] 1. If the images in the article are unclear, please contact customer service. 2. Reproduction, commercial use, piracy, and other actions that harm this public account are prohibited. 3. Any suggestions or content updates can be discussed with customer service. 4. The following link is the initial version of the tutorial; this article will … Read more