I2C on Pulpissimo
#1
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..
Reply
#2
Hello,

There is actually a small test program on the pulp_rt_examples 
  https://github.com/pulp-platform/pulp-rt...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
Visit pulp-platform.org and follow us on twitter @pulp_platform
Reply
#3
(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...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.
Reply
#4
(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...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.
Visit pulp-platform.org and follow us on twitter @pulp_platform
Reply
#5
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.
Visit pulp-platform.org and follow us on twitter @pulp_platform
Reply
#6
(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 ..
Reply
#7
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.
Reply
#8
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.
Reply
#9
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
Visit pulp-platform.org and follow us on twitter @pulp_platform
Reply
#10
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)