cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

mappingnuts
New Contributor II

Hi,

 

I'm working on streaming images from IMX477 using CX3 through the MIPI interface. 

 

I'm bumping into a I2C issue. I have a Denebola kit and I have developed a board to interface the Denebola MIPI connector to the 22 pin connector of a Arducam (pretty much a Raspberry Pi HQ camera). 

 

Most of time I try to write a register, CyU3PI2cTransmitBytes returns CY_U3P_ERROR_FAILURE, which is a very generic error.

 

I looked into the signal using a Logic Analyzer, and I got this:

20210601_184902.jpg

The sensor almost never sends the proper low level ack after 8 bits,  instead it returns a nack.

 

I changed  the SDA and SCL pull-up resistors from 10k to 1k (that's the value I had in hands, I just wanted it to be smaller), which gave me the result of the image above. 

 

Sometimes I actually get a ack from the sensor and everything works fine, but most of time (at random) I get this problem.

 

Has anyone seen it or could give some advice on how to solve that?

 

I appreciate all feedback.

 

Thanks in advance,

Renato.

0 Likes
1 Solution
mappingnuts
New Contributor II

Hello,

 

Thank you for the really fast reply @Rashi_Vatsa 

 

I figured my problem, I'm sharing so it may help others. 

 

The Arducam module has a power enable pin which is connected to the XShutDown pin of CX3 in my adapter board, and this pin must be 1 for the Arducam to work properly. I was setting XShutDown to 1 before initializing MIPI interface by calling CyU3PMipicsiInit. I found that CyU3PMipicsiInit sets the XShutDown to 0, and I should define it as 1 after calling CyU3PMipicsiInit. Therefore, my problem was that the image sensor was off, that's why it was not sending ack back.

 

Best,

Renato

View solution in original post

0 Likes
2 Replies
Rashi_Vatsa
Moderator
Moderator

Hello,

Please refer to this thread  Solved: I2C_SensorWrite CyU3PI2cTransmitBytes fail error 0... - Cypress Developer Community   with similar query. You can use this CyU3PI2cGetErrorCode API to get the exact reason for the failure. 

Please let us know the error code using CyU3PI2cGetErrorCode to help you better.

Regards,
Rashi
mappingnuts
New Contributor II

Hello,

 

Thank you for the really fast reply @Rashi_Vatsa 

 

I figured my problem, I'm sharing so it may help others. 

 

The Arducam module has a power enable pin which is connected to the XShutDown pin of CX3 in my adapter board, and this pin must be 1 for the Arducam to work properly. I was setting XShutDown to 1 before initializing MIPI interface by calling CyU3PMipicsiInit. I found that CyU3PMipicsiInit sets the XShutDown to 0, and I should define it as 1 after calling CyU3PMipicsiInit. Therefore, my problem was that the image sensor was off, that's why it was not sending ack back.

 

Best,

Renato

View solution in original post

0 Likes