CX3 I2C rise time and frequency issue

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Sag
Level 3
Level 3
First like received 25 replies posted 25 sign-ins

Hello,

Our CX3 I2C is not working properly, looks like only sometimes in random we mange to communicate with our camera module. lookin at the signals we see that the rise time is high as well as the frequency is not as it should, it is 250KHz instead of 400KHz. this is with 10K pull-up resistors as it is in the reference design.

Sag_0-1656741279885.png

we tried changing the pull-up to 5KHz, this had an impact, mainly on the frequency which changed to 280KHz.
Then we saw in the FX3 checklist that it is recommended to use 2K pull-up (it is for flash but we decided to try) and the signal changed to 400KHz but the rise time is still bad

Sag_1-1656741468645.png

 

any suggestions? there is nothing on the I2C lines that is loading them (the signals remain similar with and without the camera module).

attached also the schematics and layout.

thanks, 

 

0 Likes
1 Solution
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

From the excel sheet, I can see that the I2C write to 0x0E and read from 0x0F have all resulted in ACKs. It means that CX3 is successfully able to do I2C transfers with its MIPI block.
But I2C transfers are sometimes getting NAKed and sometimes getting ACKed when we are trying to send I2C write commands to the image sensor(0x20).Please correct me if I my understanding is wrong.

Could you try performing a MIPI reset after MipicsiInit, but before image_sensor_init?

CyU3PMipicsiSetSensorControl(CY_U3P_CSI_IO_XRES,CyFalse);
CyU3PThreadSleep(2000);
CyU3PMipicsiSetSensorControl(CY_U3P_CSI_IO_XRES,CyTrue);

Make sure the image sensor reset IO of CX3 is connected to the reset pin of the image sensor.

Best Regards,
AliAsgar

 

 

View solution in original post

0 Likes
17 Replies
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

We are checking the PCB document that you have shared, Meanwhile, could you disconnect the image sensor and program the firmware on the CX3 chip and check the I2C traces(slave address 0x0E for write). Please share those I2C traces with us as well.

Best Regards,
AliAsgar

 

0 Likes
Sag
Level 3
Level 3
First like received 25 replies posted 25 sign-ins

Hey,

ok, we disconnected the image sensor, configured the I2C freq to 400KHz, used 2.1K pull-up resistors.
attached below traces of reading from register 0x0002 at address 0x0F and writing to the same register at address 0x0E.

Sag_0-1657095020953.png

 

Sag_1-1657095204439.png

thanks,




0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

Could you confirm if R27and R28 are resistors and their value is 0 ohms.

Also confirm if R34 and R35 are resistors and their value is 10K ohms.

Best Regards,
AliAsgar

0 Likes
Sag
Level 3
Level 3
First like received 25 replies posted 25 sign-ins

Hey,

R27 and R28 are indeed 0 ohm.

R34 and R35 are 2.1Kohm, when they were 10Kohm the frequency shifted to 250Khz with lower maximum voltage, as you could see in the picture of the first message and the logic analyzer couldn't sync.

 

Thanks,

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

Please do let us know if you are unable to program the image sensor with 10k resistor pull up.

We have a similar errata already present with the CX3 datasheet. But we are still able to program the sensor properly.

Also please let us know if multi master is used on the i2c bus.

Best Regards,
AliAsgar

 

0 Likes
Sag
Level 3
Level 3
First like received 25 replies posted 25 sign-ins

Hey,

I can confirm that with 10K resistor we can't configure the image sensor.

About multi master, can you please help with how to check it?

Thanks,

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

Are there any other I2C master devices on the I2C bus?

Are you able to program the image sensor, if the pull up is 2.2k?

Best Regards,
AliAsgar

0 Likes
Sag
Level 3
Level 3
First like received 25 replies posted 25 sign-ins

Hey,

There is nothing on the I2C bus apart from the image sensor.

We can't configure it with 2.2k either.

 

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

Can you let me know which image sensor is being used?

Can you confirm if you are able to configure the camera registers properly if the I2C frequency is reduced, maybe 100kHz.

Do you have a CX3 Denebola kit with you for testing?

Best Regards,
AliAsgar

