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
- OV5640 frames captured through DCMI with DMA2 into a 153,600-byte buffer
- 320×240 RGB565 frames sent on request over UART in a framed, checksummed protocol
- Python live viewer with request-after-receive flow control and a byte-swap toggle
- Frame buffer aligned to 32 bytes so it stays cache-line safe if the D-cache is enabled
- 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 SakhliAll work