I am using a precompiled v2.4 Image on a default PYNQ-Z1. I try to read my IMU (10 DOF IMU Sensor (C), Inertial Measurement Unit, Lower Power Consumption) which I connected to the pynq via PMOD. I print the data following the Grove_IMU example on terminal with the script below. But the speed at which it publishes is really slow at around 2 Hz. Is there anything I can do to speed it up significantly?
Thank You in Advance.
The test-code:
from pynq.overlays.base import BaseOverlay
from pynq.lib import MicroblazeLibrary
from pynq.lib.pmod import Grove_IMU
from pynq.lib.pmod import Pmod
from pynq.lib.pmod import PMOD_GROVE_G3
There will be some overhead from the Python call.
The main driver code runs on an IOP (MircoBlaze) in software. You can see the software here.
I see some 10-60ms delays between i2c calls. I presume this was due to some timing issues. You may be able to optimize this code a little.
If you need substantially better performance, you may need to write a custom hardware module for this IP. Remember this is still an i2c peripheral which will be a limiting factor for performance, particularly if you need multiple I2C calls per function.
Yes, it is possible use the i2c from the PS, but this may not be the best thing to do.
It would be helpful if you could answer the question âHow fast do you need it to be?â.