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.
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.
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?
Can you capture the I2C transfers using a logic analyzer and share it with us by zipping it?
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?