This guide distills essential C and C++ concepts critical for embedded firmware development—particularly on resource-constrained microcontrollers like STM32. It emphasizes deterministic behavior, memory awareness, and ABI-safe practices over generic language theory. C vs. C++ in Embedded Context C++...
SPI Protocol Fundamentals The Serial Peripheral Interface (SPI) is a synchronous, full-duplex communication protocol widely used for high-speed data exchange between a microcontroller (Master) and various peripherals (Slaves). Unlike I2C, SPI does not use device addresses in the data stream; instead...
Architecture and System Capabilities This digital power supply is a high-performance laboratory instrument built on the STM32 platform. It provides adjustable Constant Voltage (CV) and Constant Current (CC) outputs with integrated safety mechanisms including Over-Voltage (OVP), Over-Current (OCP), a...
In FreeRTOS, the task scheduler acts as the heart of the real-time operating system, managing the lifecycle and execution flow of concurrent tasks. On platforms like the STM32, launching the scheduler involves a sequence of low-level hardware and software configurations. 1. Initiating the Scheduler...
Setting Up Embededd Development Environment To develop STM32 applications on Linux, configure the ARM GNU toolchain for cross-compilation. Download the latest ARM GNU Toolchain from Arm Developer and extract it to /opt/gcc-arm-none-eabi. Add the binary path to your shell configuration: export PATH=$...
System Architecture Overview This project implements a portable biometric monitoring device centered around the STM32F103C8T6 microcontroller. The system integrates both photoplethysmography (PPG) and electrocardiography (ECG) sensing technologies to provide comprehensive cardiac health monitoring....
Sensor Operating PrinciplesThe MAX30102 integrates two LEDs (red at 660nm and infrared at 880nm) and a photodetector to facilitate photoplethysmography (PPG). Blood oxygen saturation (SpO2) is determined by the differential absorption of light by oxygenated hemoglobin (HbO2) and deoxygenated hemoglo...
GPIO Fundamentals GPIO (General Purpose Input Output) is a common peripheral that can be configured into 8 distinct input/output modes. Pin output voltage ranges from 0V to 3.3V, and pins marked with FT are 5V-tolerant, meaning they accept 5V input while still outputting 3.3V. In output mode, GPIO c...
DMA Overview DMA (Direct Memory Access) enables high-speed data transfers directly between peripherals and memory or between memory regions without CPU intervention. This architecture significantly reduces processor overhead, allowing the CPU to专注于处理任务. The STM32F103 series implements two DMA contro...
Cross-File Variable Sharing via UARTTo dynamically control the pulse width of GPIOA, pulse width of GPIOB, and the interval between them via serial commands, declare the configuration variables in the UART source file:int pulseWidthA = 20; int pulseWidthB = 20; int pulseGap = 20;Access these variabl...