AnsweredAssumed Answered

BF561 capture image only

Question asked by LadaF on Aug 23, 2012
Latest reply on Oct 30, 2012 by Nabeel

Hello,

I'm using BF561 EZ lite kit. I would like grabb picture exactly when I need (only one PPI for input). It looks that example FrameCaptureVideoOut from SDK1.10 is good idea. How can I grabb picture and do not allways open and close ad7183 driver? I divided CaptureVideoFrame function. First do open ad7183 driver and configuration and second looks like this:

 

static void CaptureVideoFrame(

          ADI_DEV_MANAGER_HANDLE           DeviceManagerHandle,

          ADI_DMA_MANAGER_HANDLE           DMAManagerHandle)

{

    u32 count = 0;

   

    Buffer2D.Data = (void*)(sFrame0);

    Buffer2D.CallbackParameter = &Buffer2D;

    Buffer2D.ProcessedFlag = FALSE;

          //FrameReady = FALSE;

 

          // give the PPI driver the buffer to process

          ezErrorCheck( adi_dev_Read(AD7183DriverHandle, ADI_DEV_2D, (ADI_DEV_BUFFER *)&Buffer2D));

 

          // start capturing the input data

          ezErrorCheck( adi_dev_Control(AD7183DriverHandle, ADI_DEV_CMD_SET_DATAFLOW, (void*)TRUE));

 

 

          // wait till the buffer has been processed

  while (Buffer2D.ProcessedFlag == FALSE)

          {             

                     count++;  

          }

          ezErrorCheck( adi_dev_Control(AD7183DriverHandle, ADI_DEV_CMD_SET_DATAFLOW, (void *)FALSE));

}

 

Problem is that I am able to grabb only first frame, the other are black. (Full code is in attachment).

 

Thanks.

Outcomes