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.

DM365 Continuous capture mode problem

Hello, My DM365 board don't catpure images from some BT601 16bit sensor interface at the continuous capture mode. Currently, I'm using DVSDK 4.01 on my DM365 board. My DM365 board is based on DM365 EVM. I have two image sensor modules. These image sensor modules are BT 601 16bit interface and 720p resolution. The diffence of the modules is only PCLK freq. One is 35MHz and the other is 66MHz. When I using continuous mode capture, my board can capture images from the 35MHz PCLK sensor. But, my board don't capture any images from the 66MHz PCLK sensor. When I using 66MHz PCLK sensor, the interrupt states is following # cat /proc/interrupts CPU0 0: 430 AINTC vpfe_capture0 3: 0 AINTC dm365_h3a_af 5: 0 AINTC Imp_Sdram_Irq 6: 0 AINTC dm365_h3a_aew 8: 3422 AINTC davinci_osd 12: 1 AINTC musb_hdrc 16: 0 AINTC edma 17: 2 AINTC edma_error 23: 0 AINTC sdio0 26: 1080 AINTC mmc0 32: 4065 AINTC clockevent 33: 0 AINTC free-run counter 39: 315 AINTC i2c_davinci 40: 837 AINTC serial 42: 0 AINTC spi_davinci.0 44: 0 GPIO-AINTC dm365evm_keys 52: 0 AINTC eth0 53: 1319 AINTC eth0 54: 63 AINTC eth0 55: 0 AINTC eth0 Err: 0 # The INT 0 vpfe_capture0 is increasing at 30/sec. But the INT 5 Imp_Sdram_Irq is not occurred. Few months ago, I used DVSDK 2.10 on my DM365 board. At that time, I used one-shot capture mode. At one-shot capture mode, these sensors (35MHz and 66MHz both) were working well. Please help me.
  • Ooops!!! Why my post is above ???? So I make my post as image file.
  • Hi,

    Few things you might want to check are:

    1. Are you configuring the resizer with the right input size that you are receiving from sensor/ISIF?

    2. Can you try changing the polarity of HSYNC and VSYNC in IPIPEIF.CFG2?

    3. Can you try reducing the output resolution from the resizer in the capture driver and see if you start getting some interrupts or not?

    Regards,

    Anshuman

  • Hi,

    Thanks for your reply.

     

    > 1. Are you configuring the resizer with the right input size that you are receiving from sensor/ISIF?

    Yes.

    I'm running using same HW, same kernel, same drivers, and same test app for 2 diffent sensor modules.

    35M PCLK sensor is working well. But, 66M PCLK sensor is not.

    My test app is base on encode in DVSDK 4.01 psp. I removed some codes related with display & graphic.

    This app captures from sensor at 720p resolution and encode to H.264 and save encoded data to file. ( at continuous mode)

     

    > 2. Can you try changing the polarity of HSYNC and VSYNC in IPIPEIF.CFG2?

    I stil not changed the polarity of HD & VD in IPIPEIF.CFG2. I check your 3rd request first.

    By the way, when I use one-shot mode, the polarity is not matter at capture function.

    Even dough I set wrong polarities, the capture operation is working. Wrong polarity make abnormal images.

    In continuous mode, does make wrong polarity no capture operation?

     

    > 3. Can you try reducing the output resolution from the resizer in the capture driver and see if you start getting some interrupts or not?

    I change resizer output image resolution as 640 x 352.

    My test app working well at 65MHz PCLK sensor.

    # cat /proc/interrupts
               CPU0
      0:      74630       AINTC  vpfe_capture0
      3:          0       AINTC  dm365_h3a_af
     
    5:      74639       AINTC  Imp_Sdram_Irq
      6:          0       AINTC  dm365_h3a_aew
      8:     161944       AINTC  davinci_osd
      9:      74346       AINTC  IRQK_Handler
     10:      74435       AINTC  IRQK_Handler
     12:          1       AINTC  musb_hdrc
     16:          0       AINTC  edma
     17:   14273734       AINTC  edma_error
     23:          0       AINTC  sdio0
     26:      23112       AINTC  mmc0
     32:     284932       AINTC  clockevent
     33:         15       AINTC  free-run counter
     39:        490       AINTC  i2c_davinci
     40:       4323       AINTC  serial
     42:          0       AINTC  spi_davinci.0
     44:          0  GPIO-AINTC  dm365evm_keys
     52:          0       AINTC  eth0
     53:     341421       AINTC  eth0
     54:     630888       AINTC  eth0
     55:          0       AINTC  eth0
    Err:          0
    #

     

    I attach ISIF, IPIPEIF, Resizer register dump, working at reduced resizer-output

    < ISIF >

    # readl 1c71000 0 40
    00000  00000001 00001000 00000000 00000000
    00010  00000000 00000000 00000000 000004FF
    00020  00000001 00000001 000002CF 0000FFFF
    00030  000000FF 00000050 00000000 00000000
    00040  00000000 00000000 00000000 00000000
    00050  00000200 00000200 00000200 00000200
    00060  00000000 00000000 00000000 00000000
    00070  000002CF 00000169 00000000 00000000
    00080  00000000 00000000 00000800 00000000
    00090  00000000 00000000 00000000 00000000
    000A0  00000000 00000000 00000000 00000000
    000B0  00000000 00000000 00000000 00000000
    000C0  00000000 00000000 00000000 00000000
    000D0  00000000 00000000 00000000 00000000
    000E0  00000000 00000000 00000000 00000000
    000F0  00000000 00000000 00000000 00000000

    < IPIPEIF >

    # readl 1c71200 0 30
    00000  00000000 00002000 00000000 00000000
    00010  00000000 00000000 00000000 00000000
    00020  00000000 00000010 00000200 00000000
    00030  00000008 00000000 00000FFF 00000000
    00040  00000001 00000000 00000000 00000000
    00050  00000FFF 00000010 00000000 00000000
    00060  00000000 00000000 00000000 00000000
    00070  00000000 00000000 00000000 00000000
    00080  00000000 00000000 00000000 00000000
    00090  00000000 00000000 00000000 00000000
    000A0  00000000 00000000 00000000 00000000
    000B0  00000000 00000000 00000000 00000000

    < Resizer >

    # readl 1c70400 0 100
    00000  00000001 00000000 00000000 00000000
    00010  00000000 000002CF 00000000 000004FF
    00020  00000000 00000000 00000000 00000001
    00030  00000000 00000001 00001FFF 00001FFF
    00040  00000000 000000FF 00000000 000000FF
    00050  00000000 00000000 00000001 00000000
    00060  00000003 00000000 00000000 0000015F
    00070  0000027F 00000000 00000000 0000020B
    00080  00000000 00000000 00000000 00000000
    00090  00000200 00000000 00000000 00000000
    000A0  00000000 00000000 00000000 00000000
    000B0  000083B9 00004000 000083B9 00004000
    000C0  00000280 00000000 00000160 000083BC
    000D0  0000B000 000083BC 0000B000 00000280
    000E0  00000000 000000B0 00000001 00000000
    000F0  00000003 00000000 00000000 0000005F
    00100  000000AF 00000000 00000000 00000780
    00110  00000000 00000000 00000000 00000000
    00120  00000745 00000000 00000000 00000000
    00130  00000000 00000000 00000000 00000000
    00140  000083BE 00006800 000083BE 00006800
    00150  000000C0 00000000 00000060 000083BE
    00160  0000B000 000083BE 0000B000 000000C0
    00170  00000000 00000030 00000000 00000000
    00180  00000000 00000000 00000000 00000000
    00190  00000000 00000000 00000000 00000000
    001A0  00000000 00000000 00000000 00000000
    001B0  00000000 00000000 00000000 00000000
    001C0  00000000 00000000 00000000 00000000
    001D0  00000000 00000000 00000000 00000000
    001E0  00000000 00000000 00000000 00000000
    001F0  00000000 00000000 00000000 00000000
    00200  00000001 00000000 00000000 00000000
    00210  00000000 000002CF 00000000 000004FF
    00220  00000000 00000000 00000000 00000001
    00230  00000000 00000001 00001FFF 00001FFF
    00240  00000000 000000FF 00000000 000000FF
    00250  00000000 00000000 00000001 00000000
    00260  00000003 00000000 00000000 0000015F
    00270  0000027F 00000000 00000000 0000020B
    00280  00000000 00000000 00000000 00000000
    00290  00000200 00000000 00000000 00000000
    002A0  00000000 00000000 00000000 00000000
    002B0  000083B9 00004000 000083B9 00004000
    002C0  00000280 00000000 00000160 000083BC
    002D0  0000B000 000083BC 0000B000 00000280
    002E0  00000000 000000B0 00000001 00000000
    002F0  00000003 00000000 00000000 0000005F
    00300  000000AF 00000000 00000000 00000780
    00310  00000000 00000000 00000000 00000000
    00320  00000745 00000000 00000000 00000000
    00330  00000000 00000000 00000000 00000000
    00340  000083BE 00006800 000083BE 00006800
    00350  000000C0 00000000 00000060 000083BE
    00360  0000B000 000083BE 0000B000 000000C0
    00370  00000000 00000030 00000000 00000000
    00380  00000000 00000000 00000000 00000000
    00390  00000000 00000000 00000000 00000000
    003A0  00000000 00000000 00000000 00000000
    003B0  00000000 00000000 00000000 00000000
    003C0  00000000 00000000 00000000 00000000
    003D0  00000000 00000000 00000000 00000000
    003E0  00000000 00000000 00000000 00000000
    003F0  00000000 00000000 00000000 00000000
    #

     

    This 66MHz PCLK sensor can make 720p 30fps, 1080p 30fps.

    My first goal is 720p encoding and the next goal is 1080p-30 encoding.

     

    Regards,

     

  • I tested your request 2.

    I changed the HD/VD polarity in IPIPEIF.CFG2, also changed HDPOL&VDPOL in ISIF.MODESET.

    Changing of the polarities makes no Imp_Sdram_Irq.

     

    Following is register dump at negative polarities state.

    # readl 1c71000 0 40
    00000  00000001 0000100C 00000000 00000000
    00010  00000000 00000000 00000000 000004FF
    00020  00000001 00000001 000002CF 0000FFFF
    00030  000000FF 00000050 00000000 00000000
    00040  00000000 00000000 00000000 00000000
    00050  00000200 00000200 00000200 00000200
    00060  00000000 00000000 00000000 00000000
    00070  000002CF 00000169 00000000 00000000
    00080  00000000 00000000 00000800 00000000
    00090  00000000 00000000 00000000 00000000
    000A0  00000000 00000000 00000000 00000000
    000B0  00000000 00000000 00000000 00000000
    000C0  00000000 00000000 00000000 00000000
    000D0  00000000 00000000 00000000 00000000
    000E0  00000000 00000000 00000000 00000000
    000F0  00000000 00000000 00000000 00000000
    # readl 1c71200 0 30
    00000  00000000 00002000 00000000 00000000
    00010  00000000 00000000 00000000 00000000
    00020  00000000 00000010 00000200 00000000
    00030  0000000E 00000000 00000FFF 00000000
    00040  00000001 00000000 00000000 00000000
    00050  00000FFF 00000010 00000000 00000000
    00060  00000000 00000000 00000000 00000000
    00070  00000000 00000000 00000000 00000000
    00080  00000000 00000000 00000000 00000000
    00090  00000000 00000000 00000000 00000000
    000A0  00000000 00000000 00000000 00000000
    000B0  00000000 00000000 00000000 00000000
    #

    Regards,

    Hyunho

  • Hi,

    Smaller output like 640x352 works fine means that you are not having enough blanking in your input frame so that resizer can write out the data within the blanking interval. It can happen due to system load.

    1. Try increasing the blanking from your sensor.

    2. Try reducing the pixel clock

    3. What is the ARM and DDR clock on DM36x that you are using?

    Regards,

    Anshuman

    PS: Please mark this post as verified, if you think it has answered your question. Thanks.

  • Hi,

    Thank you.

     

    1. Increasing the sensor's blanking : I will ask this to the sensor maker.

    2. Reducing the pixel clock : my last goal is to 1080p 30fps, so 66MHz PCLK may be at least clock.

    3. DM368 432MHz, DDR340MHz

     

    After your answer, I have another questions.

    1. I understand the "blank", you said, is horizental blank time. is it right?

    2. Is this blank time only necessary at continuous mode ?

    3. How I can check or calcurate the enough blank time? Is there a fomular ?

     

    Regards,

    Hyunho

  • Hi,

    I found following information from VPFE manual.

    Requires at least eight pixels for horizontal blanking and four lines for vertical blanking. In one shot mode, 16 blanking lines after processing area are required.

    I think you mean the blank time is above. Is it right?

    Regards,

    Hyunho

     

     

  • Hyunho Youn said:

    1. I understand the "blank", you said, is horizental blank time. is it right?

    Both horizontal blanking and vertical blanking need to be increased

    Hyunho Youn said:

    2. Is this blank time only necessary at continuous mode ?

     In one-shot mode, the blanking can be controlled using the PPLN and LPFR register of IPIPEIF. This cannot be controlled in continuous mode. So the sensor timing need to be updated to modify the blanking. BTW. the blanking requirement is true for both one-shot as well as continuous mode.

    Hyunho Youn said:

    3. How I can check or calcurate the enough blank time? Is there a fomular ?

    There is no straight forward formula for this. It depends upon the system and DDR load.

    Regards,

    Anshuman

    PS: Please mark this post as verified, if you think it has answered your question. Thanks.

  • Yes.

    Regards,

    Anshuman

    PS: Please mark this post as verified, if you think it has answered your question. Thanks.