cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

NoLe_4131831
New Contributor II

If CX3 CyU3PMipicsiGetErrors have error count, it mans sensor's mipi signal is not match with it setting in CX3 MIPI Receiver Configuration, right?

this is my partial code, and I wake up my sensor by another way, so here I don't setting i2c sensor.

After I wake up my sensor, I set CyU3PMipicsiSetIntfParams.

Later, I get this error, and  there's no data capture by CX3

/* error message */

CyU3PMipicsiGetErrors

crcErrCnt: 0 ctlErrCnt: 1 eidErrCnt: 255 frmErrCnt: 1 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 0 unrSyncErrCnt: 0 unrcErrCnt: 0

Start!

pastedImage_0.png

0 Likes
Reply
1 Solution
NoLe_4131831
New Contributor II

Hi,

My issue have been solved,

cause my packet id not match between tx and rx, my tx set user define 8 bit data, but not RAW8, so CX3 can't analyze it.

More over, I want to know what is "PHY Time Delay value" ?

View solution in original post

0 Likes
Reply
22 Replies
JayakrishnaT_76
Moderator
Moderator

Hello,

The function CyU3PMipicsiGetErrors is used to get a count of CSI protocol and physical layer errors from the MIPI-CSI block.

The function CyU3PMipicsiSetIntfParams is used for configuring the MIPI CSI block of CX3 over I2C. After the configuration, the interface clock can be switched on immediately or later. This is done by passing the second argument to the function. If it is CyTrue, then the interface clock is switched ON immediately after the configuration is done. Else, the interface clock has to be turned ON by calling CyU3PMipicsiWakeup().

I find that you have commented out the camera configuration settings. Please uncomment it and check whether it is streaming properly or not.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
Reply
NoLe_4131831
New Contributor II

Hi, I understand function CyU3PMipicsiSetIntfParams how to use, and my camera setting is configure by another way and I did it before function CyU3PMipicsiSetIntfParams, so there's mipi signal to cx3.

And I want to know whether function CyU3PMipicsiGetErrors can know "Input MIPI CSI protocol and physical layer errors" ?

0 Likes
Reply
JayakrishnaT_76
Moderator
Moderator

Hello,

The MIPI CSI protocol and physical layer errors can occur if the sensor configuration and MIPI receiver configuration do not match. Please check whether the configuration settings for sensor match with the MIPI receiver configuration. Also, can you please let me know whether you are using a custom board or not?

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
Reply
NoLe_4131831
New Contributor II

No, my CX3 circuit board is design by my company, and CX3 MIPI Receiver setting is base on our sensor setting, but it still get error.

So, whether I should confirm our sensor's MIPI CSI protocol and physical layer is right or not?

0 Likes
Reply
JayakrishnaT_76
Moderator
Moderator

Hello,

As you are using a custom board please ensure that the MIPI data and clock lanes of the sensor are routed correctly to the MIPI receiver.

Can you please share a snapshot of  Image Sensor Configuration and CX3 Receiver Configuration tabs of the MIPI configuration utility?

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
Reply
NoLe_4131831
New Contributor II

Hi,

This is my Sensor Configuration and CX3 Receiver Configuration of the MIPI configuration, do you think this setting is okay?

pastedImage_0.png

And error message is like below, I get it one times about 5 second.

