ZCU208 PYNQ3.0.1: Different frequencies for each ADC/DAC's lmx2594

I am using ZCU208 with PYNQ 3.0.1 image.

The current python xrefclk.set_ref_clks function does not seem to support setting different frequency values for the the ADC’s and DAC’s ref clocks (lmx2594).

If I call set_ref_clks as follows, and I use python debug prints, I see that both ADC’s lmx2594 and DAC’s lmx2594 ref clocks are set to the same frequency:
xrfclk.set_ref_clks(lmk_freq=122.88, lmx_freq=409.6)

I am looking to set the ADC ref clock different than the DAC ref clock.
A call that would look something like this:
xrfclk.set_ref_clks(lmk_freq=122.88, lmx_freq=[409.6 245.76])

Do I need to modify the python set_ref_clks function to support two separate lmx2594 frequencies my self or should I be calling it differently or is there a different python function that I should be using?

Luis

1 Like

Hi Luis,

You will need to modify the xrfclk to support two LMX devices. To customize it, I suggest you package it in your PYNQ build, i.e. copy from sdbuild/packages/xrfclk to your build directory under packages/xrfclk.

Something like this would allow it to keep backwards compatibility with one argument, or if receiving a list of frequencies, call each one.

for i, lmx in enumerate(lmx_devices):
    if type(lmx_freq) == list:
        _set_LMX_clks(lmx_freq[i], lmx)
    else:
        _set_LMX_clks(lmx_freq, lmx)

Thanks,
-Pat

1 Like