<link rel="stylesheet" href="/fonts/devicon/devicon.css" data-beasties-skip>

OV5640 Camera Capture

DCMI + DMA Image Pipeline on STM32F767ZI

Role
Embedded firmware engineer
Year
2026
Status
Prototype
Stack
C · STM32 HAL · STM32F767ZI · DCMI · DMA · I²C/SCCB · UART · Python
MCU
STM32F767ZI
Frame
320×240 RGB565
Capture
DCMI + DMA2

Overview

Camera capture on the STM32F767ZI (Nucleo-144): an OV5640 configured over SCCB/I²C and read through the DCMI peripheral with DMA2 into a 320×240 RGB565 frame buffer. Frames are sent on request over UART (115200 baud) in a framed, checksummed protocol to a Python host viewer that asks for the next frame only once the current one is fully received.

What I built

  1. OV5640 frames captured through DCMI with DMA2 into a 153,600-byte buffer
  2. 320×240 RGB565 frames sent on request over UART in a framed, checksummed protocol
  3. Python live viewer with request-after-receive flow control and a byte-swap toggle
  4. Frame buffer aligned to 32 bytes so it stays cache-line safe if the D-cache is enabled
  5. Captures armed in the VSYNC blanking gap, with partial frames retried instead of returned torn

Key decisions

MCU
STM32F767ZI
Frame
320×240 RGB565
Capture
DCMI + DMA2

Stack

C · STM32 HAL · STM32F767ZI · DCMI · DMA · I²C/SCCB · UART · Python

Outcome

320×240 RGB565 frames over DCMI + DMA2 to a checksummed UART link. Prototype · 2026.

Next case — 08 / 10

Akhali Sakhli Real Estate Platform Website · 2024 All work