Skip to content
Snippets Groups Projects

Apsct ad9511

1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
+ 4
0
@@ -16,6 +16,7 @@ Check APSCT_CLK
@@ -16,6 +16,7 @@ Check APSCT_CLK
"""
"""
import apsct_lib
import apsct_lib
import sys
import sys
 
import time
READ_ALL = False # True
READ_ALL = False # True
@@ -33,6 +34,7 @@ for mode in modi:
@@ -33,6 +34,7 @@ for mode in modi:
print(f"Check APSCT in {mode} mode")
print(f"Check APSCT in {mode} mode")
apsct.frequency = mode
apsct.frequency = mode
apsct.set_apsct()
apsct.set_apsct()
 
time.sleep(1)
if mode == "200MHz":
if mode == "200MHz":
state = state & apsct.pll_200.read_lock()
state = state & apsct.pll_200.read_lock()
if mode == "160MHz":
if mode == "160MHz":
@@ -40,6 +42,7 @@ for mode in modi:
@@ -40,6 +42,7 @@ for mode in modi:
apsct.frequency = "200MHz"
apsct.frequency = "200MHz"
apsct.set_apsct()
apsct.set_apsct()
 
time.sleep(1)
apsct.pll_200.read_lock()
apsct.pll_200.read_lock()
apsct.sensors.apsct_sensors()
apsct.sensors.apsct_sensors()
state = state & apsct.check_apsct()
state = state & apsct.check_apsct()
@@ -55,6 +58,7 @@ if state:
@@ -55,6 +58,7 @@ if state:
rw_ok = apsct.eeprom.wr_rd_eeprom(apsct_id, address=0)
rw_ok = apsct.eeprom.wr_rd_eeprom(apsct_id, address=0)
if rw_ok:
if rw_ok:
rw_ok = apsct.eeprom.wr_rd_eeprom(serial, address=0x20)
rw_ok = apsct.eeprom.wr_rd_eeprom(serial, address=0x20)
 
print("APSCT tested successfully ")
if not rw_ok:
if not rw_ok:
print("EEPROM Error")
print("EEPROM Error")
else:
else:
Loading