Skip to main content
vlad23
Associate
December 3, 2015
Question

DCMI OV2640 High resolution

  • December 3, 2015
  • 0 replies
  • 522 views
Posted on December 03, 2015 at 13:09

I have an evaluation board STM3240G-EVAL with camera OV2640.

I stored camera image in the external SRAM (2 MB).

How I can initialize the camera with a resolution of 1600x1200 (UXGA) in format RGB565?

I want to capture only 100 central lines. For this I use the function:

void DCMI_Read(uint16_t *img, uint32_t dummy, uint32_t rcv, uint32_t sz)

{

  volatile uint32_t data, i;

 

  DCMI-> CR | = DCMI_CR_CAPTURE;

 

  for (i = 0; i < dummy; i + = 2) {

    while (! (DCMI-> SR & DCMI_SR_FNE));

    data = DCMI-> DR;

  }

  for (i = 0; i < rcv;) {

    while (! (DCMI-> SR & DCMI_SR_FNE));

    data = DCMI-> DR;

    img [i++] = (uint16_t) data;

    img [i++] = (uint16_t) (data >> 16);

  }

  for (i = 0; i < sz - (rcv + dummy); i + = 2) {

    while (! (DCMI-> SR & DCMI_SR_FNE));

    data = DCMI-> DR;

  }

}

I am calling this:

DCMI_Read (buf, 550 * 1600 100 * 1600 1200 * 1600);

But when I take the data from the camera, the program hangs and does not take the expected amount of data.

In the case of resolution 320x240 (QVGA) no such problem.
    This topic has been closed for replies.