2015-12-03 4:09 AM
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.We’re moving the ST Community to a new platform to give you a better and more reliable community experience.