UART Serial Port Software Development Process (Based on MCU)

UART Serial Port Software Development Process (Based on MCU)

Preparation Work Hardware Confirm the MCU serial port (USART1, UART4, etc.); Confirm the “pins” (TX: transmit pin, RX: receive pin). For example: PA9, PA10; TX connects to RX, RX connects to TX, GND connects to GND; Note: Ensure common ground (GND), which is essential for the signal circuit and level reference. Protocol Format: Ensure that … Read more

STM32 Beginner’s Notes: GPIO Usage Methods

STM32 Beginner's Notes: GPIO Usage Methods

This note can be skipped by experienced users. Everything before entering is an obstacle, but looking back after entering, everything seems simple. Introduction to GPIO GPIO stands for General Purpose Input/Output. All pins of the STM32, except for specific functions like power and ground, VBAT, etc., can be used as GPIO. STM32 categorizes them into … Read more

Using STM32Cube: A Step-by-Step Guide

Using STM32Cube: A Step-by-Step Guide

STM32Cube is a powerful free development tool provided by STMicroelectronics for developers, enabling them to quickly develop and apply applications on the STM32 platform. STM32Cube mainly consists of two parts: 1. The graphical configuration tool STM32CubeMX, which allows users to graphically configure the interfaces and pins of STM32 chips. 2. Embedded software packages, including HAL … Read more

Object-Oriented Implementation of IIC Driver in C Language

Object-Oriented Implementation of IIC Driver in C Language

1. Overview This article encapsulates the IIC driver using object-oriented programming principles, packaging the properties and operations of IIC into a library. When creating an IIC device, one only needs to instantiate an IIC object. This implementation is based on STM32 and the HAL library for further encapsulation. The underlying driver methods are not important; … Read more

Testing Clock Frequencies in Keil-MDK

Testing Clock Frequencies in Keil-MDK

“The clock frequency is the core of the microcontroller, affecting peripheral communication, timing, and other functions. Simulation tools can observe its frequency in real-time, aiding in configuration verification and troubleshooting. This article introduces four simple and convenient methods for testing clock frequencies in the Keil-MDK environment, using the STM32F407 as an example to illustrate the … Read more

How to Bypass STM32CubeIDE’s Detection of Clone J-Link Devices

How to Bypass STM32CubeIDE's Detection of Clone J-Link Devices

👉STM32CubeIDE Tutorial Collection Recently, my company received a lawyer’s letter from MDK, leaving us no choice but to use open-source or free IDE tools. Considering various factors, I ultimately decided to use the STM32CubeIDE provided by STMicroelectronics. I found that there are relatively few tutorials on CubeIDE available online, which inspired me to create a … Read more

Peripheral Driver Implementation for ARM Cortex-M4 Using HAL Library

Peripheral Driver Implementation for ARM Cortex-M4 Using HAL Library

1. Memory Mapping In the memory mapping diagram of the STM32F429 chip, it can be seen that the peripherals are allocated 512M of space; however, the actual peripherals do not utilize the entire 512M of memory. When operating peripherals, it is sufficient to manipulate their corresponding memory addresses. For more detailed peripheral memory addresses, refer … Read more

No Code? With STM32CubeIDE, Just a Few Clicks and the LED Lights Up! It’s That Simple?!

No Code? With STM32CubeIDE, Just a Few Clicks and the LED Lights Up! It's That Simple?!

STM32CubeIDE integrates the STM32CubeMX graphical configuration tool and a powerful code generation engine, allowing developers to automatically generate initialization code through intuitive pin dragging and peripheral selection, significantly reducing low-level configuration time. Whether it’s GPIO, timers, UART, or ADC, everything can be configured with a single click. Coupled with the HAL library‘s standardized API, even … Read more

STM32-SPI Documentation Compilation

STM32-SPI Documentation Compilation

Click the blue text Follow us 1. Introduction to SPI 1. SPI Physical Layer SPI generally uses 4 lines for communication: NSS: Chip select line MOSI: Master data output, slave data input MISO: Master data input, slave data output SCK: Clock line, provided by the master 2. Protocol Layer (1) Basic SPI Communication Timing (2) … Read more

Comprehensive Guide to STM32 I2C

Comprehensive Guide to STM32 I2C

Click the blue text Follow us 1. Introduction to I2C The I2C communication protocol (Inter-Integrated Circuit) was developed by Philips. Due to its fewer pins, simple hardware implementation, and strong scalability, it does not require external transceivers for communication protocols like USART or CAN, and is now widely used for communication between multiple integrated circuits … Read more