Post Go back to editing

IIO Oscilloscope plot channel display issue with multiple AD4020 devices

Hi there,

I've an FMC board with 4xAD4020 on it, connected to a Zedboard. There seems to be display issue with how the channels of each individual device are shown in the tree. I'd expect one voltage0 channel under each ad4020 node, but they all seem to be grouped under the first ad4020.   This is version 0.99, but I've also seen this the iio scope that ships with the current SD card image.

Also, it looks like if I want to save the data for all 4 channels using the 'Save As' feature, I can only do for a single device at a time, I can't enable the voltage0 checkbox for each of the 4 device in the dialog - only one seems to stay active.  Is there a way to save the data for all 4 devices from the GUI?

Thanks now

Parents
  • Channels will be grouped based on the driver naming. So my guess is that in your device tree you do not have unique names for the individual drivers which have the associated buffered channels. This is why the grouping in IIO-Scope is getting confused.

    Note that IIO-Scope cannot capture from multiple drivers simultaneously in the same capture window.

    -Travis

  • Hi Travis,

    When you say IIO-scope can't capture from multiple drivers, does that mean that I need to do this from a python script instead?  It does look like I'm getting 4 separate and different channels of data displayed in IIO scope, so do you mean that the data might only be for one channel, just duplicated/offset/sliced in some way that maybe isn't obvious from an initial reivew?

    This is what I've got for the 4 ADCs in the devicetree.dts file inside an axi-spi_engine_x instance.  They each have a unique label there, is that what you mean?

    ad4020_0: adc@0 {
    compatible = "ad4020";
    <snip>

    };

    <snip>

    ad4020_2: adc@0 {
    compatible = "ad4020";
    <snip>
    };

    <snip>

    ad4020_3: adc@0 {
    compatible = "ad4020";
    <snip>
    };

    <snip>

    ad4020_4: adc@0 {
    compatible = "ad4020";

    <snip>
    };

    I've also put the relevant iio_info output here in case that helps:

    iio:device0: ad4020 (buffer capable)
    1 channels found:
    voltage0: (input, index: 0, format: le:s20/32>>0)
    3 channel-specific attributes found:
    attr 0: offset value: -1048576
    attr 1: raw value: 976412
    attr 2: scale value: 0.002384185
    1 device-specific attributes found:
    attr 0: sampling_frequency value: 1800000
    3 buffer-specific attributes found:
    attr 0: data_available value: 0
    attr 1: length_align_bytes value: 8
    attr 2: watermark value: 400
    1 debug attributes found:
    debug attr 0: direct_reg_access value: 0x63
    iio:device1: ad4020 (buffer capable)
    1 channels found:
    voltage0: (input, index: 0, format: le:s20/32>>0)
    3 channel-specific attributes found:
    attr 0: offset value: -1048576
    attr 1: raw value: 792238
    attr 2: scale value: 0.002384185
    1 device-specific attributes found:
    attr 0: sampling_frequency value: 1800000
    3 buffer-specific attributes found:
    attr 0: data_available value: 0
    attr 1: length_align_bytes value: 8
    attr 2: watermark value: 400
    1 debug attributes found:
    debug attr 0: direct_reg_access value: 0x63
    iio:device2: ad4020 (buffer capable)
    1 channels found:
    voltage0: (input, index: 0, format: le:s20/32>>0)
    3 channel-specific attributes found:
    attr 0: offset value: -1048576
    attr 1: raw value: 21551
    attr 2: scale value: 0.002384185
    1 device-specific attributes found:
    attr 0: sampling_frequency value: 1800000
    3 buffer-specific attributes found:
    attr 0: data_available value: 0
    attr 1: length_align_bytes value: 8
    attr 2: watermark value: 400
    1 debug attributes found:
    debug attr 0: direct_reg_access value: 0x63
    iio:device3: ad4020 (buffer capable)
    1 channels found:
    voltage0: (input, index: 0, format: le:s20/32>>0)
    3 channel-specific attributes found:
    attr 0: offset value: -1048576
    attr 1: raw value: 831778
    attr 2: scale value: 0.002384185
    1 device-specific attributes found:
    attr 0: sampling_frequency value: 1800000
    3 buffer-specific attributes found:
    attr 0: data_available value: 0
    attr 1: length_align_bytes value: 8
    attr 2: watermark value: 400
    1 debug attributes found:
    debug attr 0: direct_reg_access value: 0x63

    Thanks now,

    Michael.

