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.

line interrupts



Hello,
I am working with a Starterware's vpif_lcd_loopback example which has been modified for raw capture mode.

Currently,I am interested in using line interrupts.So, at first, I just tried to count them inside the interrupt service routine*,but I am not able to get a logic result.Am I missing something?Any ideas are more than welcome.

*
if (status & VPIF_FRAMEINT_CH1)
    {
        countlines++;
        VPIFInterruptStatusClear(SOC_VPIF_0_REGS, VPIF_FRAMEINT_CH1);
        return;
    }

  • Hi,

    you mean to say are not able see the interrupts ? And also in RAW capture mode for line interrupts frame1 signal should enabled.

    Thanks,

    --Prabhakar Lad

  • Hi Katerina,

    Thanks for your post.

    Basically, VPIF will issue the line-interval triggered interrupts through the field/frame interrrupt signals and the line interval shall be programmed through C0CTRL register which inturn uses the FRAME1 interrupt signal. The line interrupt shall be asserted once per each configured line size.

    Have you configured the line interrupt interval field (INTLINE) in the channel 0 control register (C0CTRL) for CCD/CMOS capture mode ? Please refer Table 34-11 in the C6748 TRM as below:

    http://www.ti.com/lit/ug/spruh79a/spruh79a.pdf

    Kindly refer Sections 34.2.12.2 & 34.2.12.3 in the above doc. to understand more on Field/Frame interrupts & Line interrutps to CPU.

    For your information, line interrupt is supported only in raw mode and it is not supported in other modes (BT.656, BT.1120, and SMPTE 296M), Please make sure the starterware's vpif_lcd_loopback example code is modified only for raw capture mode and nothing else.

    Thanks & regards,

    Sivaraj K

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

  • Hello,

    thank you for your answers!

    @Prabhakar ,

    I wasn't clear enough by saying logic result ! Well, the number of line interrupts that I am getting is much more smaller than the expected and is about the same number as frame interrupts.For example, if my sensor outputs 55 frames per second with 480 lines each, in one second I  should  have about 26400 line interrupts, in fact I have 52...

    @Sivaraj,

    Very detailed and instructive answer! Υes, I have configured the line interrupt interval filed  to the desired line number and indeed, the vpif_lcd_loopback example is modified only for raw capture.

     

  • Hi Katerina,

    I wasn't clear enough by saying logic result ! Well, the number of line interrupts that I am getting is much more smaller than the expected and is about the same number as frame interrupts.For example, if my sensor outputs 55 frames per second with 480 lines each, in one second I  should  have about 26400 line interrupts, in fact I have 52...

    Alrite, can you dump the register values of vpif and see what is the value of C0CTRL set to ?

    Thanks,

    --Prabhakar Lad

  • Hello Prabhakar !

    Here you are:

  • Hi Katerina,

    Thanks for your update.

    You mean the logical result of line interrupts count is not matching with the line interrupt interval field configured. Am i right? This shall be debugged thru. keeping break point inside ISR and manually, you shall check, how many times did the line interrupts triggered actually and you shall check, on what criteria the code freezes on the line interrupt count and evaluate the mismatch of logical result as expected with respect to no. of line interrrupts.

    Also, could you give us the memory register dump of channel0 control register (C0CTRL) to trace the findings?

    Thanks & regards,

    Sivaraj K

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

    Yes, exactly that what I tried to say!

    I will try  what you suggested and I will inform you about the results.

    What do you mean by memory register dump of channel0 ? I am new to ccs and not well acquainted with all of  it's features!

  • Hi Katerina,

    If you look at INTLINE it set to "000111100000",  VPIF will issue line-interval triggered interrupts using the field/frame interrupt signals. The line-interval is programmable in the C0CTRL register, and it uses the FRAME1 interrupt signal.

    So to get interrupt for each line you need to set the line-interval to 1.

    Thanks,

    --Prabhakar Lad

  • Hello Prabhakar,

    You are right  the line interval must be set to 1.

    Now, I get normal results!

    I thought that it should be equal to the lines of each frame, that's why it was set to 480 ( "000111100000" ).

    Thank you very much!