From dbaab61ea2fc965b16121b66d5ce92ccf76fd8c6 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Wed, 2 Sep 2020 17:02:12 +0200 Subject: [PATCH] g2: print ns in server before converting to freq --- .../gotthard2DetectorServer/slsDetectorFunctionList.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index 2fe739003..90c4971ec 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -901,12 +901,13 @@ int setPeriod(int64_t val) { LOG(logERROR, ("Invalid period: %lld ns\n", val)); return FAIL; } - val *= (1E-9 * systemFrequency); if (burstMode == BURST_OFF) { LOG(logINFO, ("Setting period %lld ns [Continuous mode]\n", val)); + val *= (1E-9 * systemFrequency); set64BitReg(val, SET_PERIOD_LSB_REG, SET_PERIOD_MSB_REG); } else { LOG(logINFO, ("Setting period %lld ns [Burst mode]\n", val)); + val *= (1E-9 * systemFrequency); set64BitReg(val, ASIC_INT_PERIOD_LSB_REG, ASIC_INT_PERIOD_MSB_REG); } // validate for tolerance