Post Go back to editing

Will it be possible to feed in a reference clock to the ADALM-PLUTO?

I'm interested in whether it would be possible to use the ADALM-PLUTO time-of-arrival localization. This requires a very stable clock. I wonder whether it will be possible to feed in an external reference clock? In the revision-B schematics, it looks like there is no connector or jumper to switch from the built-in 40MHz oscillator to an external clock.

Also, if I do feed the clock from an external source (even if this involves removing the 40MHz oscillator), how difficult will it be to switch from 40MHz to 10Mhz? I see that the AD9363 does support 10MHz clocks, but will it is reasonably easy to configure the firmware for this clock frequency?

Thanks, Sivan Toledo, Tel-Aviv University

Parents
  • Thanks for all the info in this thread, and the linked document.  I was able to successfully swap to a 26 MHz 0.5ppm TCXO (leftover from a previous project) without any issues.  Those are pretty cheap, common, and easy to find... the one I used was a 2.0mm x 1.6mm, which is smaller than the one on the board, but it fit on the pads okay.  I agree that pads for an external reference input would be nice on a future rev... though the self-contained and portable nature of the Pluto is a huge plus IMO (and 0.5ppm with 1ppb Allan variance over 1 sec is decent enough for most of my uses).

    I wanted to mention two things:

    1) In this doc: PlutoSDR/M2k boot magic explained [Analog Devices Wiki] , it says the variable is "ad9361_ext_refclk", though it appears to actually be "ad936x_ext_refclk".

    2) Instead of modifying the device tree and rebuilding the image, I added a U-Boot environment variable for a custom frequency.  I modified the adi_loadvals line, which is what checks the ad936x_skip_ext_refclk to optionally overwrite the frequency value with the factory calibrated frequency.  I have it check for variable "ad936x_custom_refclk", and write that value if it exists.  If that doesn't exist, it loads the factory calibrated frequency.  Both of these are skipped if ad936x_skip_ext_refclk is set.

    Here is the command to make that happen:

    fw_setenv adi_loadvals "fdt addr $"{fit_load_address}" && fdt get value fdt_choosen /configurations/$"{fit_config}"/ fdt && fdt get addr fdtaddr /images/$"{fdt_choosen}" data && fdt addr $"{fdtaddr}"; if test ! -n $"{ad936x_skip_ext_refclk}"; then if test -n $"{ad936x_custom_refclk}"; then fdt set /clocks/clock@0 clock-frequency $"{ad936x_custom_refclk}"; elif test -n $"{ad936x_ext_refclk}"; then fdt set /clocks/clock@0 clock-frequency $"{ad936x_ext_refclk}"; fi; fi; if test -n $"{model}"; then fdt set / model $"{model}"; fi; if test -n $"{attr_name}" && test -n $"{attr_val}"; then fdt set /amba/spi@e0006000/ad9361-phy@0 $"{attr_name}" $"{attr_val}"; fi"

    Then, to set the custom frequency (26 MHz in my case...  note that the quotes and < > are required):

    fw_setenv ad936x_custom_refclk "<26000000>"

    Just wanted to post this as it may be easier for some... and maybe AD would consider adding this functionality in their baseline, so those of us with custom frequencies could easily change frequencies using the stock firmware.

    Pat

Reply
  • Thanks for all the info in this thread, and the linked document.  I was able to successfully swap to a 26 MHz 0.5ppm TCXO (leftover from a previous project) without any issues.  Those are pretty cheap, common, and easy to find... the one I used was a 2.0mm x 1.6mm, which is smaller than the one on the board, but it fit on the pads okay.  I agree that pads for an external reference input would be nice on a future rev... though the self-contained and portable nature of the Pluto is a huge plus IMO (and 0.5ppm with 1ppb Allan variance over 1 sec is decent enough for most of my uses).

    I wanted to mention two things:

    1) In this doc: PlutoSDR/M2k boot magic explained [Analog Devices Wiki] , it says the variable is "ad9361_ext_refclk", though it appears to actually be "ad936x_ext_refclk".

    2) Instead of modifying the device tree and rebuilding the image, I added a U-Boot environment variable for a custom frequency.  I modified the adi_loadvals line, which is what checks the ad936x_skip_ext_refclk to optionally overwrite the frequency value with the factory calibrated frequency.  I have it check for variable "ad936x_custom_refclk", and write that value if it exists.  If that doesn't exist, it loads the factory calibrated frequency.  Both of these are skipped if ad936x_skip_ext_refclk is set.

    Here is the command to make that happen:

    fw_setenv adi_loadvals "fdt addr $"{fit_load_address}" && fdt get value fdt_choosen /configurations/$"{fit_config}"/ fdt && fdt get addr fdtaddr /images/$"{fdt_choosen}" data && fdt addr $"{fdtaddr}"; if test ! -n $"{ad936x_skip_ext_refclk}"; then if test -n $"{ad936x_custom_refclk}"; then fdt set /clocks/clock@0 clock-frequency $"{ad936x_custom_refclk}"; elif test -n $"{ad936x_ext_refclk}"; then fdt set /clocks/clock@0 clock-frequency $"{ad936x_ext_refclk}"; fi; fi; if test -n $"{model}"; then fdt set / model $"{model}"; fi; if test -n $"{attr_name}" && test -n $"{attr_val}"; then fdt set /amba/spi@e0006000/ad9361-phy@0 $"{attr_name}" $"{attr_val}"; fi"

    Then, to set the custom frequency (26 MHz in my case...  note that the quotes and < > are required):

    fw_setenv ad936x_custom_refclk "<26000000>"

    Just wanted to post this as it may be easier for some... and maybe AD would consider adding this functionality in their baseline, so those of us with custom frequencies could easily change frequencies using the stock firmware.

    Pat

Children