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.

Changing the capture resolution in IPNC RDK 3.0

Expert 2220 points
Other Parts Discussed in Thread: SYSBIOS

Hello, I have made a simple capture display usecase that works for 1080p capture to 1080p display in IPNC 3.0 on DM8148. I pass the camera link directly to the display link. Now I am trying to capture with the same chain but change to SXGA (1280 x 1024) capture and display. I have untied the on chip HDMI and DVO2 and just want to output out of HDMI. This also works in my 1080p usecase. I switch to a 1280 x 1024 imager,  I set the capture size in the usecase to 1280 x 1024, changed the resolution paramter the SXGA, and set the display driver resolution to SXGA in the main file. When I run this configuration I see a gray box of 1280 x 1024 dimensions on the display, but no video. The VPSS is hard faulted and not responding. Somewhere between the call to create the link and starting the link the VPSS m3 goes into a bad state. The documentation claims that these resolutions are supported, so there must be a configuration that I am missing. Are there any usecases that display at a non 1080p resolution? What am I missing? Please let me know if there is any additional information that I can provide.

Many thanks,

-Ben

EDIT: As you can read lower down, this turns out not to be a display issue, but a capture issue.

  • After further investigation it would appear that the issue is not in the display portion of chain, it is in the capture. I was able to successfully capture 1280 x 1024 raw bayer data and send it to the ARM and then save it to file. However, if I capture 1280 x 1024 data and convert it to YUV in the IPIPE and then send it to the ARM to save to file, it fails. It would seem that somewhere in the CFA/RGB2YUV/GBCE area there is something that does not like this resolution. Another thing that I discovered is that it has no trouble capturing resolution OVER 1080p and running bayer conversion. Capturing 2000 x 1100 and 1924 x 1084 both work fine, but 1924 x 500, 2000 x 500, and 2000 x 1076 all fail. Any idea why this problem would apply to seemingly all capture resolutions smaller than 1920 x 1080 but not larger?

  • After looking at this longer it would appear that the issue may have to do with the resizer. When the M3 crashes the JTAG prints out:

    [Cortex_M3_ISS] ti.sysbios.family.arm.m3.Hwi: line 850: E_hardFault: FORCED
    [Cortex_M3_ISS] ti.sysbios.family.arm.m3.Hwi: line 927: E_busFault: PRECISERR
    [Cortex_M3_ISS] Exception occurred in background thread.
    [Cortex_M3_ISS] Exception occurred in ThreadType_Task.
    [Cortex_M3_ISS] Task handle: 0x8e214a80.
    [Cortex_M3_ISS] Task stack base: 0x8f1bc960.
    [Cortex_M3_ISS] Task stack size: 0x4000.
    [Cortex_M3_ISS] R0 = 0x00000069 R8 = 0x00000019
    [Cortex_M3_ISS] R1 = 0x00000090 R9 = 0x00000007
    [Cortex_M3_ISS] R2 = 0x00000009 R10 = 0x00000068
    [Cortex_M3_ISS] R3 = 0x8f33daa8 R11 = 0x00000090
    [Cortex_M3_ISS] R4 = 0x00000090 R12 = 0x8f11733c
    [Cortex_M3_ISS] R5 = 0x00000001 SP(R13) = 0x8f1c07f8
    [Cortex_M3_ISS] R6 = 0x00000008 LR(R14) = 0x8df3e7ef
    [Cortex_M3_ISS] R7 = 0x00017e60 PC(R15) = 0x8dec6256
    [Cortex_M3_ISS] PSR = 0x21000000
    [Cortex_M3_ISS] ICSR = 0x0440f803
    [Cortex_M3_ISS] MMFSR = 0x00
    [Cortex_M3_ISS] BFSR = 0x82
    [Cortex_M3_ISS] UFSR = 0x0000
    [Cortex_M3_ISS] HFSR = 0x40000000
    [Cortex_M3_ISS] DFSR = 0x00000000
    [Cortex_M3_ISS] MMAR = 0x00017e64
    [Cortex_M3_ISS] BFAR = 0x00017e64
    [Cortex_M3_ISS] AFSR = 0x00000000
    [Cortex_M3_ISS] Terminating execution...

    The BFAR is usually pretty consistent, but sometimes it also is set to 0xD1042800. I am not aware of anything that should be in those memory address ranges, so I am assuming a pointer is getting corrupted somehow.

    I checked the task handle (0x8e214a80) and it matches the handle for iss_interrupt_hwi_0. I can't figure out what that interrupt is supposed to be doing. Any ideas?

    Also if there is anyone out there who has gotten any capture < 1080p working I would love to know if I am missing something obvious, or if there were a lot of changes to be made.

    Thanks,

    Ben

  • I'm am still trying to figure out why the IPIPE breaks on 1280 x 1024 imagery. I decided to test a variety of resolutions to see if there were some that worked. Here is what I found:

    Width
    320 356 640 960 1024 1280 1440 1920 2000
    Height 240 Y Y Y Y N N N N N
    480 Y Y Y Y N N N N N
    720 Y Y Y Y N N N N N
    1024 Y Y Y Y N N N N N
    1080 Y Y Y Y Y Y Y Y Y

    Y= works correctly and dumps images to file    N=Does not work and hardfaults

    Interestingly enough, there seems to be some special case that happens when the height is 1080 that makes everything work. I have been pouring through driver code for  a while now and have not been able to find any cases that would produce this. Any ideas would be much appreciated.

  • After even more investigation it would appear that the heap is getting overwritten. We delay the start of the imager until after all the links have been set up. Once we start the imager, everything crashes. After stepping through a lot of code I noticed before things start to go bad, variables start zeroing out and get set to erroneous values. These values are stored on the heap, something (possibly a VPDMA) blowing the heap away at certain capture resolutions.

  • Hi BenM,

    i'm using Davinci TMDSIPNCAM8127j3. I'm struggling to capture image from IPNC camera please share your application code.i can see the HDMI outputbut dn't know how to capture image from it.

    Thanks in Advance