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.

TDA4VM: CSIRX registers

Part Number: TDA4VM

Dear experts,

I want to read some registers to check the working status of CSIRX and to judge whether CSIRX receive the correct imaging data.

I have some questions about the CSIRX registers:

1. I found that some register can realize the function of reset, CSI_RX_RX_IF_VBUS2APB_SOFT_RESET(0x04504004 bit 0 and bit 1) and CSIRX_IF_VBUS2APB_STREAM0_CTRL(0x04504100 bit 4);

    I want to know under what conditions it can be used.

2. when enable the bit 15 of CSI_RX_IF_VBUS2APB_STREAM0_MONITOR_CTRL(0x04504110), we can read the line length of every frame form bit 16~31 of CSI_RX_IF_VBUD2APB_STREAM0_MONITOR_FRAME(0x04504114).

    how can we get the line count of every frame? Is there a corresponding register?

    if the line count of frame is not right, the status in CsirxDrv_udmaCQEventCb() of Csirx_drvUdma.c will not be FVID2_FRAME_STATUS_COMPLETED.

    so I think there must be a place to judge whether the line count is right.

3. How do we judge whether the dphy status is right based on the value of CSI_RX_IF_VBUS2APB_DPHY_STATUS(0x04504048)?

  • Hi Subin Li,

    I am sorry, not getting it. 

    Do you mean check why you are getting the frames, in case you are getting them? 

    Regards,

    Brijesh

  • Hi, Brijesh

    I have 4 question.

    1. how to use the registers of CSI_RX_RX_IF_VBUS2APB_SOFT_RESET(0x04504004 bit 0 and bit 1) and CSIRX_IF_VBUS2APB_STREAM0_CTRL(0x04504100 bit 4) to realize the reset function?

    2. we can read the line length of every frame form bit 16~31 of CSI_RX_IF_VBUD2APB_STREAM0_MONITOR_FRAME(0x04504114), but how can we read the line count of every frame?

    3. what's the mean of  CSI_RX_IF_VBUS2APB_DPHY_STATUS(0x04504048)? How do we judge the dphy status based on the value of the CSI_RX_IF_VBUS2APB_DPHY_STATUS(0x04504048)?

    4. how can we get the datatype and vc-id of every frame?

    thank you!

  • Hi,

    What is the use case for the above? The advice from our expert is to use driver interfaces.

    Best Regards,
    Keerthy

  • Hi, Keerthy

    These are the functions we need to use for debugging.

    Are there interfaces that meet our requirements above(4 questions)?

  • Hi Subin Li,

    I will answer few questions and get back to you for the rest.

    #1, i will check and get back to you on reset functions

    #2 ,we need to read it on every frame. There is no other method. Why do you require to read line length on every frame? You could use DMA to get this. If the received frame size is not same as the configured frame size, DMA returns error. You could use this feature to determine if there is erroneous frame.  

    #3, DPHY_STATUS register indicate the few lane transition status. It indicates if lane has received stop state, ULP state and escape sequence.. Please refer to TRM for more details.

    #4, data type and virtual channel are input to the CSIRX, we cannot read it back. It matches received data with the configured value and captures only if it matches..

    Regards,

    Brijesh 

  • Hi, Brijesh 

    thank you for your reply, and there are some other questions.

    #1, looking forward to your reply

    #2, now we want to get the line count of every frame, do you have relevant registers to get the value?

         for example, the frame size we want to get is 1920*1080, the line length we read from 0x04504114 is 1920. If the image data given by the sensor is incomplete, the callback function of udma will output errors. But we cannot know its exact value, which should be 1080.

         if we can get the exact line count, it will do good for us to debug problems.

    #4, Where is this match operation performed? We want to get the data type and virtual channel of raw data before they are discarded if they are not match with we set.  if we can get the data type and virtual channel of raw data, it will do good for us to debug problems.

    thank you!

  • Hi Subin Li,

    #2, if we know that the received frame is shorted or longer than configured size, would that be enough? any specific reason to know exact size? 

    #3, this is done in the HW. I really doubt that we can get raw data without matching. I will confirm the same and get back.

    Regards,

    Brijesh

  • Hi, Brijesh

    #2, if the configured size is 1920*1080, but the received size if 1920*1079, we can therefore suspect that the sensor register configuration error caused the output data to be incorrect

  • Hi Subin li,

    But in this case, does it help you come to know frame is shorter, instead of exact size?

    Regards,

    Brijesh 

  • Hi, Brijesh 

    If we can get the exact size, it will do a great help.

  • Hi Subin Li,

    For how many input camera do you require this information?

    Regards,

    Brijesh

  • two input cameras

  • Hi Subin Li,

    We can currently only get if the frame is short or long. We cannot currently get exact size of the captured frame.

    Regards,

    Brijesh