Commit 841b6972 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

sw: Added code for the failsafe condition A = '1', B = '1' in rs485_pulse.py

parent 18724f7a
......@@ -170,11 +170,19 @@ def main(bus, tname, inf, log):
check_counters(pc, inf, pel)
clear_counters(pc)
msg = "Testing fail-safe"
msg = "Testing RS-485 fail-safe on short-circuit case"
print(msg)
mux_sel(bus, 0x3)
inf.write('\n')
inf.write(msg+'\n')
val = bus.vv_read(LSR)
val >>= LSR_REARFS_OFS
if (val == 0x3f):
msg = "RS-485 failsafe lines read as expected: 0x%02X\n" % val
inf.write(msg)
else:
msg = "ERROR: Failsafe lines readout (0x%02X) incorrect - expected 0x3F" % val
pel.set(msg)
return pel.get()
......
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