xilix: power regulators initialized to a non zero value
All checks were successful
Build on RHEL9 / build (push) Successful in 3m15s
Build on RHEL8 / build (push) Successful in 4m44s

This commit is contained in:
2026-01-23 16:17:22 +01:00
parent 652c8e6c0a
commit 76fa293238
5 changed files with 10 additions and 11 deletions

View File

@@ -426,7 +426,8 @@ void setupDetector() {
for (int idac = NDAC_ONLY; idac < NDAC; ++idac) {
if (idac == D_PWR_EMPTY)
continue;
initError = setPower(idac, 0, initErrorMessage);
int min = (idac == D_PWR_IO) ? VIO_MIN_MV : POWER_RGLTR_MIN;
initError = setPower(idac, min, initErrorMessage);
if (initError == FAIL)
return;
}
@@ -1406,6 +1407,7 @@ int setPower(enum DACINDEX ind, int val, char *mess) {
LOG(logINFO, ("Setting Power %s to %d mV\n", powerNames[pwrIndex], val));
int startup = (dacValues[ind] == -1) ? 1 : 0;
powerEnable(0, pwrIndex);
if (val > 0) {
@@ -1428,7 +1430,9 @@ int setPower(enum DACINDEX ind, int val, char *mess) {
}
dacValues[ind] = dacval;
powerEnable(1, pwrIndex);
// dont power on at startup (was -1 before)
if (startup == 0)
powerEnable(1, pwrIndex);
}
return OK;

View File

@@ -1060,9 +1060,9 @@ TEST_CASE("v_abcd", "[.cmdcall]") {
if (det_type == defs::XILINX_CHIPTESTBOARD &&
det.isVirtualDetectorServer().tsquash(
"inconsistent virtual values")) {
// prev value for power regulators should have been 1200
// (set in config) as they are only touched in this test
REQUIRE(prev_val.squash(-1) == 1200);
// prev value for power regulators should have been minimum
// as they are only touched in this test
REQUIRE(prev_val.squash(-1) > 0);
REQUIRE_THROWS(caller.call(cmds[i], {"-100"}, -1, PUT));
}

View File

@@ -7,6 +7,6 @@
#define APIGOTTHARD2 "0.0.0 0x260116"
#define APIMOENCH "0.0.0 0x260116"
#define APIEIGER "0.0.0 0x260116"
#define APIXILINXCTB "0.0.0 0x260116"
#define APIXILINXCTB "0.0.0 0x260123"
#define APIJUNGFRAU "0.0.0 0x260116"
#define APIMYTHEN3 "0.0.0 0x260116"

View File

@@ -234,11 +234,6 @@ def loadConfig(name, rx_hostname = 'localhost', settingsdir = None, log_file_fp
d.powerchip = 1
if name == "xilinx_ctb":
d.v_a = 1200
d.v_b = 1200
d.v_c = 1200
d.v_d = 1200
d.v_io = 1200
d.configureTransceiver()
if settingsdir is not None and name in ['eiger', 'mythen3']: