FreeRTOS – Simple LCD Operations on STM32H573I-DK

FreeRTOS - Simple LCD Operations on STM32H573I-DK

This article introduces simple operations of the <span>LCD</span> on the <span>STM32H573I-DK</span> development board under <span>FreeRTOS</span>. Hardware Introduction <span>ST</span> provides a development board that uses a <span>1.54"</span> <span>TFT LCD</span> and is designed with <span>CTP</span>. This article only introduces the <span>LCD</span> part. From the schematic, it can be seen that a backlight circuit designed with <span>STLD40DPUR</span> is … Read more

Efficient Outlier Removal: Practical Use of C Language qsort for Truncated Mean Calculation

Efficient Outlier Removal: Practical Use of C Language qsort for Truncated Mean Calculation

qsort is a quick sort function provided by the C standard library, located in the stdlib.h header file. It can sort arrays of any type.The prototype of the qsort function is as follows:void qsort(void *base, size_t nitems, size_t size, int (*compar)(const void *, const void *)); Parameter Function Example <span>base</span> Base address of the array … Read more

Embedded C Programming: How to Properly Handle Fatal and Non-Fatal Errors During Program Execution?

Embedded C Programming: How to Properly Handle Fatal and Non-Fatal Errors During Program Execution?

I am Lao Wen, an embedded engineer who loves learning.Follow me to become even better together! Introduction This article mainly summarizes the main error handling methods in embedded C programming. The code execution environment involved in this article is as follows: 1. Error Concepts 1.1 Error Classification In terms of severity, program errors can be … Read more

Advanced Uses of Embedded C You Should Know

Advanced Uses of Embedded C You Should Know

01 Memory Management We need to understand that variables are essentially just abstract names for memory addresses. In statically compiled programs, all variable names are converted to memory addresses at compile time. The machine does not recognize the names we use; it only knows the addresses. Memory usage is one of the important factors to … Read more

Essential Knowledge Points for C Language Beginners: Detailed Explanation of the main() Function

Essential Knowledge Points for C Language Beginners: Detailed Explanation of the main() Function

“From today on, study hard and make progress every day” Repetition is the best method for memory; spend one minute each day to remember the basics of C language. “Essential Knowledge Points for C Language Beginners: 100 Articles Series”“ 6. Detailed Explanation of the main() Function: The Entry Point of C Programs 1. Basic Form … Read more

Causes of Memory Leaks in C Language

Causes of Memory Leaks in C Language

1 Uninitialized Pointer in Struct Member struct student{ char *name; // Only 4 bytes allocated, not pointing to a valid address, contains garbage values int score;}stu, *pstu; int main(){ strcpy(stu.name, "code"); // This will cause an error, the solution is to malloc space for the name pointer stu.score = 99; return 0;} Another error: int … Read more

Implementing a Simple Calculator in C: Interface and Algorithm

Implementing a Simple Calculator in C: Interface and Algorithm

In this article, we will learn how to implement a simple command-line calculator using the C programming language. This calculator will support basic arithmetic operations: addition, subtraction, multiplication, and division. We will start with the design of the user interface and then gradually implement the core algorithms. 1. Project Structure Our project will include the … Read more

Implementing a Book Management System in C: Database and Operations

Implementing a Book Management System in C: Database and Operations

In this article, we will implement a simple book management system using the C programming language. This system will allow users to add, view, and delete book information. We will use structures to store book data and file operations to persist the data. 1. System Requirements Analysis Our book management system needs to have the … Read more

A Comprehensive Guide to Error Handling and Exception Management in C

A Comprehensive Guide to Error Handling and Exception Management in C

Recommended Reading C Language Learning Guide: Have You Mastered These Core Concepts? Understanding Typical Scenarios of Dangling Pointers in C and Defensive Programming Strategies C Language Functions: From Beginner to Proficiency, A Complete Guide C Language Pointers: From Beginner to Proficiency, A Complete Guide C Language Structures: From Beginner to Proficiency, A Complete Guide C … Read more