cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

mapper
New Contributor II

Hello,

 

I'm using a Denebola board to receive data from an image sensor. I have developed a passive adapter board that simply routes the MIPI lanes and I2C from the Denebola daughter board connector to the image sensor connector. 

 

The image dimensions are 4056x3040=12330240 B at 10 fps. RAW8. And the MIPI configuration is:

CY_U3P_CSI_DF_YUV422_8_2, /* CyU3PMipicsiDataFormat_t dataFormat */
2, /* uint8_t numDataLanes */
2, /* uint8_t pllPrd */
119, /* uint16_t pllFbd */
CY_U3P_CSI_PLL_FRS_250_500M, /* CyU3PMipicsiPllClkFrs_t pllFrs */
CY_U3P_CSI_PLL_CLK_DIV_4, /* CyU3PMipicsiPllClkDiv_t csiRxClkDiv */
CY_U3P_CSI_PLL_CLK_DIV_4, /* CyU3PMipicsiPllClkDiv_t parClkDiv */
0, /* uint16_t mClkCtl */
CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t mClkRefDiv */
4056, /* uint16_t hResolution */
0 /* uint16_t fifoDelay */

 

I have 3 setups (denebola board + adapter board + image sensor):

 - 1st: Works well, the frame size received is 12330240 B, 0 MIPI errors, and the host application receives the image correctly.

 - 2nd: Frame size shown is wrong (sometimes 30000000 or 8000000), many recrErrCnt, and the host application receives a frame with the wrong size.

- 3rd: Frame size shown is wrong (sometimes 30000000 or 8000000), manyctlErrCnt, and the host application receives a frame with the wrong size.

 

We are checking the hardware of 2nd and 3rd setups. However, so far we can't find any issue with them. 

 

The firmware applied on all setups is the same. Is there any custom configuration that should be done to different CX3s? This would explain the different behavior from CX3 to the other.

 

I appreciate any insight you can provide. 

 

Best regards,

 
0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator

Hello,

Please refer to this KBA for details on the MIPI error  MIPI-CSI Protocol and Physical Layer Errors in CX3... - Cypress Developer Community  

Please let me know if the MIPI Transmitter (sensor) used in all the three setups are same. If yes, are these sensors configured with same settings as for the working case. If the sensors are not same, can you please confirm if the sensor is compliant to MIPI CSI-2  (Version 1.01, Revision 0.04 – 2nd April 2009)

Also, as per the KBA the error seems to be due to error on MIPI lines. Please check if MIPI lines are routed properly in the adapter.

Regards,
Rashi

View solution in original post

0 Likes
7 Replies
Rashi_Vatsa
Moderator
Moderator

Hello,

Please refer to this KBA for details on the MIPI error  MIPI-CSI Protocol and Physical Layer Errors in CX3... - Cypress Developer Community  

Please let me know if the MIPI Transmitter (sensor) used in all the three setups are same. If yes, are these sensors configured with same settings as for the working case. If the sensors are not same, can you please confirm if the sensor is compliant to MIPI CSI-2  (Version 1.01, Revision 0.04 – 2nd April 2009)

Also, as per the KBA the error seems to be due to error on MIPI lines. Please check if MIPI lines are routed properly in the adapter.

Regards,
Rashi

View solution in original post

0 Likes
mapper
New Contributor II

Hello, Rashi

 

The sensors are all the same model/partnumber, and they are compatible with the MIPI CSI-2  (Version 1.01, Revision 0.04 – 2nd April 2009).

 

I did another test that makes my problem clearer: I used the same adapter, same sensor, and same firmware in all 3 Denebolas:

 

Denebola 1 : Stream works correctly, frame size with right size.
Denebola 2: Stream doesn't work, frame size about twice the right one, but it oscillates.
Denebola 3: Stram doesn't work, frame size about half the right one, but it oscillates as well. 

 

Then I tried the OV daughter board from e-con systems, and another firmware to get images from the OV:

Denebola 1 - Stream works, correct frame size.
Denebola 2 - Stream works, correct frame size.
Denebola 3 - Stream works, correct frame size.

 

I wonder if there are hardware registers in the CX3/configuration that must be done to each individual CX3.

 

Is there some document that elaborates further on the MIPI errors? That could help.

 

Best regards,
Renato.

 

0 Likes
Rashi_Vatsa
Moderator
Moderator

Hello Renato,

Please share the CX3 configuration tool settings for your application.

From the description, I understand that the same firmware / sensor settings behaves differently with different Denebola kit but all the three Denebola kit works with OV daughter card/OV sensor

Denebola 2: Stream doesn't work, frame size about twice the right one, but it oscillates.
Denebola 3: Stram doesn't work, frame size about half the right one, but it oscillates as well.

>> Are MIPI errors seen in these two situation?

Please refer to this KBA for details on the MIPI error  MIPI-CSI Protocol and Physical Layer Errors in CX3... - Cypress Developer Community  

Regards,
Rashi
0 Likes
mapper
New Contributor II

