Building the Ai-M61-32S Development Environment on Windows

Prerequisites This guide covers setting up the development environment for the Ai-M61-32S development board (which shares the same main chip as the Ai-M6X series) on a Windows 10 system. Installing Visual Studio Code Download VSCode from the official website: Visit code.visualstudio.com Download the Windows installer (.exe) Run the installer a ...

Posted on Fri, 28 Aug 2026 16:13:22 +0000 by porco

Implementing SPI Communication on LPC2138 with 74HC595 LED Driver

LPC2138 integrates a hardware SPI peripheral supporting synchronous, full-duplex serial communication. During each transfer cycle, the master transmits one byte while simultaneously receiving one byte from the slave — even when the slave response is irrelevant, as in driving a 74HC595 shift register. The following implementation configures the ...

Posted on Wed, 26 Aug 2026 16:24:13 +0000 by brokenme

DHT11 Single-Wire Communication Protocol: Data Format and Implementation

Data Packet Structure The DHT11 sensor uses a single-wire communication protocol. Each data transmission consists of a 5-byte packet organized as follows: Byte 0: Integer part of humidity Byte 1: Fractional part of humidity Byte 2: Integer part of temperature Byte 3: Fractional part of temperature Byte 4: Checksum byte The sensor transmits da ...

Posted on Sun, 16 Aug 2026 16:49:52 +0000 by MadDogSh

Developing a Bare-Metal Environment for RISC-V

Modern applications rely on complex execution environments—ranging from standard libraries to operating systems—to manage resources and hardware interactions. To build a kernel from scratch, one must strip away these abstractions and interface directly with the CPU and memory. This process involves navigating the target platform's architecture, ...

Posted on Mon, 06 Jul 2026 16:13:44 +0000 by learningsql

Efficient Embedded Programming Techniques

Calculating Sturcture Member Size #include <stdio.h> // Get size of struct member #define MEMBER_SIZE(type, member) sizeof(((type*)0)->member) // Get offset of struct member #define MEMBER_OFFSET(type, member) ((size_t)(&(((type*)0)->member))) typedef struct { char x; char y; char z; } coord_t; typedef struct { ...

Posted on Thu, 02 Jul 2026 16:07:32 +0000 by Syranide

Multi-Channel ADC Data Acquisition Using DMA on STM32

Configure the ADC to sample across 5 channels and enable DMA in circular mode. Buffer Definition and Initialization #define CHANNEL_COUNT 5 #define SAMPLES_PER_CHANNEL 100 static uint16_t raw_adc_buffer[CHAMPLES_PER_CHANNEL * CHANNEL_COUNT]; /** * @brief Initialize ADC calibration and start DMA transfer */ void ADC_Startup(void) { ...

Posted on Tue, 23 Jun 2026 17:54:34 +0000 by Magestic

Rockchip RK3308 GPIO Controller Implementation

1, Overview 1.1, General Description The General Purpose Input/Output (GPIO) peripheral represents a programmable I/O interface that operates as an APB slave device. It controls external I/O signal outputs and their direction configuration. Additionally, it enables reading external signals through memory-mapped registers. Key features include: ...

Posted on Sun, 14 Jun 2026 16:22:03 +0000 by Charles256

Creating a Custom Project for RP2040-SMP

1. Project Setup After running the FreeRTOS-SMP-Demos, you have a basic understanding of how SMP operates. Now, create your own project and compile it. Follow the enstructions in "Creating Your Own Pico Project" to set up the pico_smp project. Create pico_smp.c and input: #include <stdio.h> #include "pico/stdlib.h" ...

Posted on Sat, 23 May 2026 22:31:14 +0000 by mrwutang

U-Boot Command Reference for Embedded Linux Flashing and Boot Configuration

Entering the U-Boot prompt When the board powers on, U-Boot waits for a short time for default boot sequence. The exact key sequence depends on the vendor: Press Enter on some boards. Type tpl on others. Any key may also work. A typical countdown message appears: Enter magic string to stop autoboot in 1 seconds Successful entry drops you int ...

Posted on Sat, 23 May 2026 20:48:00 +0000 by zoreli

Linux GPIO Subsystem: Legacy vs. Descriptor-Based APIs

Legacy GPIO Interface Kernel API /* Device-tree helper */ int of_get_gpio(struct device_node *np, int idx); /* Pin life-cycle */ int gpio_request(unsigned gpio, const char *label); void gpio_free(unsigned gpio); /* Direction */ int gpio_direction_input(unsigned gpio); int gpio_direction_output(unsigned gpio, int value); /* Value access */ ...

Posted on Thu, 07 May 2026 08:47:11 +0000 by cdorob