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.

Problems while running facedetect demo

Other Parts Discussed in Thread: OMAPL138, TVP5147, OMAP-L138, CDCE913

Hi TI Support team,

I have just bought the OMAPL138 LCDK and I’m trying to run the facedetect demo. Unfortunately it is not working and any kind of help would be very appreciated.

I have installed CCSv5.3 and SYS/BIOS 6.33, and I’m using a Spectrum Digital XDS200 USB emulator. I have also set up the hardware as recommended, connecting a VGA monitor and a composite video camera to the LCDK board. The positions of the first four switches in SW1 are OFF-ON-ON-ON.

I have imported the facedetect project into the CCS workspace and it builds correctly. It also starts the debugging with no problem but when launched the program does nothing. I have been debugging the code per line, and found that the execution gets hanged up in a while loop in the TVP5147CompositeInit function (tvp5147.c file).

When executing this line (number 50) inside the while loop: 

reg_val = CodecRegRead(baseAddr, 0x3A);

The value for reg_val is always 0x11 and as it does not meet the condition for exiting the loop it keeps there.

It seems to me that either the tvp5147 chip is not working or the I2C is not working. Any suggestion on what can be the problem and how to solve this?

Thanks in advance for your help,

Erik

  • Hi Erik,

    We are looking at it.

    Please bare with us until  we get back.

    Regards,

    Shankari.

  •  Hi Erik,

    The face detect demo will run on OMAPL138 LCDK board.  I have tested the demo using TI XDS560 Emulator on OMAPL138 LCDK.

    The following are my steps to run the face detect demo on OMAPL138 LCDK.

    1. In OMAPL138 LCDK Board- Switch settings are : SW1 : 2,3,4 ON

    Hardware connection details - Display - VGA monitor, video input - DVD player, Emulator - TI XDS560 Emulator.

    2. In CCS V5.2, imported the project of face detect from C:\Program Files\Texas Instruments\c6sdk_02_00_00_00\demos\facedetect\build\cgt_ccs\lcdk

    3. In target configuration file,

         3.1 select the emulator as TI XDS560 Emulator

         3.2 select the board or device as LCDKC6748  

         3.3 select the gel file as C6748_LCDK.gel and do the test connection and made sure the connection is established.

    4. Built the project without any errors and start the debug session.

    5. In debug window, Select  "../C674X_0" and hit Resume.

    6. If you notice any "Load program error" (attached) , press reset button on OMAPL138 LCDK board and relaunch the debug session in CCS.

    7. Output: Noticed that the video plays and the (face detect) rectangles are displayed.

     

    Regards,

    Shankari.

     

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------   

  • Hi Shankari,

    I had finally realised that the problem was caused by using a camera with PAL output format instead of NTSC.

    Everything is working fine after modifying the code as suggested here:

    http://e2e.ti.com/support/embedded/starterware/f/790/p/223776/810098.aspx

    Regards,

    Erik

  • Hello Shankari,

    I was following your post about "Hardware connection details - Display - VGA monitor, video input - DVD player, Emulator - TI XDS560 Emulator"

    Can you please suggest steps for TI XDS100v2 emulator for OMAP L138 board?

    I was able to build the face detect but could not lunch debuger for my setup which is similar to your's above.

    I really appreciate your help.

    Thanks,

    Roland

  • Hi Roland,

    The steps will be the same except selecting the emulator type as " TI XDS100v2 emulator " in the target configuration.

     

    Regards,

    Shankari.

    --------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.

    --------------------------------------------------------------------------------------------------------

  • Hello Shankari,

    Thanks for the information. I did that and it works. The other issue is I cannot see any rectangle on my face when the program runs.

    Any little suggestion would be very appreciated.

     

    Thanks,

    Roland

     

     

     

  • Hi Roland,

    May I recommend you to run a standard input video (for example: use movie videos ) and check??

    I hope this post has answered your query. Please click " verify Answer " button given below so that it will be useful for other users to refer this in future.

     

    Regards,

    Shankari.

     

  • Hello Shankari,

    Thank you for the information. What really makes it work was waiting for about 3 minutes at same location. It seems the algo get confused when you move around and it has to restart the comparison from the beginnih. Well, with patience, the rectangle finally appeared. It worth using another person as target in the video while you go back and forth on implementation. 

    Thanks,

    Roland

  • Hi Shankari,

    I have replaced the PAL camera with a OV7962 sensor connected through the 36 way camera connector on the LCDK. I'm having issues when trying to acquire images from this sensor because the VPIF Channel0 interruption is not being triggered.

    What I've done is the following:

    1) Supply the OV sensor through 1, 2 and 3 pins in J16 connector.

    2) Generate an external 24MHz clock and fed it trough the sensor into the LCDK using the CAM_CLK pin (no. 9) in J16.

    3) Connect VSYNC, HSYNC and data bit signals in 11 to 24 in J16. I have measured with an oscilloscope VSYNC and HSYNC in the connector pins and seem to be OK (see images, VSYNC below, HSYNC above).

    These signals doesn't fit exactly the ones shown in page 1753 in spruh77a document, where it seems that both VSYNC and HSYNC signals have to be high to capture data. Because of this I have modified the bit 14 in C0CTRL register in order to invert the vertical pixel valid signal inseide the VPIF, by adding the correspodning code line in SetUpVPIFRx function in facedetect_lcdk.c.

    4) Code modifications. Apart from the previous one I have also included some other modifications in SetUpVPIFRx .

    /*    // Interrupt after capturing the bottom field of every frame
        VPIFCaptureIntframeConfig(SOC_VPIF_0_REGS, VPIF_CHANNEL_0, VPIF_FRAME_INTERRUPT_BOTTOM);
        // Y/C interleaved capture over 8-bit bus
        VPIFCaptureYcmuxModeSelect(SOC_VPIF_0_REGS, VPIF_CHANNEL_0, VPIF_YC_MUXED);
        // Capturing 480I (SD NTSC)
        //VPIFCaptureModeConfig(SOC_VPIF_0_REGS, VPIF_480I, VPIF_CHANNEL_0, 0, (struct vbufParam *) 0);
        VPIFCaptureModeConfig(SOC_VPIF_0_REGS, VPIF_PAL, VPIF_CHANNEL_0, 0, (struct vbufParam *) 0);
    */
        VPIFCaptureRawIntlineConfig(SOC_VPIF_0_REGS, 640*480);
        VPIFCaptureRawVvinvSet(SOC_VPIF_0_REGS, VPIF_RAW_VVALID_INVERT);
        VPIFCaptureFieldframeModeSelect(SOC_VPIF_0_REGS, VPIF_FRAME_BASED);
        VPIFCaptureIntrprogModeSelect(SOC_VPIF_0_REGS, VPIF_CHANNEL_0, VPIF_CAPTURE_PROGRESSIVE);
        VPIFCaptureIntframeConfig(SOC_VPIF_0_REGS, VPIF_CHANNEL_0, VPIF_FRAME_INTERRUPT_TOP);
        VPIFCaptureCapmodeModeSelect(SOC_VPIF_0_REGS, VPIF_CHANNEL_0, VPIF_CAPTURE_RAW);

    As I mentioned, I don't receive any image and when I put a breakpoint in VPIFIsr function it never reaches there, so the interrupt is not being triggered. Any hint about what can be happening and how could I solve this issue would be very grateful.

    Best regards,

    Erik

  • Hi again,

    I've managed to modify sensor's output to generate an inverted VSYNC signal. Now the shape of the signal matches the expected one but the interrupt is not triggered.

    I've seen in the documentation that the expected vertical blanking time is at least 3 lines. The signal that I'm getting has only two lines width. Might this be the problem? Is it possible to reconfigure the VPIF to accept 2 lines vertical blanking time?

    Regards,

    Erik

  • Hi,

    Anyone of the TI's support team could help me? I'm stucked with this issue and I need to go on as fast as possible.

    Regards,

    Erik

  • Hello Erik,

    I am working on raw capture with OMAP-L138 LCDK too.

    I think that you might have misinterpret the second parameter in the following function:

    VPIFCaptureRawIntlineConfig(SOC_VPIF_0_REGS, 28);

    The second parameter indicates the number of lines (hexadecimal).

    I am not sure about VPIF_Rx configuration that I have made because I am having  some issues with i2c  and I cannot check it,so my obove suggestion might be wrong.

    Finally,I have a question regarding your original post.You mention that you generated a 24 MHz clock , did you do  that with CDCE913Init() function?

    Regards,

    Katerina

  • Hello Katerina,

    Thanks for your input. You are right, I might have misinterpreted this parameter, but I have just tested different options for this parameter and in any case I am not able to get an interruption from the VPIF port, thus no image read.

    The external clock that I have used is not generated with the CDCE913 but a clock generated externally with an specific HW that we have in the OmniVision sensor’s board, then we feed this clock into the LCDK through pin 9 in J16.

    Regards,

    Erik

  • Hello Erik,

    thank you for the clarification about the clocking!As for the VPIF interrupt triggering I have no further suggestions!

    Regards,

    Katerina

  • hi Erik

    i also have OMAPL138LCDK board  i want to run the facedtect demo i want to know which camera u have used for this purpose  i am using XDS100V2  emulator and i have ccs5.5 and where from u have got the coding for interfacing of camera and the image processing done on it please provide me the details 

    thank you

  • Hello !!

    I have the some problem I modified the program as suggested 

    http://e2e.ti.com/support/embedded/starterware/f/790/p/223776/810098.aspx

    But I have any thing in the screen.

    Could you please help me or attach the project that work.

    Think you

  • Hi Eric

    Have you solved your problem above? I face the same problem now and look for some help.

    I'll be grateful if you reply.

    Shreek