Can FX3 i2c(iic) working in slave fifo mode?

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

cross mob
user_4313511
Level 1
Level 1
10 sign-ins 5 sign-ins Welcome!

Hi

I have CYUSB3014, and i willing to i2c working in slave fifo,because we want to transfer USB data and i2C data at the same time .

Is this can possible?If it's can do it, could you please let me know example source code like bulkloop or slavefifo ?

Thank you

0 Likes
1 Solution
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello,

You need to merge manually,  it should not be that hard you need to do the below stapes to do that.

- In main function need to make I2C IO enable io_cfg.useI2C = CyTrue;
- CyFxI2cInit function from cyfxusbi2cdmamode need to add in code before CyU3PConnectState function call.
- CyFxUSBSetupCB need to use in new code to handle I2C command.
- CyFxI2cInit, CyFxUsbI2cTransfer need to copy to new code.

Best Regards,
Biren

View solution in original post

0 Likes
6 Replies
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello,

Can you please help with what data you wanted to send to I2C, you want some USB data to I2C or CPU to I2C?

Best Regards,
Biren

0 Likes

Hi,Biren

Thanks for your reply

I means we need 2 channels,one channel uses SlaveFIFO mode for high-speed data transfer between PC and FPGA, and the other channel uses I2C to transfer control instructions between PC and FPGA  .

0 Likes

Hi,Biren

Can you provide some source code or reference documentation? thank you^^

0 Likes
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello,

You can use cyfxusbi2cdmamode example, we can send data to USB to I2C EEPROM and read EEPROM data also you need to change the I2C command based on FPGA.

you can find this example at this location in FX3 SDK : C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbi2cdmamode

Best Regards,
Biren

0 Likes

Yes, we have tested cyfxusbi2cdmamode example for I2C transport, but how to combine it with Slavefifo? Implement both I2C and salvefifo functions on one firmware

0 Likes
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello,

You need to merge manually,  it should not be that hard you need to do the below stapes to do that.

- In main function need to make I2C IO enable io_cfg.useI2C = CyTrue;
- CyFxI2cInit function from cyfxusbi2cdmamode need to add in code before CyU3PConnectState function call.
- CyFxUSBSetupCB need to use in new code to handle I2C command.
- CyFxI2cInit, CyFxUsbI2cTransfer need to copy to new code.

Best Regards,
Biren

0 Likes