Skip to main content
Visitor
July 1, 2026
Question

STM32U5G7, analog camera, DCMI Embedded Sync (BT.656) with TW9912 decoder, DCMI Buffer Empty/Corrupted

  • July 1, 2026
  • 0 replies
  • 3 views

Hi everyone,

I am working on an STM32U5G7VJTx project where I am trying to capture analog composite video using a TW9912 video decoder and display it on an RGB TFT using LTDC.

  •  Hardware

* MCU: STM32U5G7VJTx
* Video Decoder: TW9912
* Input: Composite Video (NTSC)
* Display: RGB TFT driven by LTDC
* Interface between TW9912 and STM32: 8-bit BT.656 with Embedded Sync

  •  Software Flow

My current flow is:

TW9912 (configured through I2C)
→ DCMI (Embedded Sync / BT.656)
→ GPDMA
→ SRAM buffer (YCbCr422)
→ CPU converts YCbCr422 to RGB565
→ LTDC framebuffer
→ TFT display

  •  Current Problem

The TFT powers up correctly.

Most of the time the display is completely green.

Sometimes I briefly see something that resembles the camera image but in black and white sometime or in the random colour, but it is heavily distorted and not recognizable.

  •  What I Have Already Checked

* TW9912 is configured for BT.656 output with embedded synchronization.
* DCMI is configured in Embedded Sync mode.
* The Embedded Sync codes were updated from all zeros to the proper BT.656 values.
* DMA starts successfully.
* Cache invalidate is performed before reading the DCMI capture buffer , and after invalidate clearing the cache too.
* LTDC framebuffer address is updated after RGB conversion.
* YCbCr422 is converted to RGB565 before display.

  •  Things I Am Not Sure About

1. The DCMI Error IRQ continues to occur.
2. The capture buffer (`dcmi_buffer_A`) often appears to contain only zeros when I inspect it in the debugger , i think its the dcmi capture issue but not sure  .
3. Sometimes I briefly get a distorted image instead of a green screen , or sometime random distored black and white image.
4. I am unsure whether this is a DCMI synchronization issue, a TW9912 output issue, a DMA issue, or an LTDC configuration issue.

  •  Questions

1. What are the most common reasons for DCMI to not detect the right value beofre filling the buffer ?
2. If the capture buffer contains only zeros, what are the possible causes?
3. Could this indicate that DCMI never detects the BT.656 SAV/EAV codes?
4. Is there a recommended method to verify that the TW9912 is actually outputting valid BT.656 data before debugging the DCMI configuration?
5. Are there any STM32U5 DCMI examples using BT.656 embedded synchronization?

Any suggestions on how to systematically debug this pipeline would be greatly appreciated.

Thank you.