CN0540 Spike in first rx() value
WyattBreitner opened this issue · comments
This may just be a misunderstanding on my part, but when I first create a rx buffer, I get a massive spike in the first value.
This spike is also in the input_voltage value, and when I run iio_info.
>>> import adi
>>> adc = adi.cn0540.cn0540(uri='ip:localhost')
>>> adc.rx_output_type = 'SI'
>>> adc.rx()
array([-1343.99931187, 26.96727135, 26.96727135, ...,
26.96678307, 26.96678307, 26.96727135])
>>> adc.rx()
array([26.96727135, 26.96678307, 26.96678307, ..., 26.96678307,
26.96727135, 26.96727135])
>>> adc.rx_destroy_buffer()
>>> adc.rx()
array([-1343.99931187, 26.96678307, 26.96678307, ...,
26.96678307, 26.96678307, 26.96678307])
>>> adc.rx_destroy_buffer()
>>> adc.input_voltage
-1571.821460852
>>> adc.sensor_voltage
2171.8311967201303
iio:device0: ad7768-1 (buffer capable)
1 channels found:
voltage0: (input, index: 0, format: le:s24/32>>8)
2 channel-specific attributes found:
attr 0: raw value: -2080071
attr 1: scale value: 0.000488281
4 device-specific attributes found:
attr 0: common_mode_voltage value: (AVDD1-AVSS)/2
attr 1: common_mode_voltage_available value: (AVDD1-AVSS)/2 2V5 2V05 1V9 1V65 1V1 0V9 OFF
attr 2: sampling_frequency value: 256000
attr 3: sampling_frequency_available value: 256000 128000 64000 32000 16000 8000 4000 2000 1000
3 buffer-specific attributes found:
attr 0: data_available value: 0
attr 1: length_align_bytes value: 16
attr 2: watermark value: 1024
1 debug attributes found:
debug attr 0: direct_reg_access value: 0x0
No trigger on this device