- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm having problems in sending consecutive "CyU3PI2cSendCommand" commands.
I modified the FX3 i2c example in this way:
case CY_FX_RQT_I2C_EEPROM_WRITE:
status = CyU3PUsbGetEP0Data(wLength, glEp0Buffer, NULL); // Here I receive the data
// Here I'm trying to send 4 times the same message...
if (status == CY_U3P_SUCCESS)
{
CyFxUsbI2cTransfer (wIndex, i2cAddr, wLength,
glEp0Buffer, CyFalse);
}
if (status == CY_U3P_SUCCESS)
{
CyFxUsbI2cTransfer (wIndex, i2cAddr, wLength,
glEp0Buffer, CyFalse);
}
if (status == CY_U3P_SUCCESS)
{
CyFxUsbI2cTransfer (wIndex, i2cAddr, wLength,
glEp0Buffer, CyFalse);
}
if (status == CY_U3P_SUCCESS)
{
CyFxUsbI2cTransfer (wIndex, i2cAddr, wLength,
glEp0Buffer, CyFalse);
}
break;
Observing SDA and SCL with an oscilloscope, the weird thing is that if data has "wLength" up to 33 bytes, all transactions go fine, while if wLength is 34 or more, only the first transaction goes through.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
- I modified the UsbI2cDmaMode example that comes with the FX3 SDK as you have mentioned. I am able to see all the I2C transactions on the analyzer. Please find the attached capture files. (Use Logic software from Saleae Logic to view the .logicdata file).
- Please ensure that you have captured for sufficiently long time so that the transfers are completed.
- If possible, please share the captures that were collected at your end.
Best regards,
Srinath S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
- I modified the UsbI2cDmaMode example that comes with the FX3 SDK as you have mentioned. I am able to see all the I2C transactions on the analyzer. Please find the attached capture files. (Use Logic software from Saleae Logic to view the .logicdata file).
- Please ensure that you have captured for sufficiently long time so that the transfers are completed.
- If possible, please share the captures that were collected at your end.
Best regards,
Srinath S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi SrinathS_16, thank you for your feedback. It helped me to understand the problem.
I was sending the data to an I2C slave (not the same of UsbI2cDmaMode example) with a rx buffer that was too small to receive the whole transfer.