Post Go back to editing

Unable to change (write) filter settings in the CN0540 setup using the IIO oscilloscope software

The basic CN0540/DE-10 setup is working and I'm able to capture data from the ADXL1002 accelerometer. However, any filter setting changes I make using the DE-10 GUI does not seem to take effect. I have been able to scope the CN0540 (attached to the DE-10) for the SPI signals when reading the register values and it looks good. However, for some reason I'm unable to write to the register again. The command goes through; and the scope shows the write command on the SPI lines. But when I read the register after the write, it still has the default value and it hasn't taken the new value I wrote. Note that I am able to successfully write and then read back the new value to the registers when I use the Teensy to interface with the CN0540 instead of the DE-10.

  • Hi Girija,

    Would you be able to send some screen shots of what you are doing and a general step by step recreation so that we can try it on our end?



  • I am in the field right now. Will get detailed answers by this weekend.

  • I am using a standard CN0549 setup with my laptop connected over ethernet to the DE-10. I then use the Debug screen of the IIO Oscillope's debug screen. I select the Device to be ad7768-1. Enable detailed register map and Autoread under the Register block at the bottom of the screen. I then use the Read and Write buttons to read and write from the registers. I have attached a screen shot with a red arrow showing the part of the screen I am using in the IIO app. All register reads are OK and I am getting the default values as specified in the AD7768 user manual. Register values are starting at Page 68 of attached manual. I have attached a video of the output of the probe when I probe the SPI pins on the CN0540 board (attached as a HAT to the DE-10). You can see the CS, CLK, MOSI and MISO output for the following 4 operations. Page 50/51 of the user manual of ad7768 show the timing diagrams/codes for reading and writing into these registers

    Read register 14 (0x4E)

    Write 0 into register 14 (0x0E 0x00)

    Write 1 into register 14 (0x0E 0x01)

    Read register 14 (0x4E) --------- this should return a 1. Instead it returns a 0.

    Writing 1 into register 14 enables continuous read mode. So this is a legal operation.

    Note: I see the same problem even if I run the IIO app as an Administrator on my PC or if I use a console/keyboard directly attached to the DE-10 to try and edit the register.


  • Thanks Girija,

    I just sent a reminder to the software team to have a look at this.  It seems like there is something missing from the ad7768-1 driver which the software is using.  To confirm this could you log into the DE10-Nano as user 'root' and password 'analog' and then open up a terminal when connected into the DE-10 Nano and type in this command "iio_attr -d ad7768-1" and just take a small screen shot of what's returned.



  • root@analog:~# iio_attr -d ad7768-1
    dev 'ad7768-1', attr 'common_mode_voltage', value :'(AVDD1-AVSS)/2'
    dev 'ad7768-1', attr 'common_mode_voltage_available', value :'(AVDD1-AVSS)/2 2V5 2V05 1V9 1V65 1V1 0V9 OFF'
    dev 'ad7768-1', attr 'sampling_frequency', value :'256000'
    dev 'ad7768-1', attr 'sampling_frequency_available', value :'256000 128000 64000 32000 16000 8000 4000 2000 1000'

  • Hello,

    At the moment we do not support a different type of digital filter.

    I will come with a reply to this thread when we have this attribute implemented


  • Appreciate the feedback. But I'm still confused because of 2 reasons. 

    1. Just in case the ability to modify filter parameters was not supported, I decided to try writing into a basic register. The example I have given is for writing into register 14 to enable continuous read operation. Is this also not supported?

    2. Why am I able to write into the register over the SPI interface (same interface used by DE-10) using a Teensy?

  • Hello,

    The SPI controller used by the DE-10 is an FPGA IP that is configured to operate only in the default mode.

    Since the continuous read has a different timing, the SPI transaction won't be successful.


  • Thanks. So can we change any settings in the CN0549 or does it only operate in default settings? I tried looking for documentation about this; but couldn't find anything. The user guide and other online material seems to imply that you can change the register settings in the AD7768 (in the CN0549 setup). Can you point me to the documentation I should use?