I have been reading the AD9361 millidegree Celsius die temperature through the Linux IIO driver by using the "cat in_temp0_input" command and dividing the result by 1,000. Normally, the temperature readings are what is expected (~25 degrees C). However, every once in a while (every 300 readings or so) I will get a "bad" reading (e.g. 70 degrees C). Currently the Temp Sensor Decimation register (0x0F) is set to zero (0) so the AuxADC temp. measurements are being decimated by 256.
I have read in the AD9361 Register Map Manual for the Temperature reading register (0x0E) that the AuxADC should be powered down (0x1D, bit D0) to ensure a valid reading (UG-671, page 8). Does this mean in order to read the die temperature, I need to set bit D0 low before, read the temperature value and then set D0 back high again for the next reading?
If so, what Linux command can I use to toggle register 0x01D, bit D0 before reading the temperature using the "cat in_temp0_input" command? Or is the IIO driver supposed to do that automatically when that command is issued?
Any feedback would be appreciated.
Hope you are taking care of below
For accurate results this read back requires a one-point factory calibration. Determine the offset between this readback in millidegree Celsius and the known device temperature. Then adjust the device tree property “adi,temp-sense-offset-signed” with a proper offset in degrees Celsius. In the OSC advanced plugin see AUX ADC/DAC/IO tab under Temp sensor offset. Also the absolute offset (signed char) is directly written into register 0x0B.
This specifies any shell prompt running on the target
root:/sys/bus/iio/devices/iio:device1> cat in_temp0_input
29825Please refer to below links,https://wiki.analog.com/resources/tools-software/linux-drivers/iio-transceiver/ad9361#die_temperature_readinghttps://ez.analog.com/wide-band-rf-transceivers/design-support/w/documents/10059/ad936x-temperature-sensor
Thank you for your reply and for the links.
Yes, I have already followed the instructions listed Die Temperature that you included above but that has not eliminated my occasional "bad" temp. readings from showing up.
However, in the link you provided from another post was the following when discussing using the Control Output 1 (Temp Sense Valid) - CTRL_OUT1 pin configured to as an output that changes state when the temperature sensor word in the 0xE register is valid:
When periodic read is set 0x00D[b0] , there is no way to ensure that you read correct values unless you have control out monitored.
I currently don't have a way to monitor the CTRL_OUT1 pin from the AD9361 so know when the temp. sensor data is valid so this might explain why polling the temp. sensor data is sometimes produces "bad" / invalid temp. data.
We have been reading the AD9361 millidegree Celsius die temperature through the Linux IIO driver by logging the field in_temp0_input.
We observe the same phenomena (see figure above) .Could someone have a solution to avoid bad values?
Please refer to the attached pdf.