Commit 8837f242 authored by Marek Gumiński's avatar Marek Gumiński

Added units to ADC plots

parent 1b25c761
......@@ -273,9 +273,21 @@ def test_transmission( dut, transmission, should_succed = True, primary = True )
else:
result[ 'Captured ADC transmission' ] = 1
plt.plot(diff)
plt.ylabel("Signal [LSB]")
plt.xlabel("Time [samples]")
# ADC sampling freq is constant, but undersampling is changed depending on bus speed
# result sampling frequency is lower
# 1e6 to get [us]
sampleperiod = 1e6/ (dut.adc_sampling_freq / customconf.undersampling)
# create time vector
xxrange=numpy.linspace(0, sampleperiod*len(diff),len(diff))
# make plot
plt.plot( xxrange, 1000.0*diff/ 2.0**16)
#make is look good
plt.title("Differential WordFIP signal (ADC CH1-CH2)")
plt.ylabel("Signal [mV]")
plt.xlabel("Time [us]")
plt.savefig("/tmp/image.png")
plt.close()
......
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