Commit 0d75598a authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

sw: Small changes in RS485 pulse test and Makefile

RS485 test: checking input counters for all-zeroes and outputting a message if
true.

Makefile: Updated link to binary
parent bef644d6
......@@ -28,7 +28,7 @@ all:
mkdir -p ubuntu/t485/boot
mv ubuntu/t485/shell/program ubuntu/t485/boot
mv ubuntu/t485/shell/flash ubuntu/t485/boot
wget -P ubuntu/t485/boot http://www.ohwr.org/attachments/download/3688/pts.bit
wget -P ubuntu/t485/boot http://www.ohwr.org/attachments/download/3689/pts.bit
wget -P ubuntu/t485/boot http://www.ohwr.org/attachments/download/3650/flash_load.bit
wget -P ubuntu/t485/boot http://www.ohwr.org/attachments/download/3657/golden-v0.0_release-v1.0.bin
......
......@@ -124,15 +124,20 @@ def check_counters(bus, inf, pel):
ic_arr.append(pc.rd_in_cnt(i))
oc_arr.append(pc.rd_out_cnt(i))
for i in range(len(ic_arr)):
if (ic_arr[i] == oc_arr[i]):
msg = "Ch%d input counter (%d) matches the output counter (%d) - good\n" % (i+1,
ic_arr[i], oc_arr[i])
inf.write(msg)
else:
msg = "ERROR: Ch%d input counter (%d) does not match output counter (%d)"% (i+1,
ic_arr[i], oc_arr[i])
pel.set(msg)
# First, check for all-zeroes in counters, indicating enable NAND gate failure
if all(ic == 0 for ic in ic_arr):
msg = "ERROR: No pulses received - check tester board connection, or enable NAND gate IC8"
pel.set(msg)
else:
for i in range(len(ic_arr)):
if (ic_arr[i] == oc_arr[i]):
msg = "Ch%d input counter (%d) matches the output counter (%d) - good\n" % (i+1,
ic_arr[i], oc_arr[i])
inf.write(msg)
else:
msg = "ERROR: Ch%d input counter (%d) does not match output counter (%d)"% (i+1,
ic_arr[i], oc_arr[i])
pel.set(msg)
def pulse_test(bus, inf, pel, output, term):
if (output == 1):
......@@ -141,7 +146,7 @@ def pulse_test(bus, inf, pel, output, term):
disp = 2
elif (output == 3):
disp = 1
msg = "Testing channel connections (term. %s): Out%d -> In" % (term, disp)
msg = "Testing channel connections (term. %s): O%d -> IN" % (term, disp)
print(msg)
mux_sel(bus, output)
clear_counters(bus)
......
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