This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

vpif_lcd_loopback example-raw capture

Other Parts Discussed in Thread: OMAPL138

Hello !

I am reposting my query regarding the vpif_lcd_loopback example in this forum because the topic maybe is more relevant to the StarterWare forum rather to the OMAP-L13x,AM1x... forum.I have downloaded the example code provided by logicPD ( http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/p/259541/937548.aspx#937548 ) and I am trying to modify the vpif_lcd_loopback example  in order to capture raw data from a Leopard Imaging sensor.

In the example code provided by logicPD, in the function MT9V032_init()  (initialization and configuration of the camera sensor)
one of the first steps is to initialize a clock synthesizer  (via calling the CDCE913Init() function ) in order to supply the camera sensor with an external clock.
The problem is that when I try to do the same in the vpif_lcd_loopback example, when I use the function CDCE913Init() the execution gets stuck  in a while loop that indicates that the data (i.e. value for one of cdce913 registers) hasn't been sent to cdce913 via i2c.More precisely:

My function for initializing my camera sensor:

void MT9M024_Init(unsigned int baseAddr)
{
/    /extclk=27Mhz
    CDCE913Init(baseAddr);
    
    //soft reset - i2c configuration is preserved
    //R0-301A[0]=1 for 1ms
    CameraRegWrite(baseAddr,0x301A, 0x0001);
    Delay(1000000);
    CameraRegWrite(baseAddr,0x301A, 0x0000);
    Delay(1000000);
            .
            .
            .
}

Program flow:

MT9M024_Init() -> CDCE913Init() -> CodecRegWrite() -> I2CCodecSendBlocking() -> while loop


Point that program gets stuck:

static void I2CCodecSendBlocking(unsigned int baseAddr, unsigned int dataCnt)
{            .
            .
            .
    I2CMasterStart(baseAddr);
    
    /* Wait till the data is sent */
    
    while(txCompFlag);
}



Any ideas why the clock synthesizer can't receive data via I2C?
I am using OMAPL138-LCDK with a dual camera module from Leopard Imaging and I am modifying the vpif_lcd _loopback example code from OMAPL138_StarterWare_1_10_03_03 .
Thank you in advance!