2025-10-12 7:35 PM - last edited on 2025-10-15 1:51 AM by KDJEM.1
I’m using an analog camera with a CVBS output connected to an ADV7280/TVP5150, which interfaces with the DCMI on the STM32H747. However, the LCD display is not showing any image. Previously, I used the OV5640 camera, and it worked fine.
void CAM_DMA2D_Config(uint16_t xsize, uint32_t ysize)
{
/* output,Configure the DMA2D Mode, Color Mode and output offset */
hlcd_dma2d.Instance = DMA2D;
hlcd_dma2d.Init.Mode = DMA2D_M2M_PFC; // no pixformat convert
hlcd_dma2d.Init.ColorMode = DMA2D_OUTPUT_RGB565;
hlcd_dma2d.Init.OutputOffset = 0;
/* DMA2D Callbacks Configuration */
hlcd_dma2d.XferCpltCallback = CAM_DMA2D_TransferCompleteCallback;
/* Input,Foreground Configuration */
hlcd_dma2d.LayerCfg[1].AlphaMode = DMA2D_REPLACE_ALPHA;
hlcd_dma2d.LayerCfg[1].InputAlpha = 0xFF;
//hlcd_dma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_RGB565;
hlcd_dma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_YCBCR;
hlcd_dma2d.LayerCfg[1].InputOffset = 0;
hlcd_dma2d.Instance = DMA2D;
HAL_DMA2D_DeInit(&hlcd_dma2d);
/* DMA2D Initialization */
if(HAL_DMA2D_Init(&hlcd_dma2d) == HAL_OK)
{
if(HAL_DMA2D_ConfigLayer(&hlcd_dma2d, 1) != HAL_OK)
{
Error_Handler();
}
}
else
{
Error_Handler();
}
}
__weak HAL_StatusTypeDef MX_DCMI_Init(DCMI_HandleTypeDef* hdcmi)
{
/*** Configures the DCMI to interface with the camera module ***/
/* DCMI configuration */
hdcmi->Instance = DCMI;
hdcmi->Init.CaptureRate = DCMI_CR_ALL_FRAME;
hdcmi->Init.HSPolarity = DCMI_HSPOLARITY_HIGH;
hdcmi->Init.SynchroMode = DCMI_SYNCHRO_HARDWARE;
hdcmi->Init.VSPolarity = DCMI_VSPOLARITY_HIGH;
hdcmi->Init.ExtendedDataMode = DCMI_EXTEND_DATA_8B;
hdcmi->Init.PCKPolarity = DCMI_PCKPOLARITY_RISING;
hdcmi->Init.JPEGMode = DCMI_JPEG_ENABLE;
//hdcmi->Init.ByteSelectMode = DCMI_BSM_ALL; // capture all bytes
//hdcmi->Init.ByteSelectStart = DCMI_OEBS_EVEN; // depends on pixel packing
if(HAL_DCMI_Init(hdcmi) != HAL_OK)
{
return HAL_ERROR;
}
return HAL_OK;
2025-10-15 1:46 AM - edited 2025-10-15 1:52 AM
Hello @KHowe ;
What is the output mode of the ADV7182? YCbCr?
Is the DCMI capture YCbCr data or RGB?
Also, I recommend you to check the configuration of the ADV7280 output format, Maximum pixel clock and HSYNC and VSYNC.
Please look at this FAQ How to write your question to maximize your chance to find solution- STMicroelectronics Community
I hope this help you.
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.