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

USB superspeed peripherals Forum Discussions

Sylvia
Level 2
5 replies posted First solution authored First like given
Level 2

Hi, 

I use CYUSB3014.  I set CyU3PMipicsiInitializeI2c(CY_U3P_MIPICSI_I2C_100KHZ) in the CyFx_I2cInit function.

Because I may write some settings to FPGA while video playing, I hope I2C read/write time can be shorter. Therefore, I change the setting to CyU3PMipicsiInitializeI2c(CY_U3P_MIPICSI_I2C_400KHZ). 

I use CyU3PGetTime to check the time but I think it is almost the same. Is that correct?

Any response would be greatly appreciated.

0 Likes
5 Replies
AliAsgar
Moderator
Moderator 50 likes received 500 replies posted 250 replies posted
Moderator

Hi,

The API CyU3PMipicsiInitializeI2c(CY_U3P_MIPICSI_I2C_100KHZ) is specifically for the CYUSB3065 part number.

Please refer to the USBI2cDmaMode example provided in the FX3 SDK for details on how to initialize I2C for a CYUSB3014 part number.

Best Regards,
AliAsgar

0 Likes
Sylvia
Level 2
5 replies posted First solution authored First like given
Level 2

Hi AliAsgar, 

Thank you for your reply.

I have refer the USBI2cDmaMode example and modify the I2cInit function like that.

I also refer the thread and I check the VIO5 is 3.3 V.

I set the bitRate as 400K and 1M but the cost of I2C write are the same. The functions CyU3PI2cTransmitBytes and CyU3PI2cWaitForAck spend about 1ms a time.

Another question, I set i2cConfig.isDma = CyFalse. Is it faster to use DMA mode?

Best Regards,
Sylvia

 

 

0 Likes
JayakrishnaT_76
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hello Sylvia,

Can you capture the I2C transfers using a logic analyzer and share it with us by zipping it?

Best Regards,
Jayakrishna
0 Likes
Sylvia
Level 2
5 replies posted First solution authored First like given
Level 2

Hi Jayakrishna,

I change the setting of I2C frequency 100K/400K/1M and check it in the oscilloscope. The wave of SCL pin is corresponding to the setting. Is this what you need?

Best Regards,
Sylvia

0 Likes
AliAsgar
Moderator
Moderator 50 likes received 500 replies posted 250 replies posted
Moderator

Hi Sylvia,

What I think Jayakrishna meant was, you can probe both the SDA and SCK lines for an I2C write and share with us time between start of the transfer to the end.

This has to be done for both 400K and 1M.

How do you infer that the cost of writing is same for both frequencies, how was the time measured?

I assume, irrespective of the cost of transfers, the i2c read and writes are done successfully. Is my assumption correct?

Best Regards,
AliAsgar

0 Likes