I'm using Linaro running on a MicroZed board to talk to the AD3961. I'm initially trying to use the Linux drivers to get the data from the internal temperature sensor. I tried to follow the example shown on page 84 of the AD9361 Reference Manual.
I was able to find these adi equivalents in /sys/kernel/debug/iio/iio:device0
|SPI Address||data||adi equivalent|
|B||0||echo 0 > adi,temp-sense-offset-signed|
|C||F||echo 1 > adi,temp-sense-periodic-measurement-enable|
|D||0||echo 1000 > adi,temp-sense-measurement-interval-ms|
|F||0||echo 256 > adi,temp-sense-decimation|
|35||1E||echo 30 > adi,ctrl-outs-index|
|36||FF||echo 255 > adi,ctrl-outs-enable-mask|
If I understand things correctly, this should set up a 1000ms periodic internal temperature measurement.
So my questions:
- How can I read the temperature values (Address: 0x00E) from the command line?
- How do I set the Aux-ADC config (Address: 0x01D)?
- How would I set it up to manually start a temperature reading? (setting bit in Address 0x00C)?
- Is it just a matter of setting adi,temp-sense-measurement-interval-ms to zero, and then setting adi,temp-sense-periodic-measurement-enable to 1 to start the reading?