Reply
  • Hi Travis,

    When you say IIO-scope can't capture from multiple drivers, does that mean that I need to do this from a python script instead?  It does look like I'm getting 4 separate and different channels of data displayed in IIO scope, so do you mean that the data might only be for one channel, just duplicated/offset/sliced in some way that maybe isn't obvious from an initial reivew?

    This is what I've got for the 4 ADCs in the devicetree.dts file inside an axi-spi_engine_x instance.  They each have a unique label there, is that what you mean?

    ad4020_0: adc@0 {
    compatible = "ad4020";
    <snip>

    };

    <snip>

    ad4020_2: adc@0 {
    compatible = "ad4020";
    <snip>
    };

    <snip>

    ad4020_3: adc@0 {
    compatible = "ad4020";
    <snip>
    };

    <snip>

    ad4020_4: adc@0 {
    compatible = "ad4020";

    <snip>
    };

    I've also put the relevant iio_info output here in case that helps:

    iio:device0: ad4020 (buffer capable)
    1 channels found:
    voltage0: (input, index: 0, format: le:s20/32>>0)
    3 channel-specific attributes found:
    attr 0: offset value: -1048576
    attr 1: raw value: 976412
    attr 2: scale value: 0.002384185
    1 device-specific attributes found:
    attr 0: sampling_frequency value: 1800000
    3 buffer-specific attributes found:
    attr 0: data_available value: 0
    attr 1: length_align_bytes value: 8
    attr 2: watermark value: 400
    1 debug attributes found:
    debug attr 0: direct_reg_access value: 0x63
    iio:device1: ad4020 (buffer capable)
    1 channels found:
    voltage0: (input, index: 0, format: le:s20/32>>0)
    3 channel-specific attributes found:
    attr 0: offset value: -1048576
    attr 1: raw value: 792238
    attr 2: scale value: 0.002384185
    1 device-specific attributes found:
    attr 0: sampling_frequency value: 1800000
    3 buffer-specific attributes found:
    attr 0: data_available value: 0
    attr 1: length_align_bytes value: 8
    attr 2: watermark value: 400
    1 debug attributes found:
    debug attr 0: direct_reg_access value: 0x63
    iio:device2: ad4020 (buffer capable)
    1 channels found:
    voltage0: (input, index: 0, format: le:s20/32>>0)
    3 channel-specific attributes found:
    attr 0: offset value: -1048576
    attr 1: raw value: 21551
    attr 2: scale value: 0.002384185
    1 device-specific attributes found:
    attr 0: sampling_frequency value: 1800000
    3 buffer-specific attributes found:
    attr 0: data_available value: 0
    attr 1: length_align_bytes value: 8
    attr 2: watermark value: 400
    1 debug attributes found:
    debug attr 0: direct_reg_access value: 0x63
    iio:device3: ad4020 (buffer capable)
    1 channels found:
    voltage0: (input, index: 0, format: le:s20/32>>0)
    3 channel-specific attributes found:
    attr 0: offset value: -1048576
    attr 1: raw value: 831778
    attr 2: scale value: 0.002384185
    1 device-specific attributes found:
    attr 0: sampling_frequency value: 1800000
    3 buffer-specific attributes found:
    attr 0: data_available value: 0
    attr 1: length_align_bytes value: 8
    attr 2: watermark value: 400
    1 debug attributes found:
    debug attr 0: direct_reg_access value: 0x63

    Thanks now,

    Michael.

Children