cancel
Showing results for 
Search instead for 
Did you mean: 

CAMERA_NOT_SUPPORTED OV9655+STM32F746NG discovery

Posted on April 29, 2017 at 13:53

Hi,

I'm trying to get a STM32DIS_CAM (OV9655/Embest DM_CAM130) work with STM32F746NG_Discovery kit. I have imitated the instructions of driving the camera like what proposed in the example: 

/external-link.jspa?url=https%3A%2F%2Fcodeload.github.com%2Fadityamanglik%2FSTM32F7DiscoCamera%2Fzip%2Fmaster

.

When executing the instructions to initialize the camera by the function 

BSP_CAMERA_Init(..) with any resolution, it returns the value C

AMERA_NOT_SUPPORTED. What are the possible reasons to

 get that error whereas the camera OV9655 is absolutely supported? Can it be damaged? and if yes, how to get sure of that?, Should I initialize the code in another way?.

In the attached file there is the 'main.c' file, the whole project is written in Keil uVision5, and the peripheral initialization made in STM32CubeMX.

Please guide me to solve this problem and to get the camera to work. This is the main function:

int main(void)

{

/* USER CODE BEGIN 1 */

MyStr = 'Test Camera';

/* USER CODE END 1 */

/* MCU Configuration----------------------------------------------------------*/

CPU_CACHE_Enable();

/* Reset of all peripherals, Initializes the Flash interface and the Systick. */

HAL_Init();

/* Configure the system clock */

SystemClock_Config();

/* Initialize all configured peripherals */

MX_GPIO_Init();

MX_DMA_Init();

MX_DCMI_Init();

MX_LTDC_Init();

MX_I2C3_Init();

/* USER CODE BEGIN 2 */

BSP_LCD_Init();

BSP_LCD_LayerDefaultInit(1, LCD_FRAME_BUFFER);

BSP_LCD_DisplayOn();

BSP_LCD_SelectLayer(1);

BSP_LCD_SetLayerWindow(1, xoffset, yoffset, xsize, ysize);

BSP_LCD_SetTextColor(LCD_COLOR_BLUE);

BSP_LCD_Clear(LCD_COLOR_WHITE);

BSP_LCD_DrawLine(0,0,480,272);

BSP_LCD_DrawEllipse(240, 141, 50, 20);

BSP_LCD_DisplayStringAtLine(3,(uint8_t *)MyStr);

BSP_LCD_FillRect(300,200,30,20);

i = BSP_CAMERA_Init(RESOLUTION_R320x240);

BSP_CAMERA_ContinuousStart((uint8_t *)CAMERA_FRAME_BUFFER);

/* USER CODE END 2 */

/* Infinite loop */

/* USER CODE BEGIN WHILE */

while (1)

{

BSP_LCD_DisplayChar(100, 10, 48+(i%10));

BSP_LCD_DisplayChar(85, 10, 48+((i/10)%10));

BSP_LCD_DisplayChar(70, 10, 48+((i/100)%10));

count++;

if(count >= 1000)

count = 0;

HAL_Delay(500);

}

}

void BSP_CAMERA_LineEventCallback(void)

{

static uint32_t tmp, tmp2, counter;

if(ysize > counter)

{

LCD_LL_ConvertLineToARGB8888((uint32_t *)(CAMERA_FRAME_BUFFER + tmp), (uint32_t *)(LCD_FRAME_BUFFER + tmp2));

tmp = tmp + xsize*sizeof(uint16_t);

tmp2 = tmp2 + xsize*sizeof(uint32_t);

counter++;

}

else

{

tmp = 0;

tmp2 = 0;

counter = 0;

}

}

Thanks.

null
0 REPLIES 0