0 Likes
Sag
Level 3
Level 3
First like received 25 replies posted 25 sign-ins

Hey,

  • Image sensor is AR0144
  • Did not succeeded configuring with 100khz as well. Nor with 100khz and 2.2kohm pull-up
  • We don't have Denebola kit, they were out of stock, we hope to get one soon
  • Can you please refer to the I2C signals, the rise time is very long, it looks like something is loading the lines even without the image sensor, so this is probably a CX3 issue
  • Can you please explain how can we configure the CX3 to single master as suggested in the errata? 

Thanks,

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

When the image sensor is not connected, can you tell me if the I2C commands to the MIPI block of CX3 are getting ACKed or not.
You can try capturing the signals using a Logic Analyser and configure the software to probe I2C signals and you could share those signals with us.

I do not think the issue is related to any errata in the CX3 datasheet.

Note: We see a similar waveform for 400KHz as you have shared, when CX3 is sending I2C signals to configure the different image sensors. But the difference is, this results in successful I2C reads and writes to the image sensor, inspite of the rise time issue.

Best Regards,
AliAsgar

0 Likes
Sag
Level 3
Level 3
First like received 25 replies posted 25 sign-ins

Hey,

Ok. What configuration should we check? Which frequency and what value of pull-up?

What commands do you suggest to test?

 

Thanks,

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

Let the frequency be 400KHz with 10K pull up.

By commands I mean to read, write and then again read a particular register of the image sensor and probe the I2C signals for this test.

Best Regards,
AliAsgar

 

0 Likes
lock attach
Attachments are accessible only for community members.
Sag
Level 3
Level 3
First like received 25 replies posted 25 sign-ins

Hey,

we did the following tests:

  1. testing and read write to the image sensor as follows:
    • Read address 0x21 register 0x3000
    • Read address 0x21 register 0x301D
    • Write address 0x20 register 0x301D value '3'
    • Read address 0x21 register 0x301D
  2. testing read and write to the internal block with and without the image sensor as follows:
    • Reade address 0xF register 0x02
    • Write address 0xE register 0x02 bit[0-1]=01
    • Read address 0xF register 0x02

attached are all the files.

thanks,

 

 

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

From the excel sheet, I can see that the I2C write to 0x0E and read from 0x0F have all resulted in ACKs. It means that CX3 is successfully able to do I2C transfers with its MIPI block.
But I2C transfers are sometimes getting NAKed and sometimes getting ACKed when we are trying to send I2C write commands to the image sensor(0x20).Please correct me if I my understanding is wrong.

Could you try performing a MIPI reset after MipicsiInit, but before image_sensor_init?

CyU3PMipicsiSetSensorControl(CY_U3P_CSI_IO_XRES,CyFalse);
CyU3PThreadSleep(2000);
CyU3PMipicsiSetSensorControl(CY_U3P_CSI_IO_XRES,CyTrue);

Make sure the image sensor reset IO of CX3 is connected to the reset pin of the image sensor.

Best Regards,
AliAsgar

 

 

0 Likes
Sag
Level 3
Level 3
First like received 25 replies posted 25 sign-ins

Hey,

Your comment about the reset pin did the trick, it was not connected properly. once we connected the reset pin the I2C communication with the image sensor is good (same bad rise time but the sensor is able to communicate)

Thanks for the help.

0 Likes
MatrickEg
Level 1
Level 1
First reply posted First question asked Welcome!


CX3 complies with the following specifications and supports the
following features:
■ Supports USB peripheral functionality compliant with USB 3.0
Specification, Revision 1.0, and is also backward compatible
with the USB 2.0 Specification.
■ As a peripheral, CX3 is capable of SuperSpeed, High-Speed,
and Full-Speed.
■ Supports up to 16 IN and 16 OUT endpoints
■ Supports the USB 3.0 Streams feature
■ As a USB peripheral, CX3 supports USB-attached storage
(UAS), USB Video Class (UVC), and Media Transfer Protocol
(MTP) USB peripheral classes. As a USB peripheral, all other
device classes are supported only in pass-through mode when
handled entirely by a host processor external to the device.

0 Likes