PYNQ Image v2.x (standard precompiled image)
Board
PYNQ-Z2 (Zynq-7020)
Image Type
Standard PYNQ image (not custom-built)
Problem Description
I am trying to interface an external RTC module with a PYNQ-Z2 board using I2C from Python. My goal is to read time data from the RTC within a PYNQ notebook.
I attempted to use the smbus / smbus2 Python library for I2C communication, but I am facing issues installing or using SMBus on the PYNQ Linux environment. Because of these issues, I am also exploring an alternative architecture where the RTC is connected to an Arduino, and the Arduino communicates with the PYNQ-Z2 (via UART/I2C/SPI).
I am unsure whether this approach is recommended or if there is a better native way to handle RTCs on PYNQ.
Error / Issue Details
smbusis not available by default on PYNQ- Installing
smbus/smbus2viapipleads to dependency or runtime issues - I2C access from Python is not working as expected
(Exact error messages can be provided if required.)
Steps to Reproduce
- Boot PYNQ-Z2 with standard PYNQ image
- Attempt to install
smbus/smbus2usingpip - Try to access I2C bus from Python to communicate with RTC
- Encounter installation or runtime errors
What I Have Tried
- Installing
smbusandsmbus2viapip - Checking I2C device availability using Linux tools
- Considering Arduino-to-PYNQ communication as a workaround
Questions
- Is using
smbus/smbus2the recommended way to access I2C devices on PYNQ? - Is connecting an RTC to Arduino and then interfacing Arduino with PYNQ a valid or recommended design?
- Are there PYNQ-specific libraries or overlays better suited for RTC or I2C peripherals?