Commit 33c6497b authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

sw: RS485 pulse test script disables tester lines on exit

parent 610d581c
......@@ -139,6 +139,7 @@ def main(bus, tname, inf, log):
msg = "Testing channel connections: O1 -> I"
print(msg)
mux_sel(bus, 0x0)
inf.write('\n')
inf.write(msg+'\n')
en_pulse_gen(bus)
time.sleep(2)
......@@ -149,6 +150,7 @@ def main(bus, tname, inf, log):
msg = "Testing channel connections: O2 -> I"
print(msg)
mux_sel(bus, 0x1)
inf.write('\n')
inf.write(msg+'\n')
en_pulse_gen(bus)
time.sleep(2)
......@@ -159,6 +161,7 @@ def main(bus, tname, inf, log):
msg = "Testing channel connections: O3 -> I"
print(msg)
mux_sel(bus, 0x2)
inf.write('\n')
inf.write(msg+'\n')
en_pulse_gen(bus)
time.sleep(2)
......@@ -169,6 +172,7 @@ def main(bus, tname, inf, log):
msg = "Testing fail-safe"
print(msg)
mux_sel(bus, 0x3)
inf.write('\n')
inf.write(msg+'\n')
return pel.get()
......@@ -179,3 +183,10 @@ def main(bus, tname, inf, log):
except BusWarning, e:
raise PtsError("SKT Warning: %s" % e)
finally:
val = bus.vv_read(CSR)
val &= ~(1 << CSR_TESTER_VCC_OFS)
val &= ~(1 << CSR_TESTER_MUX_EN_OFS)
val &= ~(1 << CSR_TESTER_MUX_S0_OFS)
val &= ~(1 << CSR_TESTER_MUX_S1_OFS)
bus.vv_write(CSR, val)
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