No I2C devices on base overlay

Hello PYNQ community,

I am using a precompiled v2.4 Image on a default PYNQ-Z1 and have a problem with the I2C.
With the basic overlay there is no i2c interface at all in my /dev/ directory.
Currently I do not have access to vivado for a new hardware configuration, so is it possible to solve this problem on an OS-level?

Thank You in Advance.

I2C functionality is available within the IOPs in the base overlay. (IOPs are based on MicroBlaze, and in base are connected to PMod ports and Arduino header)

Some info here:
https://pynq.readthedocs.io/en/v2.5.1/pynq_libraries/pynqmb_reference.html#i2c-devices

What are you trying to connect to?

Cathal

Hello Cathal,
thanks for your quick reply. I am trying to connect an IMU (10 DOF IMU Sensor (C) - Waveshare Wiki) to my PYNQ on PMod.

We have support for this one:

You can see the source code here:

Corresponding Python:

Looking at the webpages, there are some similarities between the Seeed module, and the one you are looking at:
Seeed
MPU-9250
BMP180

Waveshare
BMP180
BMP280
MPU-9255

I didn’t check in detail. You could do this and try to determine if some or all of the functionality may work with existing code if you connect to the right pins.

Cathal

Thank you! This is certainly something I can use for my project. But there is still the problem with the missing i2c devices in my /dev/ directory, so I won’t be able to establish an i2c connection. Is it possible to solve this problem on OS-level?

This is not enabled by default on pynq-z1, since there was no use case. This is enabled on pynq-z2. To also enable it on pynq-z1, you will need to recompile the boot partition of your PYNQ image. In your PS block design of your FSBL hardware project, you need to enable those 2 I2C controllers. Also, in device tree there may be more changes required. This is a tricky problem but you can find a lot of useful examples on pynq-z2.

1 Like

@rock @cathalmccabe Is it possible to get the configuration of the kernel in a single file so you don’t have to select each kernel component in the GUI?

There are multiple places that you can add kernel configurations, e.g.
https://github.com/Xilinx/PYNQ/blob/image_v2.6/sdbuild/boot/meta-pynq/recipes-kernel/linux/linux-xlnx/pynq.cfg
This adds the configurations to your meta-pynq layer. You can also directly include configurations in your petalinux bsp.