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.

CC3200 Camera Example - End of Frame Not Triggering

Other Parts Discussed in Thread: CC3200

Hello:

I am running the CC3200 Camera Application example, and the setup of the camera and the data coming out of the camera looks correct. I am able to connect to the board through my browser and I have verified that I can start a capture from the browser. However, the code is getting stuck in the while loop at line 770 of camera_app.c:

    while(g_frame_end == 0)
        ;

The code is stuck in the loop because g_frame_end is never getting set to 1. I have set up a breakpoint on line 965 of camera_app.c (where g_frame_end is set to 1), but the CameraIntHandler does not get called. I believe this should get called when VSYNC goes low:

static void CameraIntHandler()
{
    if(g_total_dma_intrpts > 1 && MAP_CameraIntStatus(CAMERA_BASE) & CAM_INT_FE)
    {
        MAP_CameraIntClear(CAMERA_BASE, CAM_INT_FE);
        g_frame_end = 1;
        MAP_CameraCaptureStop(CAMERA_BASE, true);
    }

I have captured the signals from the camera with a logic analyzer and VSYNC is behaving correctly, going high during the frame and going low at the end of the frame. Can you help me figure out why the code is getting stuck and why the end of frame code isn't executing correctly?

LP Rev. 4.1
SDK 1.0.0 with Service Pack 1.0.0.1.2

Thank you,
Will

  • Hi Will,


    Is it same thing happening with websock_camera application also?
    Did you make any modification in code as we have seen this issue when we set XCLK other than 24MHz and change image resolution on the fly.


    Regards,
    Aashish
  • Hi Aashish:

    Thanks for your reply. I have not made any real modifications to the code. I have not changed the image resolution (which is set to QVGA) and I have verified that XCLK is 24 MHz. However, your suggestions did prompt me to explore a couple of things.

    I have verified that FRAME_QVGA is defined in the Predefined Symbols in the project properties, but it doesn't appear as though this directive is getting compiled into the program. I the file mt9d111.c at lines 186 and 194, these lines are grayed out as though they are not included in the program:

    #elif QVGA_FRAME
        {1, 0xC8, 240       },
    #endif

    #elif QVGA_FRAME
        {1, 0xC8, 320       },
    #endif

    I'm not sure why. This may mean that the camera is using the default resolution of 1600 x 1200. Whether or not this is related to my issue of the end-of-frame interrupt  not being triggered, I can't say.

  • Hi Will,

    Can you make sure "QVGA_FRAME" is defined in project properties not "FRAME_QVGA". Also can you please verify same issue (End of frame not triggering) occuring on websock_camera app.

    Regards,

    Aashish

  • Hi Aashish:

    I checked the project properties and QVGA_FRAME is defined correctly. (I mistyped FRAME_QVGA in my earlier post. Sorry!)

    On your advice, I explored running the websock_camera application. I was able to flash the files to the board, and I was able to load the project, compile it, and run the code in the debugger. However, this application does not work either. Rather than debug both problems, I plan to focus on my original issue of the interrupt not triggering when VSYNC goes low.

    I have rerun the camera_application code and set breakpoints to verify what's happening, and I'm confident that this is the issue. The rest of the code seems to work fine. I am able to run the code and trigger an image capture from the web browser. However, the code gets hung up in the while loop waiting for the g_frame_end flag to get set. This is explained in better detail in my original post.

    Can you (or anyone else? Someone at TI?) think of a reason why this interrupt isn't being triggered?

    Thanks again for your help on this. It is most appreciated.

    - Will
  • Hi Will,

    Apologies for delayed response.

    We are not able to recreate this issue. Is this issue now resolved at your end ?

    Can you please share with how you have interfaced (Pin to Pin connection) the camera sensor with CC3200.

    Thanks and Regards,
    Praveen
  • Hi Praveen:

    Thank you for getting back to me. I solved this problem just now. There was a bad wire on my camera interface board that was making the 2.8V supply unstable. As I was debugging this issue, all of the signals to and from the camera looked OK, and the evidence pointed to a problem with the VSYNC signal not triggering in the program. This was causing me to look in the wrong place.

    I fixed the 2.8V supply and now it is working. I apologize for the wild goose chase.

    Thanks and regards,
    Will
  • Hi Will,

    Thanks for confirming. I am closing this thread now.

    Best Regards,
    Praveen