FPGARelated.com
Forums

MachXO2 I2C configuration. EFB I2C block synthesis error.

Started by atom1477 5 years ago2 replieslatest reply 5 years ago421 views

Hello.

I creating project with LCMXO2-1200HC device in QFN32 package, so i have very limited number of IO pins and I want to configuring FPGA by I2C instead of JTAG.

I try to do this similarly to this descriprion:

http://buildingelectronics.blogspot.com/2017/09/ma...

Only differences are:

1. I use MachXO2 instead of MachXO3.

2. Trouble 4 not exist. I use Lattice Diamond 3.10, trouble exist only in Lattice Diamond 3.9 or i quess, in earlier versions. But in 3.10, WBCLKI is generated and i hope it is generated correctly.

So I generate I2C module using IPExpress:

i2c_1_23581.gif

i2c_2_68411.gif

Then I insert some code from generated i2c_tmpl.vhd file, to my main.vhd file.

And set some parameters in preferences (I2C ENABLE, JTAG DISABLE):

i2c_4_21422.gif

But when I try to synthetise this, I have this error:

i2c_3_48007.gif

Why?

In there something I forgot to do?


Complete project: I2C_configuration_test.zip.

[ - ]
Reply by mocomakersNovember 27, 2018

Hello. I'm not well-versed in VHDL, but I did get your project to synthesize by importing the i2c.ipx file.

importipx_75777.png


You did not check 'Import IPX to Diamond Project' when creating the I2C module via EFB and IPExpress.

I have not tested this solution beyond software synthesis.

However, I can point you to a working SPI programming configuration for the MachXO2 -

https://www.mocomakers.com/basic-setup-of-the-fipsy-fpga/

Best of luck.

[ - ]
Reply by atom1477November 27, 2018

[quote]You did not check 'Import IPX to Diamond Project' when creating the I2C module via EFB and IPExpress.[/quote]

Thank you very much.

This is it.

After adding the ipx file, the project has been synthesized and works (I mean: programming via I2C works).