Detailed Explanation of CPU I/O Capabilities and Peripheral Control Techniques in Assembly Language

Detailed Explanation of CPU I/O Capabilities and Peripheral Control Techniques in Assembly Language

1. Overview of CPU I/O Capabilities The CPU not only has computational capabilities but also needs to exchange data with external devices, a capability known as I/O (Input/Output) capability. Typical I/O operations in a computer system include: Keyboard input Display output Disk read/write Network communication, etc. 2. Two Core Issues in Peripheral Interaction 1. Peripheral … Read more

UART and DMA Data Transmission

UART and DMA Data Transmission

Concept of DMA DMA (Direct Memory Access) allows data transfer without direct control from the CPU. It creates a direct pathway for data transfer between RAM and I/O devices, significantly improving CPU efficiency. There are several methods for UART data reception: the interrupt mode of UART isthe most commonly used data transmission method in microcontrollers, … Read more

STM32 SPI Interface Tutorial: Achieving Efficient and Stable Data Transmission

STM32 SPI Interface Tutorial: Achieving Efficient and Stable Data Transmission

The SPI (Serial Peripheral Interface) is one of the most widely used synchronous serial communication protocols in embedded systems, playing a crucial role in STM32 development. Compared to I2C and UART, SPI is particularly suitable for high-speed data acquisition, memory expansion, and display driving due to its full-duplex communication, high transmission rates, and hardware slave … Read more

ZYNQ: From Abandonment to Entry (Part 8) – Interaction Between PS and PL

ZYNQ: From Abandonment to Entry (Part 8) - Interaction Between PS and PL

Previous articles mainly focused on the Processing System (PS) of the Zynq SoC, including: Using MIO and EMIO The interrupt structure of Zynq SoC Zynq private timers and watchdogs The triple timer counter (TTC) of Zynq SoC However, from a design perspective, the truly exciting aspect of the Zynq SoC is creating applications that utilize … Read more

The Volatile Keyword You Might Overlook in MCUs

The Volatile Keyword You Might Overlook in MCUs

Click πŸ‘†πŸ‘†πŸ‘† the blue text Follow “Passion Embedded” In embedded development, especially in the development of microcontrollers like STM32, the <span>volatile</span> keyword is a very important concept. 1. Concept of the volatile Keyword <span>volatile</span> is a type modifier in C/C++ that tells the compiler: The variable may be modified unexpectedly (e.g., by hardware, interrupts, or … Read more

The Volatile Keyword You Might Overlook in MCUs

The Volatile Keyword You Might Overlook in MCUs

Click πŸ‘†πŸ‘†πŸ‘† the blue text Follow “Passion Embedded” In embedded development, especially in the development of microcontrollers like STM32, the <span>volatile</span> keyword is a very important concept. 1. Concept of the volatile Keyword <span>volatile</span> is a type modifier in C/C++ that tells the compiler: The variable may be modified unexpectedly (e.g., by hardware, interrupts, or … Read more

Analysis of Embedded Driver Design Techniques

Analysis of Embedded Driver Design Techniques

In embedded system development, driver design is a key factor affecting system performance, energy efficiency, and maintainability. Below is an in-depth analysis of three mainstream driver design techniques along with practical recommendations: 1. Polling Driver Technical Features: Blocking Design: The main program cannot perform other tasks while waiting for peripheral responses. Simple Implementation: Only requires … Read more

LwOW: A Lightweight OneWire Protocol Library Designed for Embedded Systems, Supporting UART and GPIO Communication

LwOW: A Lightweight OneWire Protocol Library Designed for Embedded Systems, Supporting UART and GPIO Communication

In embedded system development, efficient and reliable communication with peripherals is crucial. The OneWire protocol, with its simple single-wire interface and cost-effectiveness, is widely used for connecting devices such as temperature sensors and iButtons. However, traditional OneWire libraries are often too bulky and resource-intensive. Today, we will delve into a lightweight, high-performance OneWire protocol libraryβ€”LwOW, … Read more

Resolving ARM Cortex-M Exception – HardFault (UsageFault) INVPC Set to 1

Resolving ARM Cortex-M Exception - HardFault (UsageFault) INVPC Set to 1

CPU: STM32F429IGT6 For other STM32 chips or other ARM Cortex-M chips, the solution is generally the same. It is recommended to read this article in full before debugging the issues you encounter. 1. Basic Knowledge In ARM Cortex-M series processors, there are several system exceptions dedicated to fault handling. The faults in CM3 can be … Read more

Efficient UART Reception Programming Example with DMA and IDLE Based on STM32

Efficient UART Reception Programming Example with DMA and IDLE Based on STM32

Efficient UART Reception Programming Example with DMA and IDLE Based on STM32 The goal of this article: A FreeRTOS programming example based on STM32_H5 According to the description in this article, experiments should be able to be conducted on the corresponding hardware, and similar applications can be derived. Prerequisites: Basic knowledge of C language, and … Read more