/*

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 0 eidErrCnt: 255 frmErrCnt: 1 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 0 unrSyncErrCnt: 0 unrcErrCnt: 0

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 255 eidErrCnt: 255 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 0 unrSyncErrCnt: 255 unrcErrCnt: 255

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 0 eidErrCnt: 255 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 0 unrSyncErrCnt: 0 unrcErrCnt: 0

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 0 eidErrCnt: 255 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 0 unrSyncErrCnt: 0 unrcErrCnt: 0

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 255 eidErrCnt: 0 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 255 recrErrCnt: 255 unrSyncErrCnt: 0 unrcErrCnt: 0

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 0 eidErrCnt: 255 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 15 recrErrCnt: 255 unrSyncErrCnt: 15 unrcErrCnt: 0

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 255 eidErrCnt: 0 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 0 unrSyncErrCnt: 15 unrcErrCnt: 0

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 0 eidErrCnt: 255 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 15 unrSyncErrCnt: 0 unrcErrCnt: 0

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 0 eidErrCnt: 255 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 0 unrSyncErrCnt: 0 unrcErrCnt: 0

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 0 eidErrCnt: 255 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 0 unrSyncErrCnt: 0 unrcErrCnt: 0

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 15 eidErrCnt: 0 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 255 recrErrCnt: 255 unrSyncErrCnt: 0 unrcErrCnt: 0

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 0 eidErrCnt: 255 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 0 unrSyncErrCnt: 0 unrcErrCnt: 0

*/

Can you give me some idea?

Thanks, Leo.

0 Likes
Reply
JayakrishnaT_76
Moderator
Moderator

Hello,

The configuration seem to be fine.

Please find my comments below:

1.It seems that you have used the debug prints in a callback function. It is not recommended to do do. Please shift the debugprints to the infinite for loop and then check whether you are getting the same errors.

2.Please confirm whether your sensors MIPI CSI protocol and physical layer are right or not as you mentioned above.

3.Is this application UVC compliant? If it is UVC compliant, what is the image format reported to host?

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
Reply
NoLe_4131831
New Contributor II

Hi,


1. I have already remove the debugprints in callback function but the error still occur.

2. I will confirm my sensor's MIPI CSI protocol and physical layer, and I just want to confirm it that is this error only because the MIPI TX? or there's other reason?

If the error reason is only cause MIPI TX, I can just focus to tune my sensor. But if not, I want to know what other reason, so that I can solve it case by case.

3. my sensor input format is RAW8, and output is 16-bits UYVY format, it is CX3 MIPI Receiver configuration Tool setting and I doesn't change it.

0 Likes
Reply
JayakrishnaT_76
Moderator
Moderator

Hello,

Please find my comments for your questions below:

>>If the error reason is only cause MIPI TX, I can just focus to tune my sensor. But if not, I want to know what other reason, so that I can solve it case by case.

We have seen MIPI error counts due to 2 reasons. One is when the sensor configuration settings do not match with the MIPI receiver configuration settings. Another case is when the MIPI lanes from the sensor (P and N) are not routed correctly to the corresponding lanes of the MIPI receiver block of CX3.

As you have got almost all of the errors, there might be some issue with firmware also.Can you please share the entire project so that I can understand it more clearly.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
Reply
JayakrishnaT_76
Moderator
Moderator

Hello,

Please comment out the prints for MIPI errors and share the debug prints i.e please let me know what other prints you are getting other than MIPI errors.

Best regards,

Jayakrishna 

Best Regards,
Jayakrishna
0 Likes
Reply
NoLe_4131831
New Contributor II

Hi,

there's some print for my info like below in CyCx3UvcAppInit() function,

     CX3 FW Ver: 2019/12/11_2-11

     mipi tp_1_400M

     clock_generator

     clock_generator: Status = 1

and in CyCx3UvcAppImageSensorSetVideoResolution() function,

     Start 1

0 Likes
Reply
JayakrishnaT_76
Moderator
Moderator

Hello,

Please share the USB trace using wireshark. Also, please probe FV, LV and PCLK and share the snapshot.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
Reply
NoLe_4131831
New Contributor II

Hi,

I use other tool to receive our sensor's MIPI data, and it can work.

But CX3 still cannot receive, and assume CX3 setting is fine as you said,

the error may be cause by hardware error of the mipi lane to CX3, is it possible in your experience?

BTW, the circuit is not use Public version, it is design and layout by our hardware teem.

0 Likes
Reply
JayakrishnaT_76
Moderator
Moderator

Hello,

