Understanding Byte Alignment in Linux

Understanding Byte Alignment in Linux

Recently encountered a problem where ThreadX running on ARM crashed while communicating with DSP using message queues (the final implementation principle is interrupt + shared memory). After investigation, it was found that the structure used for message passing did not consider the issue of byte alignment. Here’s a brief overview of byte alignment issues in … Read more

Mastering Microcontrollers: From Beginner to Expert

Mastering Microcontrollers: From Beginner to Expert

Many students mention learning microcontrollers, and they often have the following expression: Seeing others’ programs densely packed, they don’t know where to start. In fact, if you calm down and read others’ programs, you will find a certain pattern, which is often modular. Microcontrollers have a lot of registers, and it’s hard to remember what … Read more

Memory Optimization Techniques in Microcontroller Development (C Language Version)

Memory Optimization Techniques in Microcontroller Development (C Language Version)

First, let’s talk about As we all know, the biggest difference between microcontroller programming and computer programming is that microcontrollers have very limited resources, and most low-end microcontrollers do not have an operating system. Except for some embedded-level chips that use Linux, most operations are done with simple RTOS, and some simple applications or chips … Read more

Understanding the Distinction Between Embedded C Programming and Traditional C Language

Understanding the Distinction Between Embedded C Programming and Traditional C Language

When we first learn embedded development, a common question arises: what is the difference between C language and embedded C programming? Embedded engineers typically tell you that the difference lies in the fact that embedded C runs on embedded development boards, which differ from CPUs in computers, leading to different compilers and executable programs. Unlike … Read more

Understanding Bitwise Operations in Microcontroller Programming

Understanding Bitwise Operations in Microcontroller Programming

Previously, we discussed why microcontrollers should be programmed in C language and what programming environments are required. Today, we will introduce the basic knowledge of microcontroller programming. First, we need to introduce bitwise operations. Bitwise operations are very common when configuring microcontroller registers. For instance, when configuring the GPIO of a microcontroller to output direction … Read more

Understanding Why C Language is Used for Microcontroller Programming

Understanding Why C Language is Used for Microcontroller Programming

With the development of technology, electronic products are becoming more and more common, making our daily lives more convenient. Most electronic products have microcontrollers, which achieve functionality by executing software logic. While assembly language is the most suitable programming language for microcontroller programming, the most commonly used and widespread is C language. So, why should … Read more

How to Self-Learn STM32 Microcontrollers

How to Self-Learn STM32 Microcontrollers

Continuing to post my answer. First, you need a development board. If you are just starting in the field of microcontrollers, I recommend starting with videos. At the very least, you should have a book on C programming for reference on C language concepts. When you first start learning, focus on videos. For concepts that … Read more

Understanding Zero Division Operations in STM32 Microcontrollers

Understanding Zero Division Operations in STM32 Microcontrollers

This issue’s topic: As is well known, in C language, dividing a number by 0 will lead to a division operation exception, causing the program to crash. To avoid program crashes, we need to include checks for 0 in the code. However, when running C program code that performs division by zero on STM32 microcontrollers, … Read more

Compiling C Language on Raspberry Pi: A Guide for OS Development Enthusiasts

Compiling C Language on Raspberry Pi: A Guide for OS Development Enthusiasts

Selected from GitHub Author: Zoltan Baldaszti Compiled by: Machine Heart Editor: Chen Ping The Raspberry Pi, though small—only the size of a credit card—functions just like a regular computer, capable of connecting to TVs, monitors, keyboards, and mice. It can handle text, spreadsheets, media, and even games. So how can this magical little computer be … Read more

Getting Started with ESP32: Phase One Course Launch

Getting Started with ESP32: Phase One Course Launch

ESP32 Phase One Course is now live, here are some explanations and introductions to this course: 1. This tutorial is the first phase of the ESP32 course, covering mainly ESP32 introduction, environment installation, GPIO interface, external interrupts, UART communication, ADC, DAC, timers, IIC bus, SPI bus, and IIS bus. Since the core feature of the … Read more

×