cancel
Showing results for 
Search instead for 
Did you mean: 

10bit Camera interface with STM32F7508-DK

NS.9
Associate II

Hello,

We are working on interface of OV6946 camera with STM32F7508 development kit. We need to capture image and stream on STM32F7508 Display. Camera which we are using provides 10bit output with 400x400 resolution in Bayer’s format.

The connections are done as mentioned below:

Camera Pin Controller Pins

DCMI_D0            -             PH9

DCMI_D1            -             PH10

DCMI_D2            -             PH11

DCMI_D3            -             PH12

DCMI_D4            -             PH14

DCMI_D5            -             PD3

DCMI_D6            -             PE5

DCMI_D7            -             PE6

DCMI_D8            -             PI1

DCMI_D9            -             PI2

DCMI_PIXCLK   -             PA6

DCMI_HSYNC   -             PA4

DCMI_VSYNC   -             PG9

DCMI_SDA         -             PB9

DCMI_SCL          -             PB8

We are using example code from STM32 Cube example project named “Camera�?.

We are getting black and white scrolling image for the configuration given below

static void LCD_LL_ConvertLineToARGB8888(void *pSrc, void *pDst)
{  
  /* Enable DMA2D clock */
  __HAL_RCC_DMA2D_CLK_ENABLE();
 
  /* Configure the DMA2D Mode, Color Mode and output offset */
  hdma2d_eval.Init.Mode         = DMA2D_M2M_PFC;
  hdma2d_eval.Init.ColorMode    = DMA2D_OUTPUT_ARGB8888;
  hdma2d_eval.Init.OutputOffset = 0;
 
  /* Foreground Configuration */
  hdma2d_eval.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA;
  hdma2d_eval.LayerCfg[1].InputAlpha = 0x00;
  hdma2d_eval.LayerCfg[1].InputColorMode = DMA2D_INPUT_RGB888;
  hdma2d_eval.LayerCfg[1].InputOffset = 0;
 
  hdma2d_eval.Instance = DMA2D;
  
  /* DMA2D Initialization */
  if(HAL_DMA2D_Init(&hdma2d_eval) == HAL_OK)
  {
    if(HAL_DMA2D_ConfigLayer(&hdma2d_eval, 1) == HAL_OK)
    {
      if (HAL_DMA2D_Start(&hdma2d_eval, (uint32_t)pSrc, (uint32_t)pDst, 200, 1) == HAL_OK)
      {
        /* Polling For DMA transfer */
        HAL_DMA2D_PollForTransfer(&hdma2d_eval, 100);
      }
    }
  }
  else
  {
    /* FatFs Initialization Error */
    while(1);
  }
}

Please refer the link below for output reference:

https://drive.google.com/file/d/1ATyK06csLdJNzLO_H6x2dtP0buMR2cGr/view?usp=sharing

Please guide us, what are the built in configurations are need to be used for converting 10bit Bayer image input to RGB LCD output.

Thanks & Regards,

Ayaz Ahmed,

Riosh Technologies,

Bangalore.

11 REPLIES 11
KDJEM.1
ST Employee

Hi @NS.9​ ,

When you refer to the RM0385 section 9.3.4 Table 35, you can conclude that the DMA2D can't support the Raw Bayer format input. So, you can't do the conversion from Raw Bayer format to RGB format.

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.

Andrew Neil
Evangelist III

@KDJEM.1​ "So, you can't do the conversion from Raw Bayer format to RGB format"

Or, rather, you'll have to do it in software.