The Beauty of Mathematics: The Intricacies of Embedded Programming (with C Code)

[Introduction] Ah, you have been successfully drawn in, not quite what you expected, huh?~~~ Just kidding, back to the point. Today, a netizen asked me a question about a sensor measuring a physical quantity and needing to determine its trend of change. I provided some suggestions, and here I will elaborate on those suggestions and … Read more

A Method for Context Switching and Perfect Decoupling in Embedded Programming

Follow “Embedded Mix” and select “Star the Official Account” to progress together! Source: CSDN Fast Context Switching – cpost Application It is commonly believed that time-consuming operations cannot be executed during interrupts, as this would affect system stability, especially in embedded programming. For programs with an operating system, interrupt handling can be divided into two … Read more

Six Common Data Structures in Embedded Programming

▼Click the card below to follow our public account ▼ Today, embedded systems are increasingly applied in various fields such as smart homes, smart healthcare, industrial automation, and intelligent transportation. In the process of embedded system development, data structures are an essential knowledge point. This article will introduce several common data structures in embedded programming, … Read more

Sharing Years of Experience in Embedded Programming: A Different Perspective on Programming

1. Limitations of Traditional Programming Structures When not using an RTOS, embedded software typically employs two traditional programming structures: one is called the “front-back structure” or “super loop structure,” which is essentially an event-driven programming method; the other is a time-triggered programming method, such as Michael J. Pont’s “time-triggered programming model.”In practical work, when the … Read more

A Solution for Context Switching in Embedded Programming

Click the card below to follow Arm Technology Academy This article is from CSDN, and it mainly shares a solution for achieving high cohesion and low coupling during context switching in embedded programming.. Original link: https://blog.csdn.net/qq_34245464/article/details/111804661 The demands of embedded programming are ever-changing. To ensure system stability while maintaining code reusability, high cohesion and low … Read more

How to Prevent Memory Leaks in Embedded Programming?

1. Introduction Recently, various products in our department have encountered issues caused by memory leaks, specifically manifested as board resets after continuous operation for several days due to memory exhaustion. On one hand, memory leak issues are considered low-level errors, and their oversight in production can have severe consequences; on the other hand, since memory … Read more

Don’t Overlook the C Language Standards in Embedded Programming!

Recently, during a code review, I noticed that many colleagues’ coding practices were teetering on the edge of risk, with one of the most glaring issues being the arbitrary placement of local variable definitions. For seasoned C programmers, most have developed the habit of “defining variables at the beginning of a statement block”. I vaguely … Read more

How to Use Complex Pointers in Embedded Programming

1. Introduction In C programming, pointers are one of the most error-prone areas, especially when multiple pointers are involved, which can be quite confusing. This article analyzes the commonly used complex pointers in embedded systems to clarify the common pitfalls in using pointers in C language. 2. Function Pointers and Pointer Functions In C language, … Read more

What Can QEMU Do in Embedded Programming?

What Can QEMU Do in Embedded Programming? 1. Introduction 2. Bare-metal or RTOS Programming in Embedded Systems 3. Research on Network Programming Using QEMU 4. Embedded Graphics Development 5. Development of Embedded Linux 6. Conclusion 1. Introduction In the process of embedded development, a lot of time is spent interacting with hardware devices, controlling their … Read more