For a CX3 camera design, you could follow the procedure below to locate the root cause.
- You need to check whether all the power domains for CX3 and sensor are fine. Also you need to check all the clock sources.
- Please check if the sensor has a correct power on/reset procedure when the board is power on.
- After the firmware running, CX3 will start to write configuration bytes via I2C bus. You need to check if all the registers are written correctly.
- After step3, sensor should output the data on data lane and clock lane. Check the signals on these pins to see if the sensor works fine.
- In this step, you need to check if you make a correct MIPI input configuration. This is what you post in your question. There is one thing which you need take care of, you need to confirm the THS_zero and THS_prepare are correct.
Please first check this issue accordingly.
thank for you reply。
1 first we check all CX3 clock sources is correct.
2 check the sensor has a correct power on/reset procedure when the board is power on.
3 check the sensor registers are written correctly via I2C bus.
4 measure sensor output the mipi data on data lane and clock lane is correct
We don't know how to change THS_zero and THS_prepare values.
For the step 4, please upload the waveform screenshot.
The first four are data single-terminal signal levels, where the D0/1_n line signal has a semi-high level when returning to HS mode in LP mode, and D0/1_p does not have this phenomenon! The middle four are the single terminal level of the clock signal, which is seen from the waveform as a continuous clock mode. The last one is a frame of data, and there's a line of data discontinuity.
- Is the MIPI clock gated or continuous? If the sensor is streaming in continuous clock mode, follow the steps mentioned in question 13 of the following link:
- Print the MIPI CSI error counts over UART by using the API “CyU3PMipicsiGetErrors”. Check if any of the error count is non-zero. If yes, double check the sensor configuration.
- Vary the ‘thsSettleDelay’ parameter of “CyU3PMipicsiSetPhyTimeDelay()” API to check if the sensor is streaming for any of the delay value. Keep the first parameter as 0x01 always.
thank for you reply.
Our MIPI is not a continuous clock we need to take the time to confirm.
I test the program every five seconds call function CyU3PMipicsiGetErrors print Discovery is 0.
I tried calling the function CyU3PMipicsiSetPhyTimeDelay() to change the delay value 0 to 0x7f but found no effect, the MIPI controller has not given the FV and LV signals.
Looks like the waveform of data is incorrect. Please check it again. Also please try to switch the clock to gate mode instead of continuous mode.
I find call function CyU3PDmaMultiChannelCommitBuffer (chHandle, (DmaBuffer.count + CX3_UVC_PROD_HEADER), 0); return status is CY_U3P_ERROR_INVALID_SEQUENCE, What could be the cause of this?
Can you please have a look into the following article: Invalid Sequence Error in Multi-Channel Commit Buffer - KBA218830 ?
It may be useful for you.
As mentioned in the article, please try to increase the DMA buffer size as much as possible.