Commit 62f3d3cc authored by Dimitris Lampridis's avatar Dimitris Lampridis

tests: Double 100mV tolerance and maximum allowed ripple from 2LSB to 4LSB.

Submitted by Steve Carpenter of Sundance (steve.c@sundance.com), in order to address stability issues during execution of the tests.
Signed-off-by: Dimitris Lampridis's avatarDimitris Lampridis <dimitris.lampridis@cern.ch>
parent bdeaede1
......@@ -419,7 +419,12 @@ def main (default_directory = '.'):
print(" OK")
meas = d_meas[i][ch-1]
if IN_RANGE==RANGES[2]:
expect = (4*ADC_LSB[IN_RANGE])
else:
expect = (2*ADC_LSB[IN_RANGE])
print(" Check voltage stability (tolerance=+/-%1.6fV):" % expect)
if abs(meas) > expect:
print(" ERROR measure:%1.9fV expect:+/-%1.9fV ###"%(meas, expect))
......
......@@ -70,9 +70,6 @@ REPEAT = 2
ADC_LSB = {'10V':10.0/2**14, '1V':1.0/2**14, '100mV':0.1/2**14}
DAC_LSB = 10.0/2**16
# Maximum reference voltage ripple in LSB
MAX_RIPPLE_LSB = 2
# Maximum offset error in % FS
MAX_OFFSET_ERROR = 0.1
......@@ -455,9 +452,13 @@ def main (default_directory = '.'):
mean, diff = make_meas(carrier, fmc, box, v_dac, v_in[i], IN_RANGE, ADC_FS[IN_RANGE], REPEAT)
v_meas.append(mean)
d_meas.append(diff)
max_ripple = MAX_RIPPLE_LSB * ADC_LSB[IN_RANGE]
if IN_RANGE == RANGES[2]:
max_ripple_lsb = 4
else:
max_ripple_lsb = 2
max_ripple = max_ripple_lsb * ADC_LSB[IN_RANGE]
print " Check voltage stability (reference voltage ripple):"
print " Maximum allowed ripple = %d LSB = %1.9f[V]" % (MAX_RIPPLE_LSB, max_ripple)
print " Maximum allowed ripple = %d LSB = %1.9f[V]" % (max_ripple_lsb, max_ripple)
for ch in range(1,NB_CHANNELS+1):
ripple = d_meas[i][ch-1]
print "Channel %d: v_meas=%2.9f[V], ripple=%1.9f[V] => "%(ch, v_meas[i][ch-1], d_meas[i][ch-1]),
......@@ -538,9 +539,13 @@ def main (default_directory = '.'):
mean, diff = make_meas(carrier, fmc, box, v_dac[i], v_in, IN_RANGE, ADC_FS[IN_RANGE], REPEAT)
v_meas.append(mean)
d_meas.append(diff)
max_ripple = MAX_RIPPLE_LSB * ADC_LSB[IN_RANGE]
if IN_RANGE == RANGES[2]:
max_ripple_lsb = 4
else:
max_ripple_lsb = 2
max_ripple = max_ripple_lsb * ADC_LSB[IN_RANGE]
print " Check voltage stability (reference voltage ripple):"
print " Maximum allowed ripple = %d LSB = %1.9f[V]" % (MAX_RIPPLE_LSB, max_ripple)
print " Maximum allowed ripple = %d LSB = %1.9f[V]" % (max_ripple_lsb, max_ripple)
for ch in range(1,NB_CHANNELS+1):
ripple = d_meas[i][ch-1]
print "Channel %d: v_meas=%02.9f[V], ripple=%1.9f[V] => "%(ch, v_meas[i][ch-1], d_meas[i][ch-1]),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment