analogdevicesinc / pyadi-iio

Python interfaces for ADI hardware with IIO drivers (aka peyote)
https://analogdevicesinc.github.io/pyadi-iio
Other
141 stars 101 forks source link

Add support for ADAQ42xx #487

Closed machschmitt closed 10 months ago

machschmitt commented 11 months ago

Description

AD4630 and ADAQ42xx designs are very similar, differing mainly on the availability (or not) of PGIA gain. Add input scale properties to handle ADAQ42xx PGIA control and add ADAQ4216, ADAQ4220, and ADAQ4224 to the list of supported devices.

Type of change

Please delete options that are not relevant.

How has this been tested?

This has been tested on ZebBoard with EVAL-ADAQ4224-FMCZ (setup by @ladace).

Test Configuration:

From iio_info:

    hdl_system_id: [AD463XADAQ42XXN0_CLKMODE0_NUMOFSDI1_CAPTUREZONE2_DDREN0/ad463x_adaq42xx_zed] [sys rom custom string placeholder] on [zed] git branch [dev_adaq4224_final] git [7df56bd2d04bdccc44d9bbfa94c800b828abb80f] dirty [2023-11-01 14:03:21] UTC
    hw_model: EVAL-ADAQ4224-FMCZ on Xilinx Zynq ZED

Documentation

Linux kernel support has been included in PR #2262.

Checklist:

machschmitt commented 11 months ago

Thank you for your review @tfcollins.

I made the changes you asked for.

Change log V1 -> V2:

machschmitt commented 11 months ago

I don't have adqa4224 but do have ad4030. I was trying to set up ad4030 with zed board to test this (even if indirectly), but something didn't work on the hdl/linux side. Will come back to this task when able to test the changes. By the way, should this PR also include a device XML file generated with xml_gen?

Change log V2 -> V3:

tfcollins commented 11 months ago

I don't have adqa4224 but do have ad4030. I was trying to set up ad4030 with zed board to test this (even if indirectly), but something didn't work on the hdl/linux side. Will come back to this task when able to test the changes. By the way, should this PR also include a device XML file generated with xml_gen?

Yes for the new component

machschmitt commented 11 months ago

Hi @tfcollins,

After testing this on ZebBoard with EVAL-ADAQ4224-FMCZ it was possible to make the code cleaner. I updated the PR description with more detailed info about the tests. The new example is just a modified version of ad4630_example_simple_plot.py so we can maybe merge them or drop the new one. Whatever you think is better. Also, the related Linux kernel changes have been merged. It is easier to squash than to split so I made the changes to attribute tests as a group of three small patches. Do I add adaq4224 to tasks.py ignore list to pass checkparts?

Change log V3 -> V4