Yes the MIPI errors can occur if there are hardware errors also. Please check whether you have followed all the guidelines mentioned in section 6.2 of the document whose link is given below:

https://www.cypress.com/file/126136/download

In addition to this, all the guidelines mentioned in AN70707 should be followed. The link to AN70707 is given below:

https://www.cypress.com/file/139936/download

Also, please share the USB trace using wireshark and probe FV, LV and PCLK and share a snapshot.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
Reply
NoLe_4131831
New Contributor II

Hi,

Update my CX3 setting and FV, LV and PCLK, and debug message.

And there's no any data from USB catch by BusHound.

pastedImage_3.png

HSYC is no any toggle!!!

And debug message like below and get error every 5 second

/*

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 2 eidErrCnt: 255 frmErrCnt: 1 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 0 unrSyncErrCnt: 0 unrcErrCnt: 0

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 0 eidErrCnt: 255 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 0 unrSyncErrCnt: 0 unrcErrCnt: 0

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 0 eidErrCnt: 255 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 0 unrSyncErrCnt: 0 unrcErrCnt: 0

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 0 eidErrCnt: 255 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 0 unrSyncErrCnt: 0 unrcErrCnt: 0

CyU3PMipicsiGetErrors:

crcErrCnt: 0 ctlErrCnt: 0 eidErrCnt: 255 frmErrCnt: 0 mdlErrCnt: 0

recSyncErrCnt: 0 recrErrCnt: 0 unrSyncErrCnt: 0 unrcErrCnt: 0

*/

0 Likes
Reply
JayakrishnaT_76
Moderator
Moderator

Hello,

Hsync is not toggling because the image sensor is not sending out data. As the sensor is not sending any data to CX3, the chip also do not have anything to send to the host. This is why there is no data from the USB catch. Please check whether the sensor configuration settings are right or not.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
Reply
NoLe_4131831
New Contributor II

Hi,

In the same setting, we use other MIPI RX device can receive data, but CX3 can't.

And if sensor have sending data, CX3 should catch data no matter data is right or not?

In your experience, is there anything should be confirm? hardrware or firmware.

0 Likes
Reply
JayakrishnaT_76
Moderator
Moderator

Hello,

Please try setting the PHY time delay in firmware. You can use this code given below for this.

CyU3PMipicsiSetPhyTimeDelay(1,0x09 );

The second parameter 0x09 is the PHY time delay that is obtained from your configuration utility. Please call this API immediately after CyU3PMipicsiSetIntfParams is called.

Apart from this, you can also try changing multiplier of unit clock and FIFO delay in the configuration utility.

Also, please check whether the active and blanking time of vsync matches with that given in the configuration utility.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
Reply
NoLe_4131831
New Contributor II

Hi,

My issue have been solved,

cause my packet id not match between tx and rx, my tx set user define 8 bit data, but not RAW8, so CX3 can't analyze it.

More over, I want to know what is "PHY Time Delay value" ?

View solution in original post

0 Likes
Reply
JayakrishnaT_76
Moderator
Moderator

Hello,

PHY Time Delay Value is used to set MIPI THS-Settle timer settings.

THS-Settle = THS-PREPARE+(THS-ZERO)/2

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
Reply
NoLe_4131831
New Contributor II

Hi,

Yes, I know how to calculate PHY Time Delay Value and I what THS-Settle it is.

But I don't know if I know my THS-Settle, than what PHY Time Delay Value should I set?

The PHY Time Delay Value formula = (THS-Settle + 1) * (LP-HS_CLK), what relation between THS-Settle & LP-HS_CLK?

Thanks

0 Likes
Reply
JayakrishnaT_76
Moderator
Moderator

Hello,

The PHY time delay value that is to be set can be obtained from the MIPI configuration tool itself. This is calculated based on the THS-PREPARE and THS-ZERO of the image sensor by the tool. You can set the same value. The screenshot of the configuration utility with the phy time delay value highlighted is shown below:

pastedImage_0.png

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
Reply