Using FX3 As Async Slave FIFO With I2C

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

cross mob
arnova
Level 1
Level 1
First reply posted First question asked First like given

I'm currently looking into fitting the FX3 in our FPGA design. What we like to do is use the FX3 as "Async Slave FIFO" (fast ->DMA) for reading data from our FPGA. But we also like to use the FX3's I2C interface (slow -> non-DMA/register-mode) to write AND read to/from the FPGA (for registers etc.). We have a few questions about this scenario:

1) Can the "Async Slave FIFO" and I2C interface be used in the same (FX3) thread since it's mixing DMA reading and I2C reading (+writing)? Or perhaps do I need to use separate endpoints for DMA and non-DMA(I2C)?

2) Are there any examples for this scenario? We did find AN75779 but as far as we can tell the I2C interface in that example is only used for writing to the slave, not reading from it.

3) Is there anything else we need to take into account for this scenario?

 

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

1) Can the "Async Slave FIFO" and I2C interface be used in the same (FX3) thread since it's mixing DMA reading and I2C reading (+writing)?

>> Yes, SlaveFIFO and I2C interface can be used in the same application thread.

Or perhaps do I need to use separate endpoints for DMA and non-DMA(I2C)?

>> The DMA channel created for SlaveFIFO will use one/two endpoints (for transferring data to USB host). And even if I2C read/write  is done using register mode, the data received/sent to I2C would be using register mode but for transferring the data to USB, you can create a MANUAL OUT DMA channel if the data is to be sent via endpoint other than control endpoint. Please note that the DMA channel for SlaveFIFO and for transferring I2C data to and from USB host, will use different USB endpoints.

 Are there any examples for this scenario? We did find AN75779 but as far as we can tell the I2C interface in that example is only used for writing to the slave, not reading from it.

>> You can combine SlaveFIFO example  with I2C regmode example of the SDK

Please let me know if more queries on this.

Regards,
Rashi

View solution in original post

0 Likes
1 Reply
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

1) Can the "Async Slave FIFO" and I2C interface be used in the same (FX3) thread since it's mixing DMA reading and I2C reading (+writing)?

>> Yes, SlaveFIFO and I2C interface can be used in the same application thread.

Or perhaps do I need to use separate endpoints for DMA and non-DMA(I2C)?

>> The DMA channel created for SlaveFIFO will use one/two endpoints (for transferring data to USB host). And even if I2C read/write  is done using register mode, the data received/sent to I2C would be using register mode but for transferring the data to USB, you can create a MANUAL OUT DMA channel if the data is to be sent via endpoint other than control endpoint. Please note that the DMA channel for SlaveFIFO and for transferring I2C data to and from USB host, will use different USB endpoints.

 Are there any examples for this scenario? We did find AN75779 but as far as we can tell the I2C interface in that example is only used for writing to the slave, not reading from it.

>> You can combine SlaveFIFO example  with I2C regmode example of the SDK

Please let me know if more queries on this.

Regards,
Rashi
0 Likes