Hello Rashi,

 

>> From the description, I understand that the same firmware / sensor settings behaves differently with different Denebola kit but all the three Denebola kit works with OV daughter card/OV sensor

Exactly. I did another test to validate that: In the same firmware, I have sensor configuration for the OV and the IMX (only the register in the cyu3imagesensor.c file, all the rest is exactly the same). So then I have this scenario:

Denebola 1: Stream works for IMX477 and OV.
Denebola 2: Stream works for OV only.
Denebola 3: Stream works for OV only.

The log for IMX477 not working scenario looks like this:
Prod = 0 Cons = 0 Prtl_Sz = 28 Frm_Cnt = 15 Frm_Sz = 28 B
Video timer
AplnStop:SMState = 0x9
AplnStrt:SMState = 0x1
Prod = 0 Cons = 0 Prtl_Sz = 364 Frm_Cnt = 16 Frm_Sz = 364 B
Video timer
AplnStop:SMState = 0x9
AplnStrt:SMState = 0x1
Prod = 0 Cons = 0 Prtl_Sz = 16 Frm_Cnt = 17 Frm_Sz = 16 B
Video timer
AplnStop:SMState = 0x9
AplnStrt:SMState = 0x1
Prod = 0 Cons = 0 Prtl_Sz = 8 Frm_Cnt = 18 Frm_Sz = 8 B
Video timer
AplnStop:SMState = 0x9
AplnStrt:SMState = 0x1
Prod = 0 Cons = 0 Prtl_Sz = 4 Frm_Cnt = 19 Frm_Sz = 4 B
Video timer
AplnStop:SMState = 0x9
AplnStrt:SMState = 0x1
Prod = 0 Cons = 0 Prtl_Sz = 364 Frm_Cnt = 20 Frm_Sz = 364 B

The frame size should be: 12330240

 

I tested decreasing the frame rate so the bitrate is below the OV case, didn't solve it, so it doesn't seem to be related to the speed (both are below the 1Gbps per lane and 1.6Ghz on the GPIF output bus).

 

I have attached the project without the sensor files. This is the configuration applied to both OV and IIMX477 in the same firmware:

mapper_0-1631889550367.png

mapper_1-1631889568178.png

 

I appreciate your support

 

best regards,

Renato

0 Likes
Rashi_Vatsa
Moderator
Moderator

Hello Renato,

From the UART debug prints, it seems that the sensor data is not received by CX3.

Please print the MIPI errors along with the other UART prints for us to check. Also, try to increase the TIMER_PERIOD to around 1 second and let me know if there are any improvements.

Regards,
Rashi
0 Likes
mapper
New Contributor II

Hi Rashi,

 

I put this issue aside for a while, and came to it now, but still doesn't work. I set TIMER_PERIOD to 1 second, this is irregular frame sizes I am receiving:

Prod = 0 Cons = 0 Prtl_Sz = 11640 Frm_Cnt = 1741 Frm_Sz = 11640 B
Prod = 0 Cons = 0 Prtl_Sz = 4056 Frm_Cnt = 1752 Frm_Sz = 4056 B
Prod = 0 Cons = 0 Prtl_Sz = 15696 Frm_Cnt = 1762 Frm_Sz = 15696 B
Prod = 0 Cons = 0 Prtl_Sz = 3528 Frm_Cnt = 1772 Frm_Sz = 3528 B
Prod = 0 Cons = 0 Prtl_Sz = 16224 Frm_Cnt = 1783 Frm_Sz = 16224 B
Prod = 0 Cons = 0 Prtl_Sz = 16224 Frm_Cnt = 1792 Frm_Sz = 16224 B

 

and MIPI errors:

|crcErrCnt |ctlErrCnt |eidErrCnt |frmErrCnt |mdlErrCnt |recSyncErrCnt |recrErrCnt |unrSyncErrCnt |unrcErrCnt
|0 |0 |0 |255 |4 |255 |255 |0 |39
Prod = 1 Cons = 0
|crcErrCnt |ctlErrCnt |eidErrCnt |frmErrCnt |mdlErrCnt |recSyncErrCnt |recrErrCnt |unrSyncErrCnt |unrcErrCnt
|0 |0 |0 |255 |2 |255 |255 |0 |49
Prod = 1 Cons = 0
|crcErrCnt |ctlErrCnt |eidErrCnt |frmErrCnt |mdlErrCnt |recSyncErrCnt |recrErrCnt |unrSyncErrCnt |unrcErrCnt

 

Is there some configuration in the sensor, that the normal doesn't change but could differ from one CX3 to another?

 

Kind regards,

Renato

0 Likes
Rashi_Vatsa
Moderator
Moderator

Hello,

From the Uart debug prints, it is clear that the MIPI errors are seen with Denebola kit and IMX sensor. As the issue is not seen with OV sensor, the problem seems to be on the MIPI interface (ad the firmware used is common for all the kits). Please share the snippets of the board where IMX sensor is connected to Denebola kit.

Regards,
Rashi
0 Likes