Skip to content
systemcoding.dev

Tag

beginner

445 posts

Flat illustration of a microcontroller wired to an LED and a sensor, with the STMicroelectronics, Arm and C logos.
Embedded

Copy Memory to Memory With STM32 DMA

Copy and fill memory blocks with the STM32F4 DMA2 controller using HAL_DMA_Start_IT or polling, with the FIFO setting it requires and the common mistakes.

8 min read
Flat illustration of a CPU core with its cache levels and main memory, with the Arm, C and Intel logos.
Embedded

What DMA Does and Why It Frees the CPU

Understand what a DMA controller does, how it moves data as a bus master, and why one interrupt per buffer instead of per byte frees the CPU.

7 min read
Flat illustration of user space above the system call boundary, the kernel and the hardware, with the C, FreeBSD and Linux logos.
Systems Programming

Redirect stdout to a File with dup2

Redirect stdout to a file in C by opening it and calling dup2 onto descriptor 1. Includes saving and restoring the terminal and the fork and exec case.

7 min read