Understanding Linux Reserved Memory Mechanism
As the kernel runs, physical memory becomes increasingly fragmented. Certain devices, such as those using DMA, require large contiguous physical memory blocks. When such memory is unavailable at runtime, the device may fail to operate. To address this, Linux provides a mechanism to reserve a dedicated region of physical memory for specific devi ...
Posted on Sun, 06 Sep 2026 16:43:19 +0000 by raker7
Direct Memory Access (DMA) Implementation in Linux Device Drivers
DMA enables peripherals to transfer data directly between memory and hardware registers without CPU intervention. In Linux, DMA operations replace CPU-driven data writes to device registers, such as SPI_DATA for SPI communication, shifting from writel(data, SPI_DATA) to automated buffer transfers.
Key considerations include address handling: CP ...
Posted on Sun, 12 Jul 2026 16:47:00 +0000 by chet23
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
STM32 DMA Transmission Issues and Solutions
Issue 1: Unexpected Data Transmission with DMA
#include "stm32f10x.h"
#include "Delay.h"
#include "DMA.h"
#include "Serial.h"
uint8_t dataBuffer[3];
int main(void)
{
/* Module initialization */
OLED_Init();
Key_Init();
Serial_Init();
MyDMA_TX_Init(DMA1_Channel4, (uint32_t)&USART1- ...
Posted on Tue, 02 Jun 2026 16:04:21 +0000 by kir10s