Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17253 Discussions

Doubts about the implementation of I2C in my FPGA

PedroJServian
New Contributor I
965 Views

Good morning,

 

I am designing a communication between my FPGA MAX10 and my microcontroller. The FPGA detects some hardware faults from different sources and then it communicates to the microcontroller with a decoding communications (5 data lines with read enable from FPGA to uC, there can be 20 faults, if it is active the fault nº5 it sends 00101 and so on). So I use 7 pins to communicate wit hte uC. I am increasing my project and I am having problems with the numbers of pins that are routed to the FPGA. So I thought to send those faults with another communication and I thought about the I2C (only 2 pins). 

I saw in the IP Catalog the I2C Slave To Avalon-MM Master Bridge Intel FPGA IP. What I would like to know is if this IP can be used to communicate with I2C with an external microcontroller (texas family) and not having problems. I am new designing FPGAs and I get usually lost with comms.

 

I will wait for your answer. Have a nice week.

 

BR,

Pedro

0 Kudos
1 Solution
FvM
Honored Contributor II
892 Views
Hi,
does your FPGA design an embedded processor (Nios or HPS)? If not, Avalon ST I2C master is most likely not the appropriate solution due the large amount of registers that must serviced by your FPGA code. I'd rather think about importing an open source I2C master design or possibly extracting the controller core from Avalon ST master IP.

In terms of resource overhead, a SPI like interface (simple shift register) would be usually preferred.

View solution in original post

0 Kudos
5 Replies
FvM
Honored Contributor II
893 Views
Hi,
does your FPGA design an embedded processor (Nios or HPS)? If not, Avalon ST I2C master is most likely not the appropriate solution due the large amount of registers that must serviced by your FPGA code. I'd rather think about importing an open source I2C master design or possibly extracting the controller core from Avalon ST master IP.

In terms of resource overhead, a SPI like interface (simple shift register) would be usually preferred.
0 Kudos
PedroJServian
New Contributor I
572 Views

Yes, it seems not to be appropiate with a C28x microcontroller of Texas. Finally I'm going to use the SPI interface or if it gives me problems, the UART solution.

 

Thank you!!

Pedro

0 Kudos
ShengN_Intel
Employee
821 Views

Hi,


You may use that and there's key to take note as mentioned.

Or you may use uart (2 pins also) for that.


Thanks,

Regards,

Sheng


0 Kudos
ShengN_Intel
Employee
623 Views

Hi,


Do you have any further concern or update?


Thanks,

Regards,

Sheng


0 Kudos
PedroJServian
New Contributor I
571 Views

No!! Thank you.

 

Im going to try the SPI solution to communicate with the C28x microcontroller and if it gives me problems, the UART solution you mentioned.

Thank you very much Sheng!

0 Kudos
Reply