From 06c46a4986846a38531c2fd9218125e1d1b534a1 Mon Sep 17 00:00:00 2001 From: Gijs Schoonderbeek <schoonderbeek@astron.nl> Date: Fri, 6 Jan 2023 17:39:17 +0100 Subject: [PATCH] small modification to get is working on HW --- production_apsct.py | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/production_apsct.py b/production_apsct.py index 97fb001..66b9f32 100644 --- a/production_apsct.py +++ b/production_apsct.py @@ -17,7 +17,7 @@ Check APSCT_CLK import apsct_lib import sys -READ_ALL = True +READ_ALL = False # True CLK_FREQ = '200MHz' @@ -28,32 +28,16 @@ if len(sys.argv) < 2: apsct = apsct_lib.ApsctClass(CLK_FREQ) -print*("Check APSCT in 200MHz mode") -apsct.frequency = "200MHz" -apsct.set_apsct() -apsct.pll_200.read_lock() -apsct.pll_200.read_lol() -apsct.pll_160.read_lock() -apsct.pll_160.read_lol() -apsct.sensors.apsct_sensors() +modi = ["200MHz", "160MHz", "OFF"] +for mode in modi: + print(f"Check APSCT in {mode} mode") + apsct.frequency = mode + apsct.set_apsct() + apsct.pll_200.read_lock() + apsct.pll_160.read_lock() + apsct.sensors.apsct_sensors() + apsct.check_apsct() -print*("Check APSCT in 160MHz mode") -apsct.frequency = "160MHz" -apsct.set_apsct() -apsct.pll_200.read_lock() -apsct.pll_200.read_lol() -apsct.pll_160.read_lock() -apsct.pll_160.read_lol() -apsct.sensors.apsct_sensors() - -print*("Check APSCT in off mode") -apsct.frequency = "OFF" -apsct.set_apsct() -apsct.pll_200.read_lock() -apsct.pll_200.read_lol() -apsct.pll_160.read_lock() -apsct.pll_160.read_lol() -apsct.sensors.apsct_sensors() if READ_ALL: apsct.pll_200.read_all_regs_pll() @@ -67,4 +51,4 @@ if apsct.check_apsct(): if rw_ok: rw_ok = apsct.eeprom.wr_rd_eeprom(serial, address=0x20) if not rw_ok: - print("EEPROM Error") \ No newline at end of file + print("EEPROM Error") -- GitLab