For the pyadi-iio code, the code below will help initialise the board
before running
The model the pyadi-iio developers work with is that the ad4080_example.py will configure the ad4080, however, the adf4350 and ad9508, as well as the FGPA need to be all configured together to get the LVDS data synchronized.
What may be ultimately needed is an "eval-ad4080-fmcz_example.py" that also configures the components outside of the ad4080 also. One thing we've been trying to work through however is that we needed a non-standard adf4350 driver version, as we use some of the features a little differently on that part.
There is a script on the SD-Card however, "ad4080_update_clks.sh" that can be called via a com port or otherwise that runs the necessary commands from Linux, until we've found the best way to call these directly through the python example.
Set up the AD4080 configuration
ser = serial.Serial(
port='COM5', ## CONFIGURE FOR YOUR COM PORT
baudrate=115200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS
)
ser.isOpen()
ser.flushInput()
time.sleep(1)
ser.write(b'bash ad4080_update_clks.sh')
time.sleep(2)
ser.close()
Related Links: