PULP Community
I2C on Pulpissimo - Printable Version

+- PULP Community (https://pulp-platform.org/community)
+-- Forum: PULP's Community forum (https://pulp-platform.org/community/forumdisplay.php?fid=1)
+--- Forum: PULP General questions (https://pulp-platform.org/community/forumdisplay.php?fid=2)
+--- Thread: I2C on Pulpissimo (/showthread.php?tid=38)



I2C on Pulpissimo - magseet - 12-03-2018

Hi,
I'm trying to use the I2C controller to communicate with my own I2C peripheral. First, I was trying to build the tb by including the I2C EEPROM (I've followed the README instructions). The problem is that, when using the example program for I2C, the RTL simulation gets stuck at the first write operation. Moreover, SDA and SCL signals never toggle during RTL simulation.

Do you have an example program I can use to make I2C work? I guess I need to make some initialization..


RE: I2C on Pulpissimo - kgf - 12-04-2018

Hello,

There is actually a small test program on the pulp_rt_examples 
  https://github.com/pulp-platform/pulp-rt-examples/tree/master/periph/i2c

You probably want to clone the 'pulp-rt-examples', as explained in the README.md of pulpissimo 
  https://github.com/pulp-platform/pulp-rt-examples

That should give several examples for coding. Hope that helps,
KGF


RE: I2C on Pulpissimo - magseet - 12-04-2018

(12-04-2018, 08:58 AM)kgf Wrote: Hello,

There is actually a small test program on the pulp_rt_examples 
  https://github.com/pulp-platform/pulp-rt-examples/tree/master/periph/i2c

You probably want to clone the 'pulp-rt-examples', as explained in the README.md of pulpissimo 
  https://github.com/pulp-platform/pulp-rt-examples

That should give several examples for coding. Hope that helps,
KGF

I've already tried with the example in that repo, but it doesn't work as expected: the first write operation waits forever. I was trying to interpret the API provided by pulp-rt and tried to set an event, but then the wait operation is again waiting forever. Probably I need to program the UDMA or to manage interrupts, but I would need a working example to start.


RE: I2C on Pulpissimo - kgf - 12-05-2018

(12-04-2018, 11:11 AM)magseet Wrote:
(12-04-2018, 08:58 AM)kgf Wrote: Hello,

There is actually a small test program on the pulp_rt_examples 
  https://github.com/pulp-platform/pulp-rt-examples/tree/master/periph/i2c

You probably want to clone the 'pulp-rt-examples', as explained in the README.md of pulpissimo 
  https://github.com/pulp-platform/pulp-rt-examples

That should give several examples for coding. Hope that helps,
KGF

I've already tried with the example in that repo, but it doesn't work as expected: the first write operation waits forever. I was trying to interpret the API provided by pulp-rt and tried to set an event, but then the wait operation is again waiting forever. Probably I need to program the UDMA or to manage interrupts, but I would need a working example to start.

Hello, we are trying to see if there is an issue is on the I2C setup for PULPissimo. We will get back soon.


RE: I2C on Pulpissimo - kgf - 12-05-2018

Thanks to you we have identified one issue. The pad cell used in the  

  rtl/pulpissimo/pad_frame.sv

was (mistakenly) a pull down pad and not a pull up pad. This is now fixed. We did not yet try a full application, but a smaller test showed us that tis seemed to be the issue. We will be looking into it, but you could maybe give it a try to see if this solves the issue.


RE: I2C on Pulpissimo - magseet - 12-05-2018

(12-05-2018, 02:11 PM)kgf Wrote: Thanks to you we have identified one issue. The pad cell used in the  

  rtl/pulpissimo/pad_frame.sv

was (mistakenly) a pull down pad and not a pull up pad. This is now fixed. We did not yet try a full application, but a smaller test showed us that tis seemed to be the issue. We will be looking into it, but you could maybe give it a try to see if this solves the issue.

Thanks for your effort. As soon as I have time to try it, I'll let you know.

I was doing some reverse engineering on the RTL and noticed that the event signals coming out from I2C modules are always X. This is due to the err_o port of udma_i2c_control, which is not connected in the port map (check
udma_i2c_top.sv). Is this disconnection intentional? I guess it doesn't affect the synchronous way of using I2C ..


RE: I2C on Pulpissimo - gideros - 09-23-2019

Dear magseet, did you manage to fix your issue? I have the same issue. The pad in pad_frame is PU already, both simulation & FPGA show constant sda & scl.


RE: I2C on Pulpissimo - gideros - 10-21-2019

Hi kfg,

Regarding I2C, can you please let me know what is the corresponding version of I2C driver for udma_i2c tag vega_v1.0.0? I've spent lots of time on this issue but I couldn't completely fix it. I think there should be something related to wrong I2C driver versus RTL version. It seems like vega_v1.0.0 is outdated for too long.

Thank you in advance for your time.
Regards.


RE: I2C on Pulpissimo - kgf - 10-25-2019

Thanks for bringing this up.

There is a discussion in the internal mailing lists. We had a few recent projects which made changes, and we are trying to see which version is meant to work. In a nutshell, you are right, there is currently an issue, we are trying to get it to work.

Sorry about that


RE: I2C on Pulpissimo - bluewww - 11-14-2019

We have made a few i2c related fixes some of which are already in PULPissimo master. I2C will use the vega_v1.0.0 version (has been taped out several times). The newer versions unfortunately have known regressions which are being fixed and also the sdk doesnt support them yet.

You can keep an eye on the upcoming changes by tracking the pulpissimo-next branch.