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.

TDA4VH-Q1: Vision Apps > App Single Cam IMX390

Part Number: TDA4VH-Q1

Tool/software:

Hello Colleagues,

We were able to write gmsl ser/des drivers and it seems it is working on a camera that has its own isp without any problem.

However, when we try to use the camera LI-IMX390, and built in isp settings for imx390, we see color flickering on the image (Please see the attached video). We were wondering about the possible reasons for that behavior? 

Could it be because of the camera registers or due to isp tuning? 

Remark: We knew that the driver imx390 written for D3 cameras. However, we thought that the sensor itself is same that is why we were not expecting to see any problem while using the built in registers and isp bins.

Thanks in advance,

Berke

  • Hi Berke,

    We have not seen similar issues previously.
    Could you please share some raw/yuv images showing the problem?

    However, we thought that the sensor itself is same that is why we were not expecting to see any problem while using the built in registers and isp bins.

    TDA4 needs to control sensor exposure through i2c.
    Do you see that is working properly with gmsl serdes?

  • Hi Gang,

    I don't know why but I cannot upload captured images to this message. Is there any other way to do it? 

    Actually yes, we activated the auto exposure and depending on the lightning condition of the environment we observed that there are some settings changing through i2c bus on the command window.

    In addition to all of this, I would like to share one more information. We get this error "[MCU2_0] 95.198346 s: VX_ZONE_ERROR:[tivxCaptureDequeueFrameFromDriver:885] CAPTURE: ERROR: Incomplete Frame for Ch0 !!!" continuously, could it be related to our issue somehow or what could be the reason for that?

    Thanks,

    Berke

  • I don't know why but I cannot upload captured images to this message. Is there any other way to do it? 

    Hi Berke,

    You may zip your files first and then upload the zip file.

  • We get this error "[MCU2_0] 95.198346 s: VX_ZONE_ERROR:[tivxCaptureDequeueFrameFromDriver:885] CAPTURE: ERROR: Incomplete Frame for Ch0 !!!" continuously, could it be related to our issue somehow or what could be the reason for that?

    Yes, this might suggest that some issue is present in transferring sensor raw images via serdes to TDA4.

    In the video, there seems some broken raw image frames, e.g., green on the top and red at the bottom.

  • Thank you for the first diagnosis, Is there a way to find exactly which setting is problematic or what would you suggest at this point?

  • Hi Berke,

    8637.yuv.zip

    Thanks for sharing!

    The raw image is broken and the bottom ~100 rows of pixels are garbage.
    There should be some issue in transferring sensor raw image from IMX390 to TDA4.

    What is the actual color of these letters?
    I am not sure if the raw image is in the right color pattern (IMX390 by default is RGGB).

  • Is there a way to find exactly which setting is problematic or what would you suggest at this point?

    I am not familiar with serdes and CSI details.
    You may need to check if there is any error flags in serdes first.

  • Hi Gang,

    Thank you for this information. The actual color of the letters is red. You are right, I will check the relevant parts in the code.

    Berke

  • Hi Berke,

    The actual color of the letters is red.

    Thanks for the confirmation!

    Your captured raw image is GBRG pattern rather than RGGB which is common for Sony sensors.
    But, VPAC-VISS assumes it is RGGB.
    That is why you have wrong color in the YUV image.

  • Hi Gang,

    Sorry for my late reply, it was due to bank holiday last week. 

    We tried to understand the problem here and came with a few questions. 

    1. First of all, thank you for your feedback yes according to the data sheet, recommended pixels to be used is in the format of GBRG even though the effective pixels start with RGGB, it seems there is a 1 pixel shift. We found a register in IMX390 to shift the pixels would that help to correct color format in YUV image?
    2. Regarding the garbage pixel you are right there is a problem with serdes or CSI, should we create a new problem report for that? Because it seems like we correctly set ser/des and CSI as we already used this ser/des with another Image sensor which as built in ISP without any problem. Do you know which settings should be configured through serialized for Imaging sensor? Like INCK clock?
    3. We found another thread in the forum about this Error message "[MCU2_0] 95.198346 s: VX_ZONE_ERROR:[tivxCaptureDequeueFrameFromDriver:885] CAPTURE: ERROR: Incomplete Frame for Ch0 !!!". Acording to this thread this message pops up if the size of recieved image and defined settings are not compatible. Even though we used correct pixel sizes, we still get this error. Could it be because of the same problem explained in the previous item? 
    4. Apart from that, we didn't observe any other error or warning messages in the log while running the vision apps single cam app. Is there any other way to debug this issue?

    Thanks a lot.

    Kind Regards,

    Berke

  • Hi Berke,

    First of all, thank you for your feedback yes according to the data sheet, recommended pixels to be used is in the format of GBRG even though the effective pixels start with RGGB, it seems there is a 1 pixel shift. We found a register in IMX390 to shift the pixels would that help to correct color format in YUV image?

    You may either change the color format of the sensor output to RGGB or change the VISS settings to GRBG.
    Both should be fine.

    Regarding the garbage pixel you are right there is a problem with serdes or CSI, should we create a new problem report for that? Because it seems like we correctly set ser/des and CSI as we already used this ser/des with another Image sensor which as built in ISP without any problem. Do you know which settings should be configured through serialized for Imaging sensor? Like INCK clock?

    I am not familiar with SerDes details.
    The raw camera output in 12-bit raw image format and the other should be in some YUV format.
    I am not sure if SerDes settings need to be done differently or not.

    You may refer to existing IMX390 drivers in SDK to see if you can find anything.

  • On Q3 and Q4, I am copying my friend for his comments

  • Berke,

    This error "Incomplete Frame for Ch0" typically comes because the size of the received frame does not match with the configured size. So can you please make sure that they are matching? 

    Regards,

    Brijesh 

  • Hello Gang and Brijesh,

    Many thanks for your valuable comments.

    We found the root causes of the below problems and solved by updating the imx390 driver.

    • Incomplete Frame Error
    • Broken Pixels
    • Colour Flickering 
    • Starting pixel order GBRG to RGGB

    It seems there is no problem with the ser/des config and imx390 register set. 

    However, we see the raw image a bit greenish! Even though each color seems to be correct.

    Could you please support us on that? Could it be because of the green gain or Auto white balance?

    Please see attached captures.

    img_.zip

  • Hi Berke,

    Please see attached captures.

    The raw image looks Ok to me.

    Could it be because of the green gain or Auto white balance?

    AWB has to be calibrated for your camera.

    https://www.ti.com/lit/pdf/sprad86

    https://www.ti.com/lit/pdf/spracu7

  • Hello  Gang,

    Thanks a lot for your support. 

    I went through the shared links now it is a bit more clear. 

    Allow me to ask one thing to understand correctly. You have said that the raw image looks okay, so greenish like visual is okay for a raw image of RGGB sensor? Since we also see the same thing in the display screen while running the app, I am assuming the raw image is displayed on the monitor not viss.yuv, is that correct understanding? Further steps is actually relevant to isp tuning itself.

    Also, since the initial problems are resolved, I will close this thread. Thanks again. Slight smile

    Berke

  • so greenish like visual is okay for a raw image of RGGB sensor?

    Yes, that is a property of the sensor.

    Since we also see the same thing in the display screen while running the app,

    This is a problem about Auto White Balance (AWB).
    AWB has to be calibrated for a camera and work properly at run-time so that displayed YUV is white balanced.

    You may refer to this app note for more details and illustrations.
    www.ti.com/.../sprad86