In-Depth C++ Device Driver Development: Interrupt Handling Basics Revealed

In-Depth C++ Device Driver Development: Interrupt Handling Basics Revealed

1. Interrupts: The “Emergency Contact” Between Devices and Processors In the complex operation of computer systems, interrupts are a crucial technology. Simply put, an interrupt is when the computer pauses the currently running program to execute a related service program upon encountering an urgent event that needs to be processed. Once completed, it automatically returns … Read more

Best Programming Model for Low Power Design: Asynchronous Programming

Best Programming Model for Low Power Design: Asynchronous Programming

Asynchronous programming can create efficient programs that are fast and resource-saving. It allows high concurrency in a single-threaded environment and can implement TCP/IP protocol stacks without an operating system. Fast and resource-efficient, it can keep power consumption at the lowest level, making asynchronous programming the best programming model for low power design. Three Realms There … 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

Understanding STM32 Interrupt Priority: Preemptive and Response Priority

Understanding STM32 Interrupt Priority: Preemptive and Response Priority

1. Preemptive Priority and Response Priority The STM32 interrupt vector has two attributes: preemptive priority and response priority, with a smaller attribute number indicating a higher priority level.Preemption refers to the ability to interrupt other interrupts, meaning that it allows for nested interrupts (interrupt B can interrupt the execution of interrupt service function A, and … Read more

ARM Interrupt Priority and Nested Preemption Issues

ARM Interrupt Priority and Nested Preemption Issues

While sitting on the high-speed train from Shanghai to Beijing, the long journey indeed makes one feel bored (I couldn’t get a direct train, so I had to go slowly, stopping at each station. It’s frustrating, even in the era of high-speed trains. It reminds me of the time I spent hours on a green … Read more

Common Methods for Receiving and Parsing UART Data

Common Methods for Receiving and Parsing UART Data

Follow+Star PublicAccount, don’t miss out on exciting content Author | strongerHuang WeChat Public Account | strongerHuang The UART serial port is a common communication method in embedded development, but many people still do not know how to use the serial port. Today, I will share a few points about serial ports: Serial Port Receiving Methods … Read more

Easy Guide to UART Device Connections: Must-Know Hardware Questions

Easy Guide to UART Device Connections: Must-Know Hardware Questions

If you don’t want to miss my updates, remember to check the public account in the upper right corner and set it as a star, and take down a star for me. This analysis question still comes from Huawei’s hardware position written test questions. This time we analyze three multiple-choice questions, involving knowledge points: UART … Read more

How to Achieve Sleep Wake-Up with MCU UART?

How to Achieve Sleep Wake-Up with MCU UART?

Follow+Star Public Account, don’t miss wonderful content Source | Renesas Embedded Encyclopedia UART is one of the most common communication methods in embedded development, thus making it a necessary peripheral for many projects. The MCU UART (Universal Asynchronous Receiver-Transmitter) achieving sleep wake-up functionality typically involves low power design, interrupt mechanisms, and UART configuration. Below, we … Read more

Five Key Considerations in Embedded Microcontroller Programming

Five Key Considerations in Embedded Microcontroller Programming

During the process of microcontroller programming, if a designer can master multiple programming languages simultaneously, then this designer is certainly a very talented individual. However, it is quite challenging to be proficient in Assembly, C, and C++ at the same time. Many beginners encounter obstacles while learning even one of these languages, leading to frustration. … Read more

Discussion on Microcontroller Programming Efficiency

Discussion on Microcontroller Programming Efficiency

I am an embedded developer who has worked on various models of microcontrollers and embedded systems. Sometimes, I often look at programs written by others and frequently find many issues in the details. Although the functionalities achieved are the same, the stability can vary. I would like to discuss some problems I have observed